- Home /
Blender User Properties to PostProcess
I am trying to read user properties from blender into Unity, but I can't get it working.
public class MyPostProcessor : AssetPostprocessor
{
void OnPostprocessGameObjectWithUserProperties(GameObject root, string[] props, object[] values)
{
Debug.Log(root.name);
for (int i = 0; i < props.Length; i++)
{
string propName = props[i];
object value = values[i];
Debug.Log("name: " + propName + ", value: " + value);
}
}
}
I have already tried to export my models to fbx, dae, obj and 3ds. But none of those and not even .blend files call this method.
I have added my user properties in blender via the properties menu on the right (2.61) and added something in Object -> Custom Properties.
Is there anything that I'm doing wrong here? I would also love to use the collada format, but I have already found that there is no support for custom properties in Collada from Blender just yet.
I love how stuff like this that probably has a very straightforward and easy answer never gets one :-/
I'd like to know too...
It's flattering that you think we know everything ;)
While exporting a FBX file in Blender (File->Export->FBX) In the left $$anonymous$$enu "Export FBX" check "Custom Properties". This worked for me.