Change default lighting channels on all actors

Hi,

I’d like all the actors in my game to have lighting channels 0 and 1 enabled as opposed to only channel 0 being enabled as it is by default.

I’ve noticed that all the actors/components where lighting channels can be changed are children of the engine’s Actor base class, so if I change the lighting channels in the base class, then that should be propagated to everything else in the game, however, I can’t find the lighting channels variable in the actor.cpp file.

Does anyone know where to find them or if there is a better way of doing this?

Thanks :blush:

Hi,

I’ve done some search and found that LightingChannels is in the UPrimitiveComponent class which is base class for StaticMeshComponent, SkeletalMeshComponent etc.
It makes sense because these components are the ones should be rendered or receive light.

So, you can specify lighting channel for any mesh you want.
Example:

YourMeshComponent.bChannel0 = true;
YourMeshComponent.bChannel1 = false;
YourMeshComponent.bChannel2 = false;