VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
AVR_Component_EventsWizard.cs
1 using UnityEditor;
2 using UnityEngine;
3 
4 using AVR.Core;
5 
6 namespace AVR.UEditor.Core {
7  public class AVR_Component_EventsWizard : ScriptableWizard
8  {
10 
11  public UnityEngine.Events.UnityEvent onAwake = new UnityEngine.Events.UnityEvent();
12  public UnityEngine.Events.UnityEvent onStart = new UnityEngine.Events.UnityEvent();
13  public UnityEngine.Events.UnityEvent onEnable = new UnityEngine.Events.UnityEvent();
14  public UnityEngine.Events.UnityEvent onDisable = new UnityEngine.Events.UnityEvent();
15 
16  public static void CreateWizard(AVR_Component component)
17  {
18  AVR_Component_EventsWizard wiz = ScriptableWizard.DisplayWizard<AVR_Component_EventsWizard>("AVR_Component Event Settings", "Apply");
19  wiz.component = component;
20 
21  wiz.onAwake = component.onAwake;
22  wiz.onStart = component.onStart;
23  wiz.onEnable = component.onEnable;
24  wiz.onDisable = component.onDisable;
25  }
26 
27  // Called when Apply-Button is pressed
29  {
30  component.onAwake = onAwake;
31  component.onStart = onStart;
32  component.onEnable = onEnable;
33  component.onDisable = onDisable;
34 
35  UnityEditor.EditorUtility.SetDirty(component);
36 
37  }
38 
40  {
41  helpString = "Set custom Events for this object.";
42 
43  errorString = "";
44 
45  }
46  }
47 }
static void CreateWizard(AVR_Component component)
Base class for all arc-vr components. A component is typically a Monobehaviour that represents a virt...