CitrioN
New member
Hello,
I'm getting the following error when I run the demo scene and click on any of the sections such as 'Locomotion':
I have installed both the UFPS and ThirdPersonController (v3.0.4) assets from the asset store in a fresh project in 2021.3.15f1 which is the latest LTS version at the time of writing this.
Went through all the steps to setup the project by having it add both the layers and input mappings.
I also did add the TextMeshPro essentials from the popup menu.
I checked the code with a break point at that line and the m_PerspectiveToggle is indeed null.
There is also no null check for this in the method above to prevent this from happening.
Scripting defines are THIRD_PERSON_CONTROLLER, FIRST_PERSON_CONTROLLER, TEXTMESH_PRO_PRESENT.
This seems to only appear if I have both of the controllers installed but not if either is installed without the other.
Kind regards,
CitrioN
I'm getting the following error when I run the demo scene and click on any of the sections such as 'Locomotion':
Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Demo.DemoManager.ActivateDemoZone (Opsive.UltimateCharacterController.Demo.DemoManager+DemoZone demoZone, System.Boolean teleport) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/DemoManager.cs:401)
Opsive.UltimateCharacterController.Demo.DemoManager.Teleport (System.Int32 index) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/DemoManager.cs:461)
Opsive.UltimateCharacterController.Demo.UI.ZoneSelection.LoadZone (System.Int32 index) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/UI/ZoneSelection.cs:218)
Opsive.UltimateCharacterController.Demo.UI.ZoneElement.UnityEngine.EventSystems.IPointerClickHandler.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/UI/ZoneElement.cs:85)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)
I have installed both the UFPS and ThirdPersonController (v3.0.4) assets from the asset store in a fresh project in 2021.3.15f1 which is the latest LTS version at the time of writing this.
Went through all the steps to setup the project by having it add both the layers and input mappings.
I also did add the TextMeshPro essentials from the popup menu.
I checked the code with a break point at that line and the m_PerspectiveToggle is indeed null.
There is also no null check for this in the method above to prevent this from happening.
Scripting defines are THIRD_PERSON_CONTROLLER, FIRST_PERSON_CONTROLLER, TEXTMESH_PRO_PRESENT.
This seems to only appear if I have both of the controllers installed but not if either is installed without the other.
Kind regards,
CitrioN