Version 3 bugs reporting Thread

Hi, I found out several bugs when testing the First Person Controller 3, for that matter, I decided to start a new thread so that everyone can share theirs bugs regarding verssion 3

Be sure to add the version and the controller as well as the Unity version that you are using. Follow these steps when reporting a bug

1. Create a new project with Unity. (any version that support the controller should do)
2. Download and install First Person Controller 3.0.2. (don't know if it does this with the others controllers, might check it out)
3. Once installed, load the demo scene.
4. Description of the bug.
5. Link to a video or images showing exactly the bug it extremely useful for the devs.
 
Bug 1 :
The dryfire animations are playing when reloading any shooting weapons, but that only happen when the guns is empty.

1. Create a new project with Unity. (any version that support the controller should do)
2. Download and install First Person Controller 3.0.2. (don't know if it does this with the others controllers, might check it out)
3. Once installed, load the demo scene.
4. In the demo scene, open the Animator tab window, enable the Autolink option and place it side by side with the game tab. (like in the video)
5. Select "Normal" play mode in the game tab window and press "Play" so start the demo.
6. Select the "Shooting" option in the menu.
7. Select any weapon and shoot till you have only one projectile left. (the rocket launcher is perfect as an example because it only has one projectile)
8. Shoot your last projectile and look at the animator tab at the same time.


I will keep posting other bugs that I found
 
Bug 2 :
The character sink into the ground when equiping a melee weapon, it only happen when the character is idle.

1. Create a new project with Unity. (any version that support the controller should do)
2. Download and install First Person Controller 3.0.2. (don't know if it does this with the others controllers, might check it out)
3. Once installed, load the demo scene.
4. Enter "Play mode" and select the melee option.
5. Select and pick any melee weapon available

 
Bug 1 :
The dryfire animations are playing when reloading any shooting weapons, but that only happen when the guns is empty.
Tagging @Sangemdoko .

Bug 2 :
The character sink into the ground when equiping a melee weapon, it only happen when the character is idle.
Good catch. The build process stripped out the MeleeAim animations for the UFPS build. This was from the version 2 setup. I will submit an updated today for UFPS that includes these animations. This update won't contain anything else.
 
Thank you for the detailed bug report.
I was able to reproduce it easily with those steps.
I've added it to the list of things to fix
 
Bug :
1. Create a new project with Unity 2021.3.13f1.
2. Download and install Third Person Controller 3.0.2.
3. Build Character in Character Manager.
4. Error :
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Editor.Managers.CharacterManager.CharacterGameObjectChange () (at Assets/Plugins/Opsive/UltimateCharacterController/Editor/Managers/CharacterManager.cs:519)
Opsive.UltimateCharacterController.Editor.Managers.CharacterManager.BuildCharacter (UnityEngine.UIElements.VisualElement container) (at Assets/Plugins/Opsive/UltimateCharacterController/Editor/Managers/CharacterManager.cs:1497)
Opsive.UltimateCharacterController.Editor.Managers.CharacterManager+<>c__DisplayClass48_0.<ShowCharacter>b__2 () (at Assets/Plugins/Opsive/UltimateCharacterController/Editor/Managers/CharacterManager.cs:306)
UnityEngine.UIElements.Clickable.Invoke (UnityEngine.UIElements.EventBase evt) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.Clickable.ProcessUpEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.Vector2 localPosition, System.Int32 pointerId) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.Clickable.OnMouseUp (UnityEngine.UIElements.MouseUpEvent evt) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)

5. Fix it after changing the code.

C#:
// Find any existing slots on the first person arms.
for (int j = 0; j < m_FirstPersonArms[i].Length; ++j) {
    if (m_FirstPersonArms[i][j] == null) {
        continue;
    }
    itemSlots = m_FirstPersonArms[i][j].GetComponentsInChildren<Items.CharacterItemSlot>();
    m_OriginalItemSlotParents[i][j + 1] = new GameObject[itemSlots.Length];
    m_ItemSlotParents[i][j + 1] = new GameObject[itemSlots.Length];
    m_ItemSlotParentIDs[i][j + 1] = new int[itemSlots.Length];
    for (int k = 0; k < itemSlots.Length; ++k) {
        // Use the parent instead of the Item GameObject directly.
        m_OriginalItemSlotParents[i][j + 1][k] = itemSlots[k].transform.parent.gameObject;
        m_ItemSlotParents[i][j + 1][k] = itemSlots[k].transform.parent.gameObject;
        m_ItemSlotParentIDs[i][j + 1][k] = itemSlots[k].ID;
    }
}

C#:
#if FIRST_PERSON_CONTROLLER
                    // Find any existing slots on the first person arms.
                    for (int j = 0; j < m_FirstPersonArms[i].Length; ++j) {
                        if (m_FirstPersonArms[i][j] == null) {
                            continue;
                        }
                        itemSlots = m_FirstPersonArms[i][j].GetComponentsInChildren<Items.CharacterItemSlot>();
                        m_OriginalItemSlotParents[i][j + 1] = new GameObject[itemSlots.Length];
                        m_ItemSlotParents[i][j + 1] = new GameObject[itemSlots.Length];
                        m_ItemSlotParentIDs[i][j + 1] = new int[itemSlots.Length];
                        for (int k = 0; k < itemSlots.Length; ++k) {
                            // Use the parent instead of the Item GameObject directly.
                            m_OriginalItemSlotParents[i][j + 1][k] = itemSlots[k].transform.parent.gameObject;
                            m_ItemSlotParents[i][j + 1][k] = itemSlots[k].transform.parent.gameObject;
                            m_ItemSlotParentIDs[i][j + 1][k] = itemSlots[k].ID;
                        }
                    }
#endif
 
Bug :
1. Create a new project with Unity 2021.3.13f1.
2. Download and install Third Person Controller 3.0.2.

3. Create a new scene and drag Atlas into Hierarchy.
1.png

4. Click on any of the abilities.

2.png

5. Modify any of the ability parameter in Inspector.

3.png

6. Undo(ctrl + z ) but the Inspector is not refreshed.


4.png

7. Close and then reopen the Inspector. At this point the Inspector data is refreshed.


5.png


Not refreshing the Inspector immediately when you undo is confusing, hopefully this will be fixed soon!
 
Bug :
The latest undo changes feature seems to have some bugs.

Create a new project with Unity 2021.3.13f1.
Download and install Third Person Controller 3.0.3.

bug 1:
1. Open Atlas prefab.
2. Close Atlas prefab.
3. Open Atlas prefab.
4. Modify any of the ability parameter in Inspector and undo.
Error:
MissingReferenceException: The object of type 'UltimateCharacterLocomotion' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Component.GetComponent[T] () (at <c399efc08928422d8828d74a2b19ffba>:0)
Opsive.UltimateCharacterController.Editor.Controls.Types.AttributeModifierControl.GetControl (Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase+TypeControlInput input) (at Assets/Opsive/UltimateCharacterController/Editor/Controls/Types/AttributeModifierControl.cs:43)
Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase.GetTypeControl (Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase+TypeControlInput input) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddTypeControl (UnityEngine.Object unityObject, System.Object target, System.Reflection.FieldInfo field, UnityEditor.SerializedProperty serializedProperty, System.Int32 arrayIndex, System.Type type, System.String label, System.String tooltip, System.Boolean adjustLabelWidth, System.Object value, System.Boolean searchBaseTypes, System.Action`2[T1,T2] onAddElement, System.Func`2[T,TResult] onChangeEvent, System.Action onResizeEvent, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddSingleField (Opsive.Shared.Editor.UIElements.FieldInspectorView+InspectorInput input) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddField (Opsive.Shared.Editor.UIElements.FieldInspectorView+InspectorInput input) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddField (UnityEngine.Object unityObject, System.Object target, System.Reflection.FieldInfo field, UnityEditor.SerializedProperty serializedProperty, System.Action`2[T1,T2] onAddElement, System.Action`1[T] onChangeEvent, System.Func`3[T1,T2,TResult] onValidateChange, System.Boolean searchBaseTypes, System.Action onResizeEvent, System.Boolean adjustLabelWidth, System.Collections.Generic.HashSet`1[T] ignoredFieldNames, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddField (UnityEngine.Object unityObject, System.Object target, System.String fieldName, System.Action`2[T1,T2] onAddElement, System.Action`1[T] onChangeEvent, System.Func`3[T1,T2,TResult] onValidateChange, System.Boolean searchBaseTypes, System.Action onResizeEvent, System.Boolean adjustLabelWidth, System.Collections.Generic.HashSet`1[T] ignoredFieldNames, UnityEditor.SerializedProperty serializedProperty, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddField (UnityEngine.Object unityObject, System.Object target, System.String fieldName, UnityEngine.UIElements.VisualElement container, System.Action`1[T] onChangeEvent, System.Func`3[T1,T2,TResult] onValidateChange, System.Boolean searchBaseTypes, System.Action onResizeEvent, System.Boolean adjustLabelWidth, System.Collections.Generic.HashSet`1[T] ignoredFieldNames, UnityEditor.SerializedProperty serializedProperty, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.UltimateCharacterController.Editor.Controls.Types.AbilityDrawers.AbilityControlType.GetHeaderControl (UnityEngine.Object unityObject, System.Object target, System.Reflection.FieldInfo field, UnityEditor.SerializedProperty serializedProperty, System.Int32 arrayIndex, System.Type type, System.Object value, System.Func`2[T,TResult] onChangeEvent, System.Object userData) (at Assets/Opsive/UltimateCharacterController/Editor/Controls/AbilityDrawers/AbilityControl.cs:53)
Opsive.UltimateCharacterController.Editor.Controls.Types.StateObjectControlType.GetControl (Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase+TypeControlInput input) (at Assets/Opsive/UltimateCharacterController/Editor/Controls/Types/StateObjectControl.cs:39)
Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase.GetTypeControl (Opsive.Shared.Editor.UIElements.Controls.Types.TypeControlBase+TypeControlInput input) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddTypeControl (UnityEngine.Object unityObject, System.Object target, System.Reflection.FieldInfo field, UnityEditor.SerializedProperty serializedProperty, System.Int32 arrayIndex, System.Type type, System.String label, System.String tooltip, System.Boolean adjustLabelWidth, System.Object value, System.Boolean searchBaseTypes, System.Action`2[T1,T2] onAddElement, System.Func`2[T,TResult] onChangeEvent, System.Action onResizeEvent, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddFields (UnityEngine.Object unityObject, System.Object target, Opsive.Shared.Utility.MemberVisibility visibility, System.Action`2[T1,T2] onAddElement, System.Action`1[T] onChangeEvent, System.Func`3[T1,T2,TResult] onValidateChange, UnityEditor.SerializedProperty serializedProperty, System.Boolean searchBaseTypes, System.Action onResizeEvent, System.Boolean adjustLabelWidth, System.Collections.Generic.HashSet`1[T] ignoredFieldNames, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.Shared.Editor.UIElements.FieldInspectorView.AddFields (UnityEngine.Object unityObject, System.Object target, Opsive.Shared.Utility.MemberVisibility visibility, UnityEngine.UIElements.VisualElement container, System.Action`1[T] onChangeEvent, UnityEditor.SerializedProperty serializedProperty, System.Func`3[T1,T2,TResult] onValidateChange, System.Boolean searchBaseTypes, System.Action onResizeEvent, System.Boolean adjustLabelWidth, System.Collections.Generic.HashSet`1[T] ignoredFieldNames, System.Object userData) (at <d6915ce5d5da4c9c8c5c7f4b5a43c3af>:0)
Opsive.UltimateCharacterController.Editor.Inspectors.Character.UltimateCharacterLocomotionInspector.ShowAbility (System.Boolean abilities, System.Int32 index) (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Character/UltimateCharacterLocomotionInspector.cs:638)
Opsive.UltimateCharacterController.Editor.Inspectors.Character.UltimateCharacterLocomotionInspector.<CreateInspectorGUI>b__30_0 () (at Assets/Opsive/UltimateCharacterController/Editor/Inspectors/Character/UltimateCharacterLocomotionInspector.cs:75)
UnityEditor.Undo.Internal_CallUndoRedoPerformed () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

bug 2:

Ability parameter visibility is not refreshed after undo.
GIF 2022-11-26 21-37-26.gif

bug 3:

1. Open Demo scene (or my test scene).
2. Enter play mode and find Atlas.
3. Modify any of the ability parameter in Inspector and undo.

Error:

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Character.Abilities.Fall.CanStartAbility () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Fall.cs:58)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.TryStartAbility (Opsive.UltimateCharacterController.Character.Abilities.Ability ability, System.Boolean ignorePriority, System.Boolean ignoreCanStartCheck) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:809)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:620)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.UpdateCharacter () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:552)
Opsive.UltimateCharacterController.Character.CharacterLocomotion.Move (System.Single horizontalMovement, System.Single forwardMovement, System.Single deltaYawRotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:480)
Opsive.UltimateCharacterController.SimulationManager+CharacterComponents.Move () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:55)
Opsive.UltimateCharacterController.SimulationManager.MoveCharacters () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:259)
Opsive.UltimateCharacterController.SimulationManager.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Game/SimulationManager.cs:228)

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Character.Abilities.Ability.CanInputStartAbility (Opsive.Shared.Input.IPlayerInput playerInput) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Ability.cs:316)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler.UpdateAbilityInput (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:124)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler.UpdateAbilityInput () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:92)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:67)
 
The undo problems is a result of the UIElements switch. I now have a more universal solution to it so in the next update everything should be working better.
 
Top