示例#1
0
    private void OnGUI()
    {
        if (GUILayout.Button("+ Cube1"))
        {
            //GameObject cube = GameObject.Instantiate(UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>("Assets/A/Prefab/Cube.prefab"));
            cube1.Start("a/prefab/cube", "Assets/A/Prefab/Cube.prefab", (UnityEngine.Object pAsset) =>
            {
                cubeobj = (GameObject)GameObject.Instantiate(pAsset);
                cubeobj.transform.position = new Vector3(0.0f, 0.0f, 0.0f);
            });
        }
        if (GUILayout.Button("+ Sphere1"))
        {
            //GameObject sphere = GameObject.Instantiate(UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>("Assets/A/Prefab/Sphere.prefab"));
            sphere1.Start("a/prefab/sphere", "Assets/A/Prefab/sphere.prefab", (UnityEngine.Object pAsset) =>
            {
                sphereobj = (GameObject)GameObject.Instantiate(pAsset);
                sphereobj.transform.position = new Vector3(0.0f, 2.0f, 0.0f);
            });
        }
        if (GUILayout.Button("- Cube1"))
        {
            cube1.End();
            GameObject.DestroyImmediate(cubeobj, true);
            cubeobj = null;
            Resources.UnloadUnusedAssets();
        }
        if (GUILayout.Button("- Sphere2"))
        {
            sphere1.End();
            GameObject.DestroyImmediate(sphereobj, true);
            sphereobj = null;
            Resources.UnloadUnusedAssets();
        }
        if (GUILayout.Button("GC"))
        {
            Resources.UnloadUnusedAssets();
            GC.Collect();
        }

        if (GUILayout.Button("更新测试"))
        {
            nCurTIme = 0;
            UpdateManager.Instance.CheckVersions();
        }
        if (GUILayout.Button("XXXXXXXX"))
        {
            UpdateManager.Instance.Close("  xxxxxxxx");
        }

        GUILayout.TextField("下载进度: " + UpdateManager.Instance.progress);
        GUILayout.TextField("解压进度: " + ZipUtility.unzipprogress);

        for (int i = 0; i < mmmmLogLost.Count; ++i)
        {
            GUILayout.TextField(mmmmLogLost[i]);
        }
    }