Hello! I have a hopefully simple question. I'm writing a custom action that wants to use an FSMarray of AudioClips as an input field.
I've tried using the array editor attribute on my public FSMArray fields:
[ArrayEditor(typeof(AudioClip), elementName: "Clip")]
But when I do this The values I play inside those arrays are cleared on play (serialization problem?)
I've also tried:
[ArrayEditor(VariableType.Object, elementName: "Clip")]
This works, and I can use audio clips fine in the action after doing some type checking, but there is a problem where I cannot select FSMArray variables in my FSM unless they are of type Object. I assume the problem is that the my FSMArray.ObjectType isn't set yet. But if that is the case, what is the correct way to do that in my action?
I've Tried
override Reset()
{
[FSMArray] = new FSMArray();
[FSMArray].ObjectType = typeof(AudioClip);
}
but this doesn't seem to work. Anyone have any suggestions for the correct way to do this?