示例#1
0
        private void DrawWarnings()
        {
            EditorGUILayout.LabelField("Warnings", EditorStyles.boldLabel);

            // Check Android Status
            if (!EstimoteUnityEditorUtils.CheckAndroidStatus())
            {
                EditorGUILayout.Space();
                GUI.color = Color.red;
                EditorGUILayout.HelpBox("Android setup is not complete!" +
                                        " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info);
                GUI.color = Color.white;
            }

            // Check iOS Status
            if (!EstimoteUnityEditorUtils.CheckIOSStatus())
            {
                EditorGUILayout.Space();
                GUI.color = Color.red;
                EditorGUILayout.HelpBox("iOS setup is not complete!" +
                                        " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info);
                GUI.color = Color.white;
            }

            // Show Button
            if (!EstimoteUnityEditorUtils.CheckAndroidStatus() || !EstimoteUnityEditorUtils.CheckIOSStatus())
            {
                EditorGUILayout.Space();
                if (GUILayout.Button("Open Estimote Unity Setup"))
                {
                    EstimoteUnityEditorSetup.OpenWindow();
                }
            }
        }
示例#2
0
        private void DrawWarnings()
        {
            bool hasWarning = !EstimoteUnityEditorUtils.CheckAndroidStatus() || !EstimoteUnityEditorUtils.CheckIOSStatus();

            if (hasWarning)
            {
                GUI.color = Color.red;
            }
            if (GUILayout.Button("Warnings", EditorStyles.toolbarButton))
            {
                mExpandWarnings = !mExpandWarnings;
            }
            GUI.color = Color.white;

            if (mExpandWarnings)
            {
                GUILayout.BeginVertical("box");

                if (!hasWarning)
                {
                    EditorGUILayout.HelpBox("No warnings to show.", MessageType.Info);
                }

                // Check Android Status
                if (!EstimoteUnityEditorUtils.CheckAndroidStatus())
                {
                    EditorGUILayout.Space();
                    GUI.color = Color.red;
                    EditorGUILayout.HelpBox("Android setup is not complete!" +
                                            " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info);
                    GUI.color = Color.white;
                }

                // Check iOS Status
                if (!EstimoteUnityEditorUtils.CheckIOSStatus())
                {
                    EditorGUILayout.Space();
                    GUI.color = Color.red;
                    EditorGUILayout.HelpBox("iOS setup is not complete!" +
                                            " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info);
                    GUI.color = Color.white;
                }

                // Show Button
                if (!EstimoteUnityEditorUtils.CheckAndroidStatus() || !EstimoteUnityEditorUtils.CheckIOSStatus())
                {
                    EditorGUILayout.Space();
                    if (GUILayout.Button("Open Estimote Unity Setup"))
                    {
                        EstimoteUnityEditorSetup.OpenWindow();
                    }
                }

                GUILayout.EndVertical();
            }
        }
        private void SaveAARIntoProject()
        {
            EditorUtility.ClearProgressBar();

            string filePath = EstimoteUnityEditorUtils.GetAndroidEstimoteFrameworkPath();

            File.WriteAllBytes(filePath, mDownloadedBytes);
            AssetDatabase.Refresh();

            EditorUtility.DisplayDialog("Done!", "The Estimote SDK AAR file has been added into your project.", "OK");
        }
        private void DrawAndroidSetup()
        {
            GUILayout.Label("Android Setup", EditorStyles.boldLabel);
            bool androidStatus = EstimoteUnityEditorUtils.CheckAndroidStatus();

            GUI.color = (androidStatus == true ? Color.green : Color.red);
            GUILayout.Label("Status: " + (androidStatus == true ? "Complete" : "Incomplete"));
            GUI.color = Color.white;

            if (GUILayout.Button(androidStatus == true ? "Redownload Estimote AAR" : "Download Estimote AAR"))
            {
                DownloadEstimoteAAR();
            }
        }
        private void DrawIOSSetup()
        {
            GUILayout.Label("iOS Setup", EditorStyles.boldLabel);
            //			mIOSFramworkURL = EditorGUILayout.TextField ("Estimote Framework URL:", mIOSFramworkURL);
            bool iOSStatus = EstimoteUnityEditorUtils.CheckIOSStatus();

            GUI.color = (iOSStatus == true ? Color.green : Color.red);
            GUILayout.Label("Status: " + (iOSStatus == true ? "Complete" : "Incomplete"));
            GUI.color = Color.white;

            EditorGUILayout.HelpBox("Once you have downloaded the archive, extract it and place the" +
                                    " EstimoteSDK.framework inside your Unity project at EstimoteUnity/Plugins/iOS/. The" +
                                    " status message above will turn green once completed correctly.", MessageType.Info);

            if (GUILayout.Button("Open Estimote Github"))
            {
                OpenIOSEstimoteGithub();
            }
        }