Hi,
I am trying to get access to the custom properties in an FBX but it seems to always return ‘null’.
IDictionary<GameObject, IModel> allModels = assetLoaderContext.Models;
foreach (KeyValuePair<GameObject, IModel> modelPair in allModels)
{
Debug.Log(modelPair.Value.Name); // Outputs name just fine
IDictionary<string, object> userProperties = modelPair.Value.UserProperties; // Always null
if (userProperties == null)
continue;
// Never reaches this code
foreach (KeyValuePair<string, object> property in userProperties)
{
Debug.Log($"Key: {property.Key} --> Value: {property.Value}");
}
}
I made a test_cube.fbx that has a property:
"test_prop": "abc123"
When I look at this FBX in Blender or Maya, I can see the custom property just fine, but it doesn’t seem to work when imported with the library.
Anyone know how to get this to work?
Cheers,
Charlie
7582819–939958–test_cube.zip (3.88 KB)