static public void OpenPrefabTool() { m_labelDefaultFontSize = EditorStyles.label.fontSize; PrefabEditWindow prefabWin = (PrefabEditWindow)EditorWindow.GetWindow <PrefabEditWindow>(false, "PrefabEditWindow", true); prefabWin.autoRepaintOnSceneChange = true; prefabWin.Show(); }
void OnDisable() { instance = null; foreach (PreviewItem item in mItems) { DestroyTexture(item); } Save(); }
void OnEnable() { instance = this; Load(); m_content = new GUIContent(); m_style = new GUIStyle(); m_style.alignment = TextAnchor.MiddleCenter; m_style.padding = new RectOffset(2, 2, 2, 2); m_style.clipping = TextClipping.Clip; m_style.wordWrap = true; m_style.stretchWidth = false; m_style.stretchHeight = false; m_style.normal.textColor = UnityEditor.EditorGUIUtility.isProSkin ? new Color(1f, 1f, 1f, 0.5f) : new Color(0f, 0f, 0f, 0.5f); m_style.normal.background = null; }