PhotonView + DontDestoryOnLoad

Options
I have a character which I instantiate with PhotonNetwork.Instantiate function. Then in the Awake() function of my character I call DontDestroyOnLoad(gameObject). However it gets destroyed anyway after scene changing. Is there a way I can save an object with PhotonView attached? Thank you!

Comments

  • Hi @FoxyShadow,

    can you confirm, that DontDestroyOnLoad actually gets called? You can easily check this by adding some Debug.Log calls before and / or after the DontDestroyOnLoad call for example. If it doesn't get called, try using the OnPhotonInstantiate instead of the Awake function.