Player joins in the same room, but no players can see each other. 2nd Player can't shoot Projectiles.

I seem to be having trouble getting a 2nd instance to join an existing room, where the room gets created just fine and the first player spawns and works fully, with the 2nd instance it states that it is joining an existing room but when the scene loads I can't see the 1st Player only the 2nd Player (the 1st instance can't see the 2nd Player either) and the Player falls through the floor at first, then when it respawns it gets stuck in a wall and none of the weapons want to shoot but I can turn and change weapons. This is in the build, running the 2nd instance in the editor, the room is found and joined but the 2nd Player never even gets spawned and I dont see any errors or warnings that could relate to the issue.(edited)

UPDATE 1:

Ok using the Spawn Point mode for Player Prefab spawns as well as moving them to a bit more open placement (no colliders interfering), I can get my 2nd player to spawn correctly now without falling through the floor or getting stuck in the floor. However, neither player can see eachother still and the second player can't shoot any projectiles even though I hear the weapons trying to fire, everything works fine for the player that started the game (except for the 2 players that can't see each other)

UPDATE 2:

Ok, I'm using the Pun Demo Manager script now as well in order to get as close to the DemoRoom's setup as possible, I am just using one Demo Trigger Zone however and one trigger box on my main Arena. But the problem still persists, neither player can see each other and the 2nd Player can't shoot any projectiles even though the weapons are audibly trying to fire.

I also have all of my projectiles set up via the Opsive PUN Object setup and added to the PUN Object Pool. As well as all of my spawned effects have Photon View components and added to the PUN Object Pool.
 
Does the demo scene work correctly? Does SpawnManagerBase.SpawnPlayer get called?
 
@Justin Yes the Demo Scene works perfectly fine.

I will double check SpawnManagerBase.SpawnPlayer but I am pretty sure it gets called as both players still each get their own player spawned, they just can't see each other (even though they are apparently in the same room) and the 2nd Player can't shoot any projectiles at all (even though the guns are audibly trying to shoot), my Sword still works on the 2nd Player and spawns my Trail object.
 
Hmm, I haven't seen that occur before. If you use the PunNolan prefab in your scene does it work? This will narrow down if it's a scene or a character issue.
 
No, I just tried with the PunNolan Prefab and I have the exact same issues. So I don't think its my Player's setup.

This is the only Error I get with the PunNolan Prefab (which keeps repeating indefinetly on both the main project and the Clone, I am using ParrelSync):

ArgumentException: Input Axis is not setup.
To change the input settings use: Edit -> Settings -> Input
Opsive.Shared.Input.StandaloneInput.GetAxisRaw (System.String name) (at Assets/Opsive/Shared/Input/StandaloneInput.cs:80)
Opsive.Shared.Input.UnityInput.GetButtonDownInternal (System.String name) (at Assets/Opsive/Shared/Input/UnityInput.cs:207)
Opsive.Shared.Input.PlayerInput.GetButtonDown (System.String name) (at Assets/Opsive/Shared/Input/PlayerInput.cs:155)
Opsive.UltimateCharacterController.Camera.CameraControllerHandler.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraControllerHandler.cs:105)

UPDATE: The above error is fixed by using the Rewired Input component on the Player instead of the Unity Input component and it doesnt affect my current issues in any way.
 
Last edited:
Just confirmed that it's something in my scene, cause I just used my Player in the DemoRoom scene and both players can see each other now.

The question is what could be the possible culprit?
 
I've set everything that I could find to the same settings and setup as the DemoRoom (except for my Camera and my Character being TopDown Perspective instead of Adventure) and I am still getting the same issues.

And I am also getting the following error on both player's during playing:

Error: Unable to find the view type with name Opsive.UltimateCharacterController.ThirdPersonController.Camera.ViewTypes.Adventure.
UnityEngine.Debug:LogError (object)
Opsive.UltimateCharacterController.Camera.CameraController:SetViewType (System.Type,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:300)
Opsive.UltimateCharacterController.Camera.CameraController:SetViewType (string) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:280)
Opsive.UltimateCharacterController.Camera.CameraController:set_ThirdPersonViewTypeFullName (string) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:141)
Opsive.UltimateCharacterController.Demo.DemoManager:SelectStartingPerspective (bool,bool) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/DemoManager.cs:472)
Opsive.UltimateCharacterController.Demo.DemoManager:InitializeCharacter (UnityEngine.GameObject,bool,bool) (at Assets/Opsive/UltimateCharacterController/Demo/Scripts/DemoManager.cs:276)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Demo.PunDemoManager_OPB:OnPlayerEnteredRoom (Photon.Realtime.Player,UnityEngine.GameObject) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Demo/Scripts/PunDemoManager_OPB.cs:45)
Opsive.Shared.Events.InvokableAction`2<Photon.Realtime.Player, UnityEngine.GameObject>:Invoke (Photon.Realtime.Player,UnityEngine.GameObject)
Opsive.Shared.Events.EventHandler:ExecuteEvent<Photon.Realtime.Player, UnityEngine.GameObject> (string,Photon.Realtime.Player,UnityEngine.GameObject)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.SpawnManagerBase:SpawnPlayer (Photon.Realtime.Player) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/SpawnManagerBase.cs:176)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.SpawnManagerBase:Start () (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/SpawnManagerBase.cs:95)

This above error disappears however if I change the first bool in the InitializeCharacter method in the PunDemoManager script to false instead of true, but it doesnt fix the issues that I am sitting with. And then when I Un-Play the Players I get the following 2 errors on the First Main Editor/Player not on the Clone at all:

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.Utility.UnityEngineUtility.SizeSprite (UnityEngine.Sprite sprite, UnityEngine.RectTransform spriteRectTransform) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/UnityEngineUtility.cs:106)
Opsive.UltimateCharacterController.UI.SlotItemMonitor.OnEquipItem (Opsive.UltimateCharacterController.Items.Item item, System.Int32 slotID) (at Assets/Opsive/UltimateCharacterController/Scripts/UI/SlotItemMonitor.cs:123)
Opsive.UltimateCharacterController.UI.SlotItemMonitor.OnAttachCharacter (UnityEngine.GameObject character) (at Assets/Opsive/UltimateCharacterController/Scripts/UI/SlotItemMonitor.cs:84)
Opsive.UltimateCharacterController.UI.CharacterMonitor.Awake () (at Assets/Opsive/UltimateCharacterController/Scripts/UI/CharacterMonitor.cs:43)
Opsive.UltimateCharacterController.UI.SlotItemMonitor.Awake () (at Assets/Opsive/UltimateCharacterController/Scripts/UI/SlotItemMonitor.cs:47)
UnityEngine.Object:Instantiate(GameObject, Vector3, Quaternion)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.SpawnManagerBase:SpawnPlayer(Player) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/SpawnManagerBase.cs:142)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.SpawnManagerBase:OnPlayerEnteredRoom(Player) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/SpawnManagerBase.cs:212)
Photon.Realtime.InRoomCallbacksContainer:OnPlayerEnteredRoom(Player) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:4226)
Photon.Realtime.LoadBalancingClient:OnEvent(EventData) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3215)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer) (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PeerBase.cs:898)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/EnetPeer.cs:563)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PhotonPeer.cs:1863)
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:221)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:147)

&

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.UI.SlotItemMonitor.ResetMonitor () (at Assets/Opsive/UltimateCharacterController/Scripts/UI/SlotItemMonitor.cs:260)
Opsive.UltimateCharacterController.UI.SlotItemMonitor.OnAttachCharacter (UnityEngine.GameObject character) (at Assets/Opsive/UltimateCharacterController/Scripts/UI/SlotItemMonitor.cs:67)
Opsive.UltimateCharacterController.UI.CharacterMonitor.OnDestroy () (at Assets/Opsive/UltimateCharacterController/Scripts/UI/CharacterMonitor.cs:131)

Another strange thing that I noticed that the First Editor/Player only ever gets the initial/own player spawned and no additional player. While the 2nd Editor Clone/Player spawns both Players in the Scene Hierarchy but the only the main one for the 2nd player spawns in the level where it should, while the 1st instance's player gets spawned at the 0 point in mid-air but doesn't fall.
 
All of those errors are definitely going to cause problems. Take a look at the first error and fix that, then fix any subsequent errors. On your first error it looks like you changed one of the CameraControllerHandler inputs to the name "Input" which doesn't exist in your mapping.
 
Ok, I moved my entire scene and spawn points in line with the 0,0,0 position and childed my Spawn Points under my one Demo Trigger Zone and that seems to have solved basically all of the above issues. Both Players spawn in both instances now and can see each other.

However, the 2nd Player/Instance is severely out of sync, none of the projectiles fire immediately and items don't keep in sync in the 2nd instance when getting destroyed or spawned. This isn't a problem at all in the 1st instance however.
 
Top