Exemplo n.º 1
0
 private void OnEnable()
 {
     if (contentsLoadManager == null)
     {
         contentsLoadManager = target as ContentsLoadManager;
     }
     contentsLoadManager.refresh = true;
     EditorApplication.update   += RefreshFindAsset;
 }
Exemplo n.º 2
0
        private static void CreateLoadItem()
        {
            if (GameObject.FindObjectOfType <ContentsLoadManager>() != null)
            {
                return;
            }

            GameObject ContentsManager = new GameObject("ContentsManager");

            ContentsManager.transform.position = Vector3.zero;
            contentsLoadManager                 = ContentsManager.AddComponent <ContentsLoadManager>();
            contentsLoadManager.refresh         = true;
            Selection.activeGameObject          = ContentsManager;
            contentsLoadManager.PreviewMaterial = (Material)Resources.Load("PreviewMaterial");
        }