Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Changing light's baking mode at runtime.

Discussion in 'Global Illumination' started by kubazz, Jul 28, 2015.

  1. kubazz


    Nov 20, 2013

    I'm adding 'low-quality' mode to our game and one of things I need is ability to switch Light's baking mode from Baked to Mixed (we use three lights, two baked and one realtime, on low settings I'm turning off realtime light and I want to switch one of Baked lights to Mixed). I can easily do it in Editor and I'm quite happy with the result and resulting performance, but it seems to be impossible during actual game.
    Is there any way to achieve that (I see that LightEditor is setting property "m_Lightmapping" on it's serialized object, but I'm unable to find a way to set it manually) using reflection or maybe it there any kind of workaround?