PhotonVR icon indicating copy to clipboard operation
PhotonVR copied to clipboard

I added more options to PhotonVRManager I might change some scripts later but this is what I got.

Open TMTimeVR opened this issue 6 months ago • 2 comments

Disclaimer

Fchb1239 please check my code if it works. I'm not perfect at coding.

There might be some bugs in the code. Please have mercy with me.

I tested it in my game and it worked.

I only edited PhotonVRManager so just copy and paste this into your PhotonVRManager.

Stuff I added

I added a dev region choice. Meaning if your apk is a development build, it's going to connect to the dev region.

        [Tooltip("The region that people connect to if the apk is a development build (check your build settings).")]
        public string DevRegion = "";

I also added a Offline mode bool. Meaning that it simulates an online connection. PUN can be used as if it was in an online connection.

        [Tooltip("Simulates an online connection.\nPUN can be used as usual.")]
        public bool StartInOfflineMode = false;

I also also added more connection states for more debugging.

    public enum ConnectionState
    {
        Disconnected,
        Connecting,
        Connected,
        JoiningRoom,
        InRoom,
        Error,
        Generating_Roomcode,
        Switching_Scenes,
        Setting_Up_Settings
    }

I just basically made it more easy so you don't have to go manually into the Photon server settings and just be able to control Photon from one script.

TMTimeVR avatar Sep 01 '24 14:09 TMTimeVR