Пример #1
0
        private static string GetPluginVersion()
        {
            string version = "Unknown";

            try
            {
#if UNITY_EDITOR_WIN
                version = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Native.GetPluginVersion());
#elif UNITY_EDITOR_OSX
                version = Native.AVPGetVersion();
#endif
            }
            catch (System.DllNotFoundException e)
            {
                Debug.LogError("[AVProVideo] Failed to load DLL. " + e.Message);
            }
            return(version);
        }
Пример #2
0
        private static string GetPluginVersion()
        {
            string version = "Unknown";

            try
            {
#if UNITY_EDITOR_WIN
                version = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Native.GetPluginVersion());
#elif UNITY_EDITOR_OSX
                version = Native.AVPGetVersion();
#endif
            }
            catch (System.DllNotFoundException e)
            {
                Debug.LogError("[AVProVideo] Failed to load DLL. " + e.Message);
#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
#if !UNITY_5 && !UNITY_5_4_OR_NEWER
                Debug.LogError("[AVProVideo] You may need to copy the Audio360 DLL into the root folder of your project (the folder above Assets)");
#endif
#endif
            }
            return(version);
        }
Пример #3
0
        private void OnInspectorGUI_About()
        {
            //GUILayout.Space(8f);

            GUI.color           = Color.white;
            GUI.backgroundColor = Color.clear;
            if (_expandAbout)
            {
                GUI.color           = Color.white;
                GUI.backgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.1f);
                if (EditorGUIUtility.isProSkin)
                {
                    GUI.backgroundColor = Color.black;
                }
            }
            GUILayout.BeginVertical("box");
            GUI.backgroundColor = Color.white;
            if (GUILayout.Button("About", EditorStyles.toolbarButton))
            {
                _expandAbout = !_expandAbout;
            }
            GUI.color = Color.white;

            if (_expandAbout)
            {
                string version = "Unknown";
#if UNITY_EDITOR_WIN
                version = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Native.GetPluginVersion());
#elif UNITY_EDITOR_OSX
                version = Native.AVPGetVersion();
#endif

                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (_icon == null)
                {
                    _icon = Resources.Load <Texture2D>("AVProVideoIcon");
                }
                if (_icon != null)
                {
                    GUILayout.Label(new GUIContent(_icon));
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                GUI.color = Color.yellow;
                GUILayout.Label("AVPro Video by RenderHeads Ltd", EditorStyles.boldLabel);
                GUI.color = Color.white;
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                GUI.color = Color.yellow;
                GUILayout.Label("version " + version + " (scripts v" + Helper.ScriptVersion + ")");
                GUI.color = Color.white;
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();



                GUILayout.Space(8f);
                GUI.backgroundColor = Color.white;

                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("User Manual", GUILayout.ExpandWidth(false)))
                {
                    Application.OpenURL(LinkUserManual);
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Scripting Class Reference", GUILayout.ExpandWidth(false)))
                {
                    Application.OpenURL(LinkScriptingClassReference);
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();


                GUILayout.Space(8f);


                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Plugin Website", GUILayout.ExpandWidth(false)))
                {
                    Application.OpenURL(LinkPluginWebsite);
                }
                if (GUILayout.Button("Asset Store Page", GUILayout.ExpandWidth(false)))
                {
                    Application.OpenURL(LinkAssetStorePage);
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();

                GUILayout.Space(8f);

                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Unity Forum Page", GUILayout.ExpandWidth(false)))
                {
                    Application.OpenURL(LinkForumPage);
                }
                if (GUILayout.Button("Email Support", GUILayout.ExpandWidth(false)))
                {
                    Application.OpenURL(LinkEmailSupport);
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();

                GUILayout.Space(8f);

                EditorGUILayout.LabelField("Bug Reporting", EditorStyles.boldLabel);

                EditorGUILayout.SelectableLabel(SupportMessage, EditorStyles.wordWrappedLabel, GUILayout.Height(300f));
            }

            EditorGUILayout.EndVertical();
        }