- Home /
Accessing an FBX's Animated Custom Properties in runtime.
I have a rig I made in blender following the tutorial from Pierrick Picaut at: https://www.youtube.com/watch?v=W2WsgkI3Iqc
In the tutorial he made a custom property that changes where the bones snap to.
I exported my rig and the model from blender as FBX with Custom Properties checked, then in Unity's import settings I checked the Animated Custom Properties checkbox. I have an AssetPostProcessor script with "void OnPostProcessGameObjectWithUserProperties" that prints out both of my custom properties in the console correctly. How do I access and change the values of these properties from script? I have an animation controller script that I would like to be able to choose how the arms and the weapons behave based on what kind of a weapon is equipped
Hey! Haven't found one yet. So far I'm thinking it's one of those things a blenderFBX doesn't support. There seems to be a few other features such as constraints that cant be exported from blender in an FBX. The solution I'm using for this case is animating certain animations with a certain custom property value and exporting them to unity, then changing the property value in blender again, animating other animations with those values and exporting them to unity in a different package. eg. 2h_meleeAutoAttack and 1h_meleeAutoAttack in different files
There also seems to be a neat little unity package called Animation Rigging that could help in these scenarios but I haven't tried that one out yet.