|
Hi there, I try to combine the sub mesh of a fbx model to root when importing it. I've combined sub mesh successfuly at runtime before. But when I do the same via editor script ( in OnPostprocessModel() in a subclass inherits from AssetPostprocessor), the result mesh is null. The part of code like this:
The log shows that the subMeshCount and vertexCount of result sharedMesh are not zero. But when I dorp the asset to sence it shows nothing, and the inspector shows it's mesh is missing while all materials exist. I guess it's due to I can't save the result to the import asset because it's a fbx file, or is there something I've missing ? I'll be very greatful on your help.
(comments are locked)
|
|
You created an instance of Mesh in memory, but the Mesh is not saved as asset. I've never done this with a mesh, but i guess you have to use AssetDatabase.AddObjectToAsset. The example there adds an AnimationClip to a material. The clip shows up as child of the material ( kinda crazy ;) ). Thank you for the suggestion, I'll do some test later and feed back.
Apr 07 '11 at 03:03 PM
mcwind
(comments are locked)
|
