Serialization errors in UCC v3

JMab

New member
I often get these errors at edit time when the editor serializes:

The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(QuickStart) m_InputIndex

The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(QuickStop) m_InputIndex
 
How can I reproduce those errors? I do not get them after adding the QuickStart/Stop abilities.
 
I think it's happening because Ability defines private m_InputIndex and StoredInputAbilityBase defines protected int m_InputIndex. Somehow the compiler is fooled and doesn't demand a new keyword in the StoredInputAbilityBase class, but the Unity Editor falls over because it finds two variables of the same name and type in the class hierarchy for QuickStart and QuickStop. Perhaps adding new to the StoredInputAbilityBase definition would solve the problem, I'll try that.
 
Actually, the Ability base class defines that member variable as private so StoredInputAbilityBase can declare a variable of the same name. Maybe if you use a different name for the variable in StoredInputAbilityBase it would solve the problem.
 
Top