Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Over constrained with engine and system containts

Discussion in 'Entity Component System and C# Job system' started by GilCat, Feb 11, 2019.

  1. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    176
    I'm getting this error:
    Code (CSharp):
    1. Unity.Entities.EndFrameBarrier is over constrained with engine and system containts - ignoring dependencies
    2.  
    I suppose this means i'm making too many systems depending on EndFrameBarrier or even some of the dependencies are just impossible to fulfill.
    Anyway my systems still work as expected but it would be nice to know which are the systems dependencies that are being ignored.
     
  2. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    115
    They are doing a full rewrite of the update order code right now. Hopefully dependency conflicts will get better error information as well.
     
    FROS7 and GilCat like this.
  3. AndesSunset

    AndesSunset

    Joined:
    Jan 28, 2019
    Posts:
    47
    Hi, @Creepgin. This is great to know. Can you please provide source for this news?
     
  4. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    115
    AndesSunset and GilCat like this.
  5. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    940
    This error message does not mean too much, but rather that the ordering you constrained is impossible. (overdoing it)

    You can look at UpdateOrderOptimizerTest.cs. "Engine component" in the message means things from the experimental PlayerLoop API. For example, this single system is over constrained because it is impossible to be in 2 phase at the same time. (After = IN that phase but after everything else in that phase).

    Code (CSharp):
    1.         [UpdateAfter(typeof(UnityEngine.Experimental.PlayerLoop.Update))]
    2.         [UpdateAfter(typeof(UnityEngine.Experimental.PlayerLoop.Initialization))]
    3.         [DisableAutoCreation]
    4.         class SimpleOverconstrainedSystem : ComponentSystem
    5.         {
    6.             protected override void OnUpdate()
    7.             {
    8.             }
    9.         }
    Even if you do not have 2 engine component ordering in any of the same system, your other systems may drag related systems to be in 2 phase at the same time.
     
    starikcetin likes this.
  6. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    176
    Exactly! In my case i'm not even setting dependencies against to EndFrameBarrier directly, so other systems are being dragged with some of my dependencies.
    Is it fair to say that we should avoid system dependencies as much as possible?
    Well, when you start having a significant amount of system this starts to be very hard and tricky to manage.

    Thanks