Search Unity

Baked Prefab Blocker - Light.bakedIndex Obsolete & Light.isBaked Read-Only

Discussion in 'Global Illumination' started by nindim, Mar 30, 2017.

  1. nindim

    nindim

    Joined:
    Jan 22, 2013
    Posts:
    130
    Hi,

    I am baking my lighting into prefabs and need to set Light.bakedIndex (or something similar) to prevent the lights getting applied twice.

    Light.bakedIndex was marked obsolete in Unity 5.6, it tells me to use Light.isBaked instead, but this is read-only :/

    Essentially, I need to tell Unity that this light is baked already for the prefab instance, how do I do this in Unity 5.6?

    See this video for more information on how to do this in Unity 5.5:


    Here is the big thread discussing baking lighting into prefabs for Untiy 5: https://forum.unity3d.com/threads/problems-with-instantiating-baked-prefabs.324514/

    I am using the editor helper in this post: https://forum.unity3d.com/threads/p...ting-baked-prefabs.324514/page-5#post-2519284

    Cheers,

    Niall