private void Awake() { if (WaypointCore.GetComponent <WaypointThing>() != null) { WaypointRef = WaypointCore.GetComponent <WaypointThing>(); } else { throw new MissingComponentException("No Waypoint core was found " + transform.name); } }
private void OnEnable() { Point = (WaypointThing)target; SceneView.duringSceneGui += DuringSceneGUI; serializedTarget = new SerializedObject(Point); isLoop = serializedTarget.FindProperty("LoopWaypoints"); listIndex = serializedTarget.FindProperty("WaypointNumber"); lineColor = serializedTarget.FindProperty("LineColors"); gizmoColor = serializedTarget.FindProperty("GizmoColors"); lineType = serializedTarget.FindProperty("SelectedType"); lineSpacing = serializedTarget.FindProperty("DottedLineSpacing"); fontSize = serializedTarget.FindProperty("FontSize"); gizmoSize = serializedTarget.FindProperty("WaypointGizmoSize"); PointList = serializedTarget.FindProperty("Waypoints"); }