Example #1
0
        public static VersionInfo UpdateVersion(string versionSourcePath)
        {
            //Debug.Log("UpdateVersion "+versionSourcePath);
            string versionText = Utils.GetFileContents(versionSourcePath);

            if (versionText != null)
            {
                Hashtable _version = (Hashtable)JSON.JsonDecode(versionText);
                int       Major    = (int)_version["Major"];
                int       Minor    = (int)_version["Minor"];
                int       Patch    = (int)_version["Patch"];
                int       Build    = (int)_version["Build"];

                VersionInfo.VersionType Type = VersionInfo.GetVersionTypeFromString((string)_version["Type"]);

                                #if AUTHORING
                Build++;
                _version["Build"] = Build;
                Utils.PutFileContents(versionSourcePath, JSON.JsonEncode(_version));
                                #endif
                return(new VersionInfo(Major, Minor, Patch, Type, Build));
            }
            else
            {
                Debug.LogError("UpdateVersion Could not find " + versionSourcePath);
            }

            return(new VersionInfo());
        }
Example #2
0
        void DrawMarkDownInspector()
        {
            GUI.enabled = true;
            if (_markdownGui == null)
            {
                _markdownGui = new MarkdownGUI();
                _markdownGui.ProcessSource
                (
                    Utils.GetFileContents
                    (
                        AssetDatabase.GetAssetPath(target)
                    )
                );
                _markdownGui.ProcessSource
                (
                    Utils.GetFileContents
                    (
                        AssetDatabase.GetAssetPath(target)
                    )
                );
            }

            _scroll = GUILayout.BeginScrollView(_scroll);

            if (_markdownGui.OnGUILayout_MardkDownTextArea())
            {
                //Debug.Log("hello");
                Repaint();
            }

            GUILayout.EndScrollView();
        }