Search Unity

Bug Objects are not lit by realtime lights when loaded from AssetBundles with URP

Discussion in 'Asset Bundles' started by Normandy-Prod, Oct 6, 2022.

  1. Normandy-Prod

    Normandy-Prod

    Joined:
    Jul 21, 2014
    Posts:
    3
    Hello, we are facing an issue with materials on objects loaded from AssetBundles.
    Realtime lights other than Directional do not have any effect on objects.

    In this example we are using Unity's URP and I have setup a realtime pointlight at the center of a prefab.
    greenlight.PNG

    This prefab is then loaded from an AssetBundle.
    As you can see the pointlight does not light up any object in the scene at runtime.
    Screen_20221006094521629.png

    Lights will only behave properly after dragging and dropping a material from the project resources to an object in the scene at runtime.
    Screen_20221006094634868.png

    Building AssetBundles with the same assets from an other and older Unity project fixes the issue so I'm assuming the problem comes from the project settings.

    Did anyone experience this before ?
    Thank you