Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Add warning when a hierarchy component is missing #5590

Commits on Sep 12, 2022

  1. Add warning when a hierarchy component is missing

    A common pitfall since 0.8 is the requirement on `ComputedVisibility`
    being present on all ancestors of an entity that itself has
    `ComputedVisibility`, without which, the entity becomes invisible.
    
    I myself hit the issue and got very confused, and saw a few people hit
    it as well, so it makes sense to provide a hint of what to do when such
    a situation is encountered.
    
    We now check that all entities with both a `Parent` and a
    `ComputedVisibility` component have parents that themselves have a
    `ComputedVisibility` component.
    
    Note that the warning is only printed once.
    
    We also add a similar warning to `GlobalTransform`.
    
    This only emits a warning. Because sometimes it could be an intended
    behavior.
    
    Alternatives:
    - Do nothing and keep repeating to newcomers how to avoid recurring
      pitfalls
    - Make the transform and visibility propagations tolerant to missing
      components
    nicopap committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    94bdc47 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    daa98a4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5c0d896 View commit details
    Browse the repository at this point in the history
  4. wording on B0004

    Co-authored-by: ira <[email protected]>
    nicopap and tim-blackbird committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    7d5bd86 View commit details
    Browse the repository at this point in the history
  5. wording on B0004 (2)

    Co-authored-by: ira <[email protected]>
    nicopap and tim-blackbird committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    61a0c75 View commit details
    Browse the repository at this point in the history