- Home /
Question by
manny003 · Jun 12, 2015 at 08:06 PM ·
meshperformancememory
Instantiating prefabs multiple times shares mesh memory or not?
When I instantiate a Prefab multiple times during run time; and assuming I've not changed anything after that -- do all the instances of that one prefab point to the same mesh memory (i.e. sharedMesh) or is the mesh data duplicated each time?
Thanks for clarifying.
Manny
Comment
Answer by FortisVenaliter · Jun 12, 2015 at 08:12 PM
You've mostly answered it yourself. As long as you only reference sharedMesh, they are indeed shared.
If you access mesh, however, it will create a new one.
Your answer
![](https://koobas.hobune.stream/wayback/20220613200923im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Does using the same Mesh variable for multiple Mesh Filters take up more memory? 1 Answer
Are big meshes all held in memory? 3 Answers
Efficient access to Mesh arrays 1 Answer
Manual Batching 0 Answers
I need my meshes to use less memory 3 Answers