private void SetGroup(GameObject obj, StringListOption option) { int index = groups.IndexOf(option); if (sensor != null && index >= 0 && index < groups.Count) { sensor.blockTypeIndex = index; } }
private void SetSchedule(GameObject obj, StringListOption option) { int index = schedules.IndexOf(option); if (sensor != null && index >= 0 && index < schedules.Count) { sensor.scheduleIndex = index; } }