DaboMonser
New member
Hello opsive forum,
I have placed the opsive character, Game, Main Camera game objects into the scene "A", every game object has a "Dont Destroy On Load" script on it.
Now after the first change from scene "A" to scene "B" everything works, then after re-entering scene "A" from scene "B" everything works as well. But after entering the scene "B" from scene "A" a second time the player can control the TPS character, only the TPS camera is not rotatable anymore.
Then these following errors are displayed in the console:
Question: How can I fix this?
I have placed the opsive character, Game, Main Camera game objects into the scene "A", every game object has a "Dont Destroy On Load" script on it.
Now after the first change from scene "A" to scene "B" everything works, then after re-entering scene "A" from scene "B" everything works as well. But after entering the scene "B" from scene "A" a second time the player can control the TPS character, only the TPS camera is not rotatable anymore.
Then these following errors are displayed in the console:
- NullReferenceException: Object reference not set to an instance of an object
- Opsive.UltimateCharacterController.Game.DeterministicObjectManager.SetCameraRotationInternal (Int32 cameraIndex, Quaternion rotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:532)
- Opsive.UltimateCharacterController.Game.DeterministicObjectManager.SetCameraRotation (Int32 cameraIndex, Quaternion rotation) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:522)
- Opsive.UltimateCharacterController.Camera.CameraController.PositionImmediately () (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:855)
- Opsive.UltimateCharacterController.Camera.CameraController.OnImmediateTransformChange (Boolean snapAnimator) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:869)
- Opsive.UltimateCharacterController.Events.InvokableAction`1[System.Boolean].Invoke (Boolean arg1) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/InvokableAction.cs:87)
- Opsive.UltimateCharacterController.Events.EventHandler.ExecuteEvent[Boolean] (System.Object obj, System.String eventName, Boolean arg1) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/EventHandler.cs:392)
- Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.OnEnable () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:566)
- NullReferenceException: Object reference not set to an instance of an object
- Opsive.UltimateCharacterController.Game.DeterministicObjectManager.SetCameraLookVectorInternal (Int32 cameraIndex, Vector2 lookVector) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:492)
- Opsive.UltimateCharacterController.Game.DeterministicObjectManager.SetCameraLookVector (Int32 cameraIndex, Vector2 lookVector) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:482)
- Opsive.UltimateCharacterController.Camera.CameraControllerHandler.FixedUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraControllerHandler.cs:130)
- NullReferenceException: Object reference not set to an instance of an object
- Opsive.UltimateCharacterController.Game.DeterministicObjectManager.SetCameraLookVectorInternal (Int32 cameraIndex, Vector2 lookVector) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:492)
- Opsive.UltimateCharacterController.Game.DeterministicObjectManager.SetCameraLookVector (Int32 cameraIndex, Vector2 lookVector) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/DeterministicObjectManager.cs:482)
- Opsive.UltimateCharacterController.Camera.CameraControllerHandler.OnDisable () (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraControllerHandler.cs:92)
Question: How can I fix this?
Last edited: