- Код: Выделить всё
function OnPostprocessGameObjectWithUserProperties (root : GameObject, propNames : string[], values : object[]) : void
Description
Gets called for each GameObject that had at least one userpropery attached to it in the imported file.
The propNames is a string[] containing all the names of the properties found. The values is an object[] containing all the actual values. These can be of type string, Vector4, bool, string, Color, float, int.
Typical usecase for this feature is reading out "userdata" stored on objects in 3dmax/maya. Based on what is written in the text userdata for an object, you could decide to postprocess your GameObject in different ways. The sample below adds a simple BoxCollider component if the userdata string contains "addboxcollider".
Вопрос: где писать этот "User Property" в максе??
[ftp]http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.OnPostprocessGameObjectWithUserProperties.html[/ftp]