public void CreateRegistry()
 {
     if (WatchRegistry == null)
     {
         WatchRegistry = WatchRegistryContainer.CreateInstance <WatchRegistryContainer>();
     }
 }
Exemplo n.º 2
0
 public override void OnInspectorGUI()
 {
     serializedObject.Update();
     if (GUILayout.Button("Open watch list"))
     {
         var window = UnityEditor.EditorWindow.CreateWindow <DebugWatcher>();
         if (WatchRegistryProp.objectReferenceValue == null)
         {
             WatchRegistryProp.objectReferenceValue = WatchRegistryContainer.CreateInstance <WatchRegistryContainer>();
         }
         var ctn = WatchRegistryProp.objectReferenceValue as WatchRegistryContainer;
         window.Init(ctn.WatchRegistry);
         window.Show();
     }
     EditorGUILayout.PropertyField(WatchRegistryProp);
     serializedObject.ApplyModifiedProperties();
 }