VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
override void AVR.UEditor.Core.AVR_ControllerWizard_Hook_ControllerVisual.on_create_wizard ( GameObject  targetObject)
inlinevirtual

Reimplemented from AVR.UEditor.Core.AVR_WizardHook< Wiz >.

Definition at line 26 of file AVR_Controller_ModuleWizard.cs.

27  {
28  base.on_create_wizard(targetObject);
29 
30  // We can't really know what type of visual is attatched atm, so we make an educated guess based on the objects name.
31  if (_module.Length > 0)
32  {
33  string name = _module[0].gameObject.name;
34  if (name.IndexOf("vive", System.StringComparison.OrdinalIgnoreCase) >= 0) type = visualType.ViveController;
35  else if (name.IndexOf("cube", System.StringComparison.OrdinalIgnoreCase) >= 0) type = visualType.Cube;
36  else if (name.IndexOf("sphere", System.StringComparison.OrdinalIgnoreCase) >= 0) type = visualType.Sphere;
37  }
38 
39  old_type = type;
40  }