VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
static void AVR.UEditor.Core.AVR_HookableWizard< T >.ShowWindow ( GameObject  _targetObject,
string  windowName = "Wizard" 
)
inlinestatic

Definition at line 45 of file AVR_HookableWizard.cs.

46  {
47  registered_hooks.Clear();
48  targetObject = _targetObject;
49 
50  // Get all classes that inherit from ModuleWizard_Hook
51  List<System.Type> hook_classes = System.AppDomain.CurrentDomain.GetAssemblies().SelectMany(assembly => assembly.GetTypes()).Where(type => type.IsSubclassOf(typeof(AVR_WizardHook<T>))).ToList();
52 
53  foreach (System.Type hook in hook_classes) {
54  // Don't register abstract hooks.
55  if(hook.IsAbstract) continue;
56 
57  AVR_WizardHook<T> o = (AVR_WizardHook<T>)System.Activator.CreateInstance(hook);
58 
59  registered_hooks.Add(o);
60  o.on_create_wizard(targetObject);
61  }
62 
63  registered_hooks.Sort((a, b) => a.category.CompareTo(b.category));
64 
65  EditorWindow.GetWindow(typeof(T), true, windowName);
66  }