Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

OnPostprocessGameObjectWithUserProperties not responding?

$
0
0
Hello, I am having problems with getting OnPostprocessGameObjectWithUserProperties to work at all. I can't get any kind of life out from it. I've setup my 3ds Max object properly, using Attributes Editor I have added user data, in my case a String. However, after not getting anything to work, I tried even the most basic approach, to add a box collider if an object has ANY kind of user data. Here is the code. class UserPropTest extends AssetPostprocessor { function OnPostProcessGameObjectWithUserProperties(go:GameObject, propNames:String[], values:System.Object[]) { go.AddComponent(BoxCollider); Debug.Log(go.name + "PropName: " + propNames + "value: " + values); } } Sricpt is named same as class and placed in the Editor folder. I have tried so many things, but I get absolutely nothing. What am I doing wrong, how am I actually supposed to use it? My understanding was that it works automatically, as it says, on post process of importing a model? Any help would be greatly appreciated. Thanks!

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>