Search Unity

Why not have Unity Rebuild the Entity Cache when You Build?

Discussion in 'Entity Component System' started by Arowx, Oct 3, 2019.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    So I'm trying the samples and getting this
    Why doesn't the build process notice unbuilt assets and ask me to rebuild the Entity Cache?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    The asset pipeline will automatically rebuild the entity cache whenever dependencies change in the next dots release.
     
    MNNoxMortem, saarg and optimise like this.
  3. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    Will that cache be rebuilt asynchronously to avoid stalling the main editor thread?
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Yes it is built in the background. It's pretty amazing workflow...
     
    Sarkahn, _met44, ZenUnity and 6 others like this.
  5. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    I would love for the "Rebuild Entity Cache" or an equivalent to come back. It's really hard to debug your conversion code. It even suppresses any form of Debug.Log messages during the conversion that happens when you close a sub-scene as far as I can tell? Step-debugging your code doesn't seem to work either.

    If you've had a value change, that for whatever reason didn't trigger a re-conversion, it can be a really frustrating experience.

    Maybe someone forgot to mark an object as dirty - these values can still be saved into the scene, but not get picked up as a change during the live-conversion, so you end up in a position where a value is one thing in the inspector, and another in the entity debugger. I'm not sure, but couldn't even merging a scene also cause this if you have the cache git-ignored? Ether way, after you've figured out that that was the problem, you then have to try and trigger re-conversion on those objects somehow.

    A quick button to force a complete re-conversion (with step-debugging & logging enabled) would be a lot easier than to go through all of that, and manually locating the objects and marking them dirty.
     
    Last edited: Jan 14, 2020
    jorisshh and recursive like this.
  6. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    I agree with @bjarkeck, I have something that works perfectly fine outside of livelink conversion, but breaks 100% of the time with it, and I can't track it down.
     
    bjarkeck likes this.