playMaker

Author Topic: Playmaker Photon Proxy (Photon View) with two Scenes not working  (Read 1401 times)

Badasswurst

  • Playmaker Newbie
  • *
  • Posts: 1
Hello Together

I am facing an issue using multiple Scenes with the Photon Proxy GameObject. As soon as the Scene does change, the console contains the following two errors:

PhotonView ID duplicate found: 1. New: View 1 on PlayMaker Photon Proxy (scene) old: View 1 on PlayMaker Photon Proxy (scene). Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.
UnityEngine.Debug:LogError (object)
Photon.Pun.PhotonNetwork:RegisterPhotonView (Photon.Pun.PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1008)
Photon.Pun.PhotonView:set_ViewID (int) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:319)
Photon.Pun.PhotonView:Awake () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:346)


-> this one is as far as I understand not really crucial. But the other, on the other hand really is:

InvalidOperationException: Duplicate key 1
ExitGames.Client.Photon.NonAllocDictionary`2[K,V].Add (K key, V val) (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/DataTypes.cs:398)
Photon.Pun.PhotonNetwork.RegisterPhotonView (Photon.Pun.PhotonView netView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1019)
Photon.Pun.PhotonView.set_ViewID (System.Int32 value) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:319)
Photon.Pun.PhotonView.Awake () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:346)


Somehow there is code mentioned on a D:/Dev drive, even though I am working on a Mac?! I do not know how to fix that. PUN 2 actions within the second Scene (where the errors appear) are not executed.

FYI: I've already looked at the following topics (https://forum.photonengine.com/discussion/18499/invalidoperationexception-duplicate-key-1-crash-at-registerphotonview and https://hutonggames.com/playmakerforum/index.php?topic=23502.0), but I didn't really get the clue how to fix the error. I already tried with the singleton ecosystem package and added it to the proxy GameObject, but that try was also not working.

Thanks in advance.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Playmaker Photon Proxy (Photon View) with two Scenes not working
« Reply #1 on: January 13, 2022, 10:00:42 AM »
Hi.
I never used Photon yet, But you might want to join Playmaker Discord Channel.
There are several people using Photon that might be able to help.