Search Unity

Resolved Baking DependsOn() with scriptable object

Discussion in 'Entity Component System' started by tassarho, Oct 7, 2022.

  1. tassarho

    tassarho

    Joined:
    Aug 25, 2019
    Posts:
    75
    maybe i'm not using it correctly but after reading upside down the doc i can't find how to make change on scriptable object in editor be applied on GameObject being baked, though it registesr the change (confirm by the Debug.Log()) the value is not change UNTIL i clear the entity cache on the Preference/Entities.

    is the new baking system compatible with scriptable object?
     
  2. Aede-unity

    Aede-unity

    Unity Technologies

    Joined:
    Sep 2, 2022
    Posts:
    3
    We are looking into this. It might be Baking, but it could also be a characteristic of scriptable objects, that make it not work with Baking.

    In the mean time, instead of clearing the Entity cache, reimporting the SubScene also works. When you select your SubScene, you will find the reimport button in your Inspector. That should simplify use a little bit.
     
    bb8_1 and Anthiese like this.
  3. tassarho

    tassarho

    Joined:
    Aug 25, 2019
    Posts:
    75
    thanks for the tips
     
  4. Aede-unity

    Aede-unity

    Unity Technologies

    Joined:
    Sep 2, 2022
    Posts:
    3
    Hi, I managed to repro it and fix my repro case. In my case I could fix it by adding DependsOn(scriptableObject) to my Baker.

    Seeing your title, this might not be the solution to your problem, but to make a more specific repro, I will need to know a little bit more about your project. Can you tell me how you are using the Scriptable Object? In a Baker/Baking System. What type of value you are changing in your Scriptable Object? ed.
     
    bb8_1 likes this.