Opticgamer
Member
Hello, when ever I load into my multiplayer scene my camera doesn't attach to my player and I get these errors:
I have no idea why these are happening as my player does have the "Player" tag and I disabled the demo manager. Everything works fine in build so I'm stumped.
Code:
Error: Unable to find the character with the Player tag. The camera will be disabled.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.Camera.CameraController:Awake() (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:198)
Code:
IndexOutOfRangeException: Index was outside the bounds of the array.
Opsive.UltimateCharacterController.Demo.DemoManager.SelectStartingPerspective (System.Boolean firstPersonPerspective, System.Boolean teleport) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/DemoManager.cs:415)
Opsive.UltimateCharacterController.Demo.DemoManager.InitializeCharacter (UnityEngine.GameObject character, System.Boolean selectStartingPerspective, System.Boolean teleport) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/DemoManager.cs:266)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Demo.PunDemoManager.OnPlayerEnteredRoom (Photon.Realtime.Player player, UnityEngine.GameObject character) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Demo/Scripts/PunDemoManager.cs:45)
Opsive.Shared.Events.InvokableAction`2[T1,T2].Invoke (T1 arg1, T2 arg2) (at <e15a7b5bc24b42cc9555a0786a0e2f0f>:0)
Opsive.Shared.Events.EventHandler.ExecuteEvent[T1,T2] (System.String eventName, T1 arg1, T2 arg2) (at <e15a7b5bc24b42cc9555a0786a0e2f0f>:0)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.SpawnManagerBase.SpawnPlayer (Photon.Realtime.Player newPlayer) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/SpawnManagerBase.cs:174)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.SpawnManagerBase.Start () (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/SpawnManagerBase.cs:93)
Code:
Error: There is no look source attached to the character. Ensure the character has a look source attached. For player characters the look source is the Camera Controller, and AI agents use the Local Look Source.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.FirstPersonController.Character.MovementTypes.Combat:GetDeltaYawRotation(Single, Single, Single, Single) (at Assets/Opsive/UltimateCharacterController/Scripts/FirstPersonController/Character/MovementTypes/Combat.cs:32)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotionHandler:GetDeltaYawRotation() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotionHandler.cs:196)
Opsive.UltimateCharacterController.Game.KinematicCharacter:Move(Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:224)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:FixedUpdate() (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:844)
Code:
NullReferenceException: Object reference not set to an instance of an object
Photon.Pun.PhotonView.ResetOwnership () (at Assets/Core/Photon/PhotonUnityNetworking/Code/PhotonView.cs:298)
Photon.Pun.PhotonView.ResetPhotonView (System.Boolean resetOwner) (at Assets/Core/Photon/PhotonUnityNetworking/Code/PhotonView.cs:282)
Photon.Pun.PhotonNetwork.LocalCleanupAnythingInstantiated (System.Boolean destroyInstantiatedGameObjects) (at Assets/Core/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:293)
Photon.Pun.PhotonHandler.OnLeftRoom () (at Assets/Core/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:287)
Photon.Realtime.MatchMakingCallbacksContainer.OnLeftRoom () (at Assets/Core/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3969)
Photon.Realtime.LoadBalancingClient.OnStatusChanged (ExitGames.Client.Photon.StatusCode statusCode) (at Assets/Core/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2846)
ExitGames.Client.Photon.PeerBase+<>c__DisplayClass110_0.<EnqueueStatusCallback>b__0 () (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at <a497a6f18e1f4b419421b940add27a6e>:0)
Photon.Pun.PhotonHandler.Dispatch () (at Assets/Core/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler.FixedUpdate () (at Assets/Core/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)
I have no idea why these are happening as my player does have the "Player" tag and I disabled the demo manager. Everything works fine in build so I'm stumped.