Beispiel #1
0
 public void SetupEditorWindow()
 {
     settings         = Resources.Load <MobiledgeXSettings>("MobiledgeXSettings");
     mobiledgeXEditor = MobiledgeXEditorWindow.CreateInstance <MobiledgeXEditorWindow>();
     integration      = new MobiledgeXIntegration();
     mobiledgeXEditor.ShowPopup();
 }
 private void Awake()
 {
     settings            = (MobiledgeXSettings)Resources.Load("MobiledgeXSettings", typeof(MobiledgeXSettings));
     settings.sdkVersion = GetSDKVersion();
     sdkVersion          = settings.sdkVersion;
     if (PlayerSettings.iOS.locationUsageDescription.Length < 1)
     {
         SetUpLocationSettings();
     }
     if (!editorPopUp && settings.orgName.Length < 1)
     {
         if (!EditorUtility.DisplayDialog("MobiledgeX",
                                          "Do you have MobiledgeX Account?", "Yes/Will create later", "I want to create one"))
         {
             if (EditorUtility.DisplayDialog("MobiledgeX",
                                             "How would you like to connect with us?", "Discord", "Schedule an Meeting"))
             {
                 Application.OpenURL("https://discord.gg/k22WcfMFZ3");
             }
             else
             {
                 Application.OpenURL("https://developers.mobiledgex.com/getting-started");
             }
         }
         else
         {
             Enhancement.SDKInstalled(getId(), Application.unityVersion);
             editorPopUp = true;
         }
     }
 }
 /// <summary>
 /// Load Resources to be used in OnGUI
 /// </summary>
 private void Init()
 {
     settings    = Resources.Load <MobiledgeXSettings>("MobiledgeXSettings");
     mexLogo     = Resources.Load("mobiledgexLogo") as Texture2D;
     headerStyle = new GUIStyle();
     headerStyle.normal.background = MakeTex(20, 20, new Color(0.4f, 0.4f, 0.4f));
     labelStyle = new GUIStyle(GUI.skin.label);
     labelStyle.normal.textColor = Color.white;
     sdkVersionStyle             = new GUIStyle(GUI.skin.label);
     sdkVersionStyle.alignment   = TextAnchor.UpperRight;
 }
 public static void ShowSettings()
 {
     settings          = (MobiledgeXSettings)Resources.Load("MobiledgeXSettings", typeof(MobiledgeXSettings));
     Selection.objects = new UnityEngine.Object[] { settings };
     EditorGUIUtility.PingObject(settings);
 }