Beispiel #1
0
    protected override void OnGUI()
    {
        if (shouldRefresh)
        {
            Repaint();
        }

        FsmEditorStyles.Init();

        FsmEditorGUILayout.ToolWindowLargeTitle(this, "Photon Setup Wizard");
        GUILayout.Space(_topSpace);
        EditorGUIUtility.LookLikeControls(200);


        // check pun version support
        if (!PlayMakerPhotonEditorUtility.IsPunVersionSupported())
        {
            GUI.color = PlayMakerPhotonEditorUtility.lightOrange;
            GUILayout.Label("WARNING: Photon Network version is newer: " + PhotonNetwork.versionPUN + ". We only support version " + PlayMakerPhotonEditorUtility.supportedPUNVersion + ".\n It is recommended to only use the Photon Network assets provided with PlayMaker, as compatibility issue may be found otherwise.", "box", GUILayout.ExpandWidth(true));
            GUI.color = Color.white;
        }

        bool hasPro = UnityEditorInternal.InternalEditorUtility.HasAdvancedLicenseOnBuildTarget(EditorUserBuildSettings.activeBuildTarget);

        if (!hasPro)
        {
            GUI.color = PlayMakerPhotonEditorUtility.lightOrange;
            GUILayout.Label("WARNING: Photon requires " + EditorUserBuildSettings.activeBuildTarget + " Pro to make an " + EditorUserBuildSettings.activeBuildTarget + " build.", "box", GUILayout.ExpandWidth(true));
            GUI.color = Color.white;
        }

        // custom layout (other parts can be overridden as well)
        //  GUILayout.Label("My Custom Editor");
        base.OnGUI();
    }
Beispiel #2
0
    protected override void OnGUI()
    {
        if (shouldRefresh)
        {
            Repaint();
        }

        FsmEditorStyles.Init();

        FsmEditorGUILayout.ToolWindowLargeTitle(this, "Photon Setup Wizard");
        GUILayout.Space(_topSpace);
#if UNITY_3_5
        EditorGUIUtility.LookLikeControls(200);
#endif

        // check pun version support
        if (!PlayMakerPhotonEditorUtility.IsPunVersionSupported())
        {
            GUI.color = PlayMakerPhotonEditorUtility.lightOrange;
            GUILayout.Label("WARNING: Photon Network version is newer: " + PhotonNetwork.versionPUN + ". We only support version " + PlayMakerPhotonEditorUtility.supportedPUNVersion + ".\n It is recommended to only use the Photon Network assets provided with PlayMaker, as compatibility issue may be found otherwise.", "box", GUILayout.ExpandWidth(true));
            GUI.color = Color.white;
        }



                #if PLAYMAKER_1_9_OR_NEWER
        if (!FsmEditorSettings.UseLegacyNetworking || !FsmEditorSettings.ShowNetworkSync)
        {
            FsmEditorSettings.UseLegacyNetworking = true;
            FsmEditorSettings.ShowNetworkSync     = true;
        }

        // doesn't work, we need to check with PLAYMAKER_LEGACY_NETWORK compile flag
        //EditorStartupPrefs.UseLegacyNetworking = GUILayout.Toggle(EditorStartupPrefs.UseLegacyNetworking,"enabled");

//			#if !PLAYMAKER_LEGACY_NETWORK
//			GUI.color =  PlayMakerPhotonEditorUtility.lightOrange;
//			GUILayout.Label("WARNING: PlayMaker needs to have its network UI system enabled","box",GUILayout.ExpandWidth(true));
//			GUI.color = Color.white;
//
//			if (GUILayout.Button(new GUIContent("Enable PlayMaker Network UI", "Displays the network sync property for Fsm Variables")))
//			{
//				PlayMakerEditorUtils.MountScriptingDefineSymbolToAllTargets("PLAYMAKER_LEGACY_NETWORK");
//			}
//
//			#endif
                #endif

        base.OnGUI();
    }