- Home /
Editing curve binding types on AssetPostprocessor for custom fbx properties not working
I'm using an AssetPostprocessor to get custom properties on FBX models imported from 3DS MAX, everything is working as expected except for one thing, the curve binding key, I set it to CCharacterIK (a custom component) and in the animation they appear as Mono Behaviour, I tried setting it as SpriteRenderer (a common type in animation) and it works fine.
What am I doing wrong? Is this a bug?
This is the Postprocessor code:
public class CAssetPostprocessor : AssetPostprocessor {
void OnPostprocessGameObjectWithAnimatedUserProperties(GameObject go, EditorCurveBinding[] bindings) {
ClipAnimationInfoCurve[] curves = new ClipAnimationInfoCurve[bindings.Length];
for ( int i = 0; i < bindings.Length; i++ ) {
// Limb weights
EditorCurveBinding binding = bindings[i];
if ( binding.propertyName == "leftFootWeight"
|| binding.propertyName == "rightFootWeight"
|| binding.propertyName == "leftHandWeight"
|| binding.propertyName == "rightHandWeight") {
bindings[i].type = typeof(CCharacterIK);
bindings[i].path = bindings[i].path = "";
}
}
}
}
Answer by i-jones · Mar 11, 2019 at 05:11 PM
I also ran into this bug. I was able to work around it by fixing up the broken bindings in OnPostprocessAnimation callback in the same AssetPostprocessor class.
Answer by Aplezam · Apr 22, 2019 at 10:47 PM
Did you ever figure this out? I am running into the same thing for my "blend" property and even attempting to edit in OnPostprocessAnimation() won't fix the property name from being "Mono Behaviour.Blend". I'm on 2018.3.12f1.
Answer by Mlikman · Jul 19, 2019 at 09:38 PM
I ran into this as well. I was trying to bind a custom attribute to control the weight parameter on the new Animation Rigging "Rig" component. It seems that because the component is implemented as a script, the parameter is not bindable? Maybe that is why Mono Behavior is added to the name? I had no problems binding it to the particleSystem component as shown in the example in the OnPostprocessGameObjectWithAnimatedUserProperties() documentation. It would be good to know if this is a bug or if there is some additional coding needed to bind to a script variable.
Your answer
![](https://koobas.hobune.stream/wayback/20220612184721im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
blendshape multiplication- Exporting Envelope attr from Maya 1 Answer
How do you add AnimClips at import time correctly? 1 Answer
Grab one child of an imported FBX asset 0 Answers