Photon.Pun.Simple.Internal.TickManager have null

Is this a bug?
I got null reference error at installation.

using win10
unity 2020.2
pun 2.25
photon lib 4.1.4.7

Does anyone have a solution?

Best Answers

  • emotitron
    emotitron ✭✭✭
    Answer ✓
    There is a fix that may not be live in the asset store yet, that may address this problem with Unity Beta versions. In TickManager:
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
    public static void Bootstrap()
    {
    	single = new TickManager();
    	PhotonNetwork.NetworkingClient.AddCallbackTarget(single);
    }
    

    The change to RuntimeInitializeLoadType.AfterSceneLoad has helped someone else experiencing this race condition.
  • hayato
    hayato
    Answer ✓
    Thank you for your help.

    As of now, the error is gone with the above mentioned solution!

Answers

  • http://ul.to/h66p2wyo

    I forgot to attach the image.
    Please let me know if you have any necessary information.
  • Be sure to get the latest, we made some quick patches after adding Simple. Current pun2 is 2.26

    Let us know if there problem persists.

  • I get the same error as before.

    Unity2020.2.0b14,
    Unity2020.2.0b13,
    2D,3D,URP
    I tried these, but not all.

    Unity2020.1.17f1
    This works fine.

    There is an error, even if it is empty, Same for demo.
    Is this just my environment?
  • emotitron
    emotitron ✭✭✭
    Answer ✓
    There is a fix that may not be live in the asset store yet, that may address this problem with Unity Beta versions. In TickManager:
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
    public static void Bootstrap()
    {
    	single = new TickManager();
    	PhotonNetwork.NetworkingClient.AddCallbackTarget(single);
    }
    

    The change to RuntimeInitializeLoadType.AfterSceneLoad has helped someone else experiencing this race condition.
  • hayato
    hayato
    Answer ✓
    Thank you for your help.

    As of now, the error is gone with the above mentioned solution!
  • Skittluier
    edited March 2021
    @Tobias This is a valid issue. We've had this issue as well with Photon. Hope this helps development!

    Hereby our information:

    Photon version: 2.25
    Photon library: 4.1.4.7
    Unity version: 2020.1.11f1
    Windows build client: That's correct!
    Dev mode: Yes.
    Scripting back-end: IL2CPP
    API compatibility level: .NET Standard 2.0