private void OnEnable() { if (contentsLoadManager == null) { contentsLoadManager = target as ContentsLoadManager; } contentsLoadManager.refresh = true; EditorApplication.update += RefreshFindAsset; }
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"); }