northwood-studios/NwPluginAPI

FacilityRoom.Lights is always null

Closed this issue · 0 comments

FlickerableLightController is a Child component

public FacilityRoom(FacilityZone zone, RoomIdentifier room)
		{
			Zone = zone;
			Identifier = room;

			if (room.TryGetComponent(out FlickerableLightController lightController))
				Lights = new RoomLight(lightController);

			Facility.RegisterDoors(this, room.gameObject.GetComponentsInChildren<DoorVariant>());
		}