public void OnEnable() { this.me = (ProjectorMount)base.target; this.brain = null; this.targetProperty = serializedObject.FindProperty("target"); this.gizmosProperty = serializedObject.FindProperty("gizmos"); }
public static void BrainInHierarchy(Transform transform, ref ProjectorBrain brain) { if (brain == null || brain.transform.hasChanged) { brain = transform.GetComponentInParent <ProjectorBrain>(); } }
public void OnEnable() { this.me = (ProjectorEmitter)base.target; this.brain = null; this.editor = null; this.configurationProperty = serializedObject.FindProperty("configuration"); this.planeProperty = serializedObject.FindProperty("plane"); }
public static void BrainField(ProjectorBrain brain) { using (new EditorGUI.DisabledScope(true)) EditorGUILayout.ObjectField("Brain", brain, typeof(ProjectorBrain), true); if (brain == null) { EditorGUILayout.HelpBox("No brain in parent hierarchy found. Perhaps this component will be ignored.", MessageType.Error); } }
public void OnEnable() { this.me = (ProjectorBrain)base.target; this.mount = this.me.GetComponentInChildren <ProjectorMount>(); this.editor = null; this.settingsProperty = serializedObject.FindProperty("settings"); if (this.me.Settings != null) { RealignViewports(); } }
public static void AttachRenderer(ProjectorBrain brain, DeviceOutput output) { switch (output) { case DeviceOutput.Mono: brain.gameObject.AddComponent <ProjectorRendererMono>(); break; case DeviceOutput.Stereo: brain.gameObject.AddComponent <ProjectorRendererStereo>(); break; } }
public static ProjectorRenderer Attach(ProjectorBrain brain, DeviceOutput output) { ProjectorRenderer renderer = brain.GetComponent <ProjectorRenderer>(); if (renderer != null) { GameObject.Destroy(renderer); } switch (output) { case DeviceOutput.Mono: renderer = brain.gameObject.AddComponent <ProjectorRendererMono>(); break; case DeviceOutput.Stereo: renderer = brain.gameObject.AddComponent <ProjectorRendererStereo>(); break; } return(renderer); }
public void OnEnable() { this.me = (ProjectorPlane)base.target; this.brain = null; }