-
Notifications
You must be signed in to change notification settings - Fork 16
I added more options to PhotonVRManager I might change some scripts later but this is what I got. #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I am adding some stuff to PhotonVRManager. |
I also also ALSO added a TMP that you can assign and it will say what's going on. [Tooltip("Basically a tmp that says what PhotonVRManager is doing.")]
public static TextMeshPro LogText; if (Manager == null)
{
Manager = this;
Manager.State = ConnectionState.Setting_Up_Settings;
LogText.text = "Setting Up Settings..."; //Here
PhotonNetwork.PhotonServerSettings.DevRegion = DevRegion;
}
else if (StartInOfflineMode == true)
{
PhotonNetwork.PhotonServerSettings.StartInOfflineMode = true;
}
else if (StartInOfflineMode == false)
{
PhotonNetwork.PhotonServerSettings.StartInOfflineMode = false;
}
else
{
Debug.LogError("There can't be multiple PhotonVRManagers in a scene");
Manager.State = ConnectionState.Error;
LogText.text = "ERROR: There can't be multiple PhotonVRManagers in a scene."; //Also here
Application.Quit();
} |
@@ -271,13 +226,36 @@ public static void SetCosmetics(Dictionary<string, string> PlayerCosmetics) | |||
/// Sets a specefic cosmetic | |||
/// </summary> | |||
/// <param name="Type">The type of cosmetic you want to set</param> | |||
public static void SetCosmetic(string Type, string CosmeticId) | |||
public static void SetCosmetic(CosmeticType Type, string CosmeticId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this entire function should never have been changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that was bc I changed photon vr version 0.0.5 or 0.0.4
@@ -421,6 +407,10 @@ public enum ConnectionState | |||
Connecting, | |||
Connected, | |||
JoiningRoom, | |||
InRoom | |||
InRoom, | |||
Error, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the cases under the error case are just not needed
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.
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.
I also also added more connection states for more debugging.
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.