Bug description
---------------
Prefabs are disconnected when a custom PlayMaker action has an FsmEnum whose Enum has negative values.
The crash says "Index was out of range. Must be non-negative and less than the size of the collection".
The bug doesn't happen 100% of the times.
How can we reproduce it
-----------------------
1.- Put an FsmEnum in a custom PlayMaker action.
2.- Insert in the regular referenced Enum some negative values.
3.- Set the Reset value of the FsmEnum to some of the negative Enum's values.
4.- Notice that when adding the action to an Fsm, the default value it takes can not be a negative value, but you can set it by hand. If you set it manually, this will cause these prefabs to disconnect at some point later (but not 100% of the times)
For example, using this enum in an FsmEnum causes the problem:
public class ClassX
{
public enum example
{
NEGATIVE_VALUE = -1,
VALUE_0,
VALUE_1
}
}
And then in the custom action:
[ObjectType(typeof(ClassX.example))]
public FsmEnum m_example;
public override void Reset()
{
m_example = ClassX.example.NEGATIVE_VALUE;
}
We think it is related to these problems:
https://hutonggames.com/playmakerforum/index.php?topic=19088.msg83045#msg83045NOTE: this problem is present in v1.9.3 but also on previous versions.