예제 #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();


        ManifestFromWeb myScript = (ManifestFromWeb)target;


        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Reload"))
        {
            myScript.DownloadWebManifest();
        }

        if (GUILayout.Button("Merge"))
        {
            Utility_ManifestJson manifest = UnityPackageUtility.GetManifest();
            manifest.Add(myScript.m_manifest.dependencies);
            UnityPackageUtility.SetManifest(manifest);
            AssetDatabase.Refresh();
        }
        if (GUILayout.Button("Override"))
        {
            UnityPackageUtility.SetManifest(myScript.m_manifest);
            AssetDatabase.Refresh();
        }
        GUILayout.EndHorizontal();
        UnityPackageEditorDrawer.DrawManifrest(ref myScript.m_manifest, ref myScript.m_toAddName, ref myScript.m_toAddValue, ref myScript.m_scollState, false);
    }
예제 #2
0
    void OnGUI()
    {
        DrawPackageManager();

        m_currentManifest = EditorGUILayout.Foldout(m_currentManifest, "Current manifest");
        if (m_currentManifest)
        {
            UnityPackageEditorDrawer.DrawManifrest(ref m_manifestInfo, ref m_manifestaddNamespace, ref m_manifestaddgitlink, ref scollrPackagePosition);
        }
        EditorGUILayout.HelpBox("Reminder: Git must be install and Git.exe must be add in System Variable Path.", MessageType.Warning, true);
    }
예제 #3
0
    void OnGUI()
    {
        GUILayout.Label("Manifest Configuration", EditorStyles.boldLabel);
        UnityPackageEditorDrawer.DrawManifrest(ref m_info.m_manifestInfo, ref m_info.m_manifestaddNamespace, ref m_info.m_manifestaddgitlink, ref m_info.m_scollValue);
        m_info.m_windowScrollValue = EditorGUILayout.BeginScrollView(m_info.m_windowScrollValue, false, false);
        GUILayout.Label("Copy past gits", EditorStyles.boldLabel);
        EditorGUILayout.HelpBox("Copy/past your git links split by a line return '\\n'", MessageType.Info);
        if (GUILayout.Button("Load in the manifest"))
        {
            string[] lines = m_info.m_pastSeveralLinks.Split('\n');
            for (int i = 0; i < lines.Length; i++)
            {
                string l = lines[i];
                l = l.Trim();
                string nameId;
                bool   found;
                DownloadInfoFromGitServer.LoadNamespaceFromProjectGitLink(l, out found, out nameId);
                if (found)
                {
                    if (l.ToLower().IndexOf(".git") < 0)
                    {
                        l += ".git";
                    }
                    m_info.m_manifestInfo.Add(nameId, l);
                }
            }
            m_info.m_pastSeveralLinks = "";
        }
        GUILayout.BeginHorizontal();
        //https://raw.githubusercontent.com/EloiStree/UnityToolbox/master/CopyPast/GitLinks/TestGroup.md

        List <string> urlsFound;

        if (GUILayout.Button("Extract gits"))
        {
            DownloadInfoFromGitServer.LoadGitClassicGitLinksInUrl(m_info.givenUrlLink, out urlsFound);
            for (int i = 0; i < urlsFound.Count; i++)
            {
                m_info.m_pastSeveralLinks += urlsFound[i].Trim() + '\n';
            }
        }
        m_info.givenUrlLink = GUILayout.TextField(m_info.givenUrlLink);
        GUILayout.EndHorizontal();
        //be.eloistree.teleportvirtualrealityuser
        m_info.m_pastSeveralLinks = GUILayout.TextArea(m_info.m_pastSeveralLinks, GUILayout.MinHeight(200));
        EditorGUILayout.EndScrollView();
    }