[BUG] RestrictPosition Ability and "StopAnimation"

DankP3

Active member
1. Character controller variant (Ultimate Character Controller, First Person Controller, etc).
UCC 2.1.9

2. Unity version (include which SRP, beta Unity versions aren't supported)
2018.3 standard rendering

3. Bug description
The restrict position Inspector retains displays for "stop animation", but this has been removed from Restrict Position. It throws an error in the editor

4. Steps to reproduce
Add RestrictPosition Ability to character, select it and check the "stop animation" box.

5. The full error message (if any)
Error: Unable to find a field with name m_StopAnimationBuffer on object Opsive.UltimateCharacterController.Character.Abilities.RestrictPosition
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.Editor.Inspectors.Utility.InspectorUtility:DrawField(Object, String) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Utility/InspectorUtility.cs:390)
Opsive.UltimateCharacterController.Editor.Inspectors.Character.Abilities.RestrictPositionInspectorDrawer:DrawInspectorDrawerFields(Object, Object) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Character/Abilities/RestrictPositionInspectorDrawer.cs:72)
Opsive.UltimateCharacterController.Editor.Inspectors.Character.AbilityInspectorDrawer:OnInspectorGUI(Object, Object) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Character/Abilities/AbilityInspectorDrawer.cs:59)
Opsive.UltimateCharacterController.Editor.Inspectors.Utility.InspectorUtility:DrawObject(Object, Boolean, Boolean, Object, Boolean, Action) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Utility/InspectorUtility.cs:362)
Opsive.UltimateCharacterController.Editor.Inspectors.Character.UltimateCharacterLocomotionInspector:DrawSelectedAbility(Int32) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Character/UltimateCharacterLocomotionInspector.cs:1104)
Opsive.UltimateCharacterController.Editor.Inspectors.Utility.ReorderableListSerializationHelper:DrawReorderableList(ReorderableList&, InspectorBase, Array, String, HeaderCallbackDelegate, ElementCallbackDelegate, ReorderCallbackDelegate, AddCallbackDelegate, RemoveCallbackDelegate, SelectCallbackDelegate, Action`1, String, Boolean, Boolean) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Utility/ReorderableListSerializationHelper.cs:79)
Opsive.UltimateCharacterController.Editor.Inspectors.Character.UltimateCharacterLocomotionInspector:<GetDrawCallback>b__32_0() (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Character/UltimateCharacterLocomotionInspector.cs:291)
Opsive.UltimateCharacterController.Editor.Inspectors.StateSystem.StateBehaviorInspector:OnInspectorGUI() (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/StateSystem/StateBehaviorInspector.cs:92)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
 
Last edited:
Thanks for the report. It looks like I forgot to update the editor script when changing the Restrict Position ability. You can remove the call to m_StopAnimation and m_StopAnimationBuffer from within RestrictPositionInspectorDrawer - I'll do that same for the next version.
 
Top