Combine Children Extented (sources to share)
At first, sorry for my english. My teachers were Japanese
:lol:
As it is known, combining of the objects using one material in one mesh, strongly raises productivity. For this purpose in Standard Assets Unity there is script Combine Children (further: the Combine)
In the course of my work, some additives to a standard script of the Combine were created. And I share it:
[V] Frame To Wait: how many frames on script start to wait before to make combining.
For example, you have an object containing one hundred more other objects which too contain childs. Prefab of internal objects, it is equipped by the Combine with own customisations. On start, all of them will be combined and we will receive less meshes, but all the same a heap. Why not to Combine them again?
We put "1" in this setting and in a following frame, after end childs is combined, we stick together new received meshes again and it is received 5 - 10 meshes instead of old hundreds.
[V] Combine On Start - the script will work on composition start (if it is activated, sure).
[V] Destroy After Optimized - to kill all initial objects. Cautiously! If on these objects have colliders, they too are deleted.
[V] Cast Shadow - created mesh will cast shadow.
[V] Receive Shadow - created mesh will accept shadow.
[V] Keep Layer - the created object will save the same layer, as for the initial object (on which the script is)
Well and, a bonus!
[V] Under the right button there lives Combine Now command. That allows to spend all combination directly in the Editor, to estimate changes and, or to cancel them, or to save in the Scene. That is - to avoid necessity combining on application start.
출처 : http://forum.unity3d.com/threads/37721-Combine-Children-Extented-(sources-to-share)
'Unity3D > Extensions' 카테고리의 다른 글
ObjectPool (0) | 2014.04.22 |
---|---|
인스펙터 상의 GUI를 비활성화 시키고 싶을 때.. (0) | 2014.04.02 |
Save Scene while on play mode (0) | 2014.01.12 |
Auto-Save Scene on Run (0) | 2014.01.12 |
SpriteManager (0) | 2012.11.24 |