public List <string> ImportManager(string name) { InspectorPlusManager m = AssetDatabase.LoadAssetAtPath(assetPath + "/" + name + ".asset", typeof(InspectorPlusManager)) as InspectorPlusManager; List <string> ret = new List <string>(); if (m != null) { foreach (string gr in m.groups) { if (!groups.Contains(gr)) { groups.Add(gr); groupOpen.Add(false); } } foreach (InspectorPlusTracker i in m.trackers) { trackers.Add(i); ret.Add(i.name); } } refresh = true; EditorUtility.SetDirty(this); return(ret); }
void OnEnable() { manager = (InspectorPlusManager)AssetDatabase.LoadAssetAtPath(assetPath + "/InspectorPlus.asset", typeof(InspectorPlusManager)); if (manager != null) return; manager = (InspectorPlusManager) CreateInstance(typeof(InspectorPlusManager)); AssetDatabase.CreateAsset(manager, assetPath + "/InspectorPlus.asset"); }
void OnEnable() { manager = (InspectorPlusManager)AssetDatabase.LoadAssetAtPath(assetPath + "/InspectorPlus.asset", typeof(InspectorPlusManager)); if (manager != null) { return; } manager = (InspectorPlusManager)CreateInstance(typeof(InspectorPlusManager)); AssetDatabase.CreateAsset(manager, assetPath + "/InspectorPlus.asset"); }
public void OnEnable () { so = serializedObject; manager = FindObjectOfType (typeof(InspectorPlusManager)) as InspectorPlusManager; if (manager == null) manager = (InspectorPlusManager)AssetDatabase.LoadAssetAtPath (AssetPath + "/InspectorPlus.asset", typeof(InspectorPlusManager)); tracker = manager.GetTracker (target.GetType ().Name); if (tracker != null) { List<InspectorPlusVar> vars = tracker.GetVars(); int count = vars.Count; properties = new SerializedProperty[count]; } }
public void OnEnable() { //TODO: Get manager more efficiently m_manager = FindObjectOfType(typeof(InspectorPlusManager)) as InspectorPlusManager; if (m_manager == null) { m_manager = (InspectorPlusManager)AssetDatabase.LoadAssetAtPath(AssetPath + "/InspectorPlus.asset", typeof(InspectorPlusManager)); } m_tracker = m_manager.GetTracker(target.GetType().Name); if (m_tracker != null) { List <InspectorPlusVar> vars = m_tracker.GetVars(); int count = vars.Count; m_properties = new SerializedProperty[count]; } }
public void OnEnable() { so = serializedObject; manager = FindObjectOfType(typeof(InspectorPlusManager)) as InspectorPlusManager; if (manager == null) { manager = (InspectorPlusManager)AssetDatabase.LoadAssetAtPath(AssetPath + "/InspectorPlus.asset", typeof(InspectorPlusManager)); } tracker = manager.GetTracker(target.GetType().Name); if (tracker != null) { List <InspectorPlusVar> vars = tracker.GetVars(); int count = vars.Count; properties = new SerializedProperty[count]; } }