void OnEnable() { root = serializedObject.FindProperty("m_root"); roadMesh = serializedObject.FindProperty("m_roadMesh"); meshQuality = serializedObject.FindProperty("m_meshQuality"); roadWidth = serializedObject.FindProperty("defaultWidth"); defaultMaterial = serializedObject.FindProperty("m_defaultMaterial"); m_target = target as Road; RoadRoot rr = RoadUtility.GetRoadRoot(); if (!serializedObject.isEditingMultipleObjects) { rr.SetActiveRoad(m_target); } else { rr.SetActiveRoad(null); } }
void OnEnable() { centerRatio = serializedObject.FindProperty("centerRatio"); angle = serializedObject.FindProperty("angle"); width = serializedObject.FindProperty("m_width"); last = serializedObject.FindProperty("m_last"); next = serializedObject.FindProperty("m_next"); m_target = serializedObject.targetObject as Waypoint; RoadRoot rr = RoadUtility.GetRoadRoot(); if (!serializedObject.isEditingMultipleObjects) { rr.SetActiveWaypoint(m_target); } else { rr.SetActiveRoad(null); } }