Want to do such an optimization

because cmd drawcall Too much materials Too much leads to Actually, it's just that the mapping is different

Want to use texture2DArray Put them together

texArray This function will be ready soon

But from framedebugger Look, it hasn't been closed Reported error yes objects belong to different static batches

unity There is an enumeration that lists the reasons for not being able to batch This is one of them

I'll follow you in and see .... I'm very happy to see it lost

The code means smallMeshIndex It's different. It can't be merged This thing is meshID

But I can see from the editor that they are already one Mesh 了 The number of vertices is combined

Later I realized It's another thing I did that caused them not to be approved together It's true

unity Static batch The function is good Premise is mesh It has to be static Can't run on mesh There are changes

I want to do texArray Test of At run time Take the mesh Changed uv  Added the right texArray The index of As a result, it can not be co approved Get rid of it and it becomes a drawcall 了

And the amendment uv This step The right workflow should also be When editing Not the runtime So it's possible to see this road Happy

Think about it. I'm going to write an editor solve objects have different materials(shader equally Only the mapping is different Other ubo Not the same Use a piece buffer use instance Can also solve This later iteration )

By the way, it can actually mesh Together Otherwise unity Do static batch at run time There's this part of new geometry Of memory expenses very good

unity More related articles on static batch

  1. unity Understand the principle of static batch processing

    Today, the main program gave me a good talk about static batch processing , Take notes and learn from it ~ 1. Point in time for static batch processing 1) When the game is exported , stay player setting The admission static batching, This is done when exporting the package ...

  2. unity Interview questions ( answer )

    One . What is a rendering pipeline ? It refers to a series of necessary operations in order to display the image on the display . Many steps in rendering pipelines , We have to transform geometric objects from one coordinate system to another . The main steps are : Local coordinates -> View coordinates -> Back cut ...

  3. Unity Comprehensive interview questions ( Include answers )

    One : What is a collaborative program ? Start another logical processing while the main thread is running , To assist in the execution of current procedures , Coroutines are much like multithreading , But not multithreading ,Unity In fact, after the end of each frame to detect yield Whether the conditions of . Two :Unity3D in ...

  4. A mess unity Arrangement

    When Canvas Upper UI When the elements change , Will regenerate the mesh and send it to GPU Start drawing call , So as to show UI. Divide the canvas :1. The elements on each canvas are isolated from those on other canvases , Use ? Tools to slice the canvas ?, So as to solve ui Batch processing problem of .2. Can also be ...

  5. Unity Interview questions

    One : What is a collaborative program ? Start another logical processing while the main thread is running , To assist in the execution of current procedures , Coroutines are much like multithreading , But not multithreading ,Unity In fact, after the end of each frame to detect yield Whether the conditions of . Two :Unity3d in ...

  6. The most complete in history Unity Interview questions ( Keep updating the summary ......) With answers Unity Interview questions

    This is what I just sorted out Unity Interview questions , To help you interview , At the same time to help you better review Unity Knowledge point , If you find anything wrong ,( Including typos and knowledge points ), Or find out where the description is not clear , Please leave a comment below , I'll update , Greek ...

  7. Unity Technical interview questions

    One : What is a collaborative program ? answer : Start another logical processing while the main thread is running , To assist in the execution of current procedures . let me put it another way , To start a coroutine is to start a logic that can be paralleled with a program . It can be used to control movement . Sequences and the behavior of objects . Two :Unity3d The touch in the game ...

  8. turn Unity Enterprise support case and Analysis

    Unity Zhang Liming, director of technical support in Greater China “Unity Enterprise support case and Analysis ” Shared the theme . The following is a transcript of the speech : Zhang Liming : Thank you very much for coming to this year's Unite, In fact, it's not the first time that some of my friends have come here Un ...

  9. unity Interview question one

    One : What is a collaborative program ? Start another logical processing while the main thread is running , To assist in the execution of current procedures , Coroutines are much like multithreading , But not multithreading ,Unity In fact, after the end of each frame to detect yield Whether the conditions of . Two :Unity3d in ...

Random recommendation

  1. Linux Next mysql Installation and use (C Language )

    1 mysql Installation I use ubuntu Online installation , It's simple , The order is : sudo apt-get install mysql-client mysql-server 2 mysql Command set There are too many networks ...

  2. flex Image rotation ( Solve the problem of revolution and rotation )

    stay Flex The rotation of the picture in this paper has both revolution and rotation . In this way, when the picture is rotated, there will be a little trouble : To better illustrate the problem , Let's start with two concepts :“ rotation ” and “ revolution ”. Imagine , As the earth revolves around the sun , It's spinning itself .Flash Should be ...

  3. 【HDOJ】4358 Boring counting

    The basic idea is to transform the tree structure into a linear structure , Because the query is the path from any node to the leaf node . Thus, each query is transformed into an interval , Represents the path from the node to the leaf node . Offline , Sort in ascending order on the right border . Use the tree array interval to modify . A tree array indicates that there are K Data ...

  4. 『SQL Inject 』 User-Agent Detection and utilization analysis of manual injection

    The principle is simple : The background is receiving UA There is no right time UA Filter it , either PDO Data interaction ( actual PDO It's very necessary ), Lead to UA There's malicious code in , Finally, it is executed in the database . Bug Code : It's a local environment ,Bug Code section : ...

  5. MUI Beginners 1

    1.1) Official website : http://www.dcloud.io/ 2) Case study : http://www.dcloud.io/case/#group-1 3) file :http://dev.dcloud.net.cn ...

  6. IntelliJ IDEA Crack Jrebel6.3.0 install

    First, download the two necessary files (jrebel3.6.0 and cracked file ) password :pvsd Be careful : If it's not this version Jrebel The cracked file may be invalid . step 1: install Unzip the file to get two packages stay idea Choose from ...

  7. The solution is ubuntu It started on django The project in windows Access is not accessible

    windows Want to visit VMware in Ubuntu Server in Debug Mode of django service , Need to set up django Allow non local ip visit . Setup method :1. View virtual machine ip( Suggest VMware Set in Ubu ...

  8. Java Read propertoes file

    I never understood ,Java What's the path inside , How to find my resource file ? Until I saw this document , It's great . This article   After watching the , The feeling of being suddenly enlightened Here are some notes , First ,Java There is one targer file , There is a c ...

  9. java The category and use of lock in multithreading

    Currently in Java There are two locking mechanisms in : synchronized Lock Lock The interface and its implementation class are JDK5 Added content , The author is a well-known concurrency expert Doug Lea. Data synchronization depends on locks , Who does the synchronization of the lock depend on ? ...

  10. 【HDU1219】AC Me( Water problem )

    BUPT2017 wintertraining(16) #4 A HDU1219 The question Multiple sets of samples , One line for each group , Output the number of letters in the line , Output blank lines between each group of outputs Code #include <cstdio&g ...