블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2797)
Unity3D (853)
Programming (479)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (61)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

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.




combinechildren_962.cs



출처 : 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
Posted by blueasa
, |