Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

RenderBounds.Extents isn't calculated (even in new projects)

Discussion in 'Graphics for ECS' started by nomadshiba, May 22, 2021.

  1. nomadshiba

    nomadshiba

    Joined:
    Jun 22, 2015
    Posts:
    27
    Unity 2020.3.8f1
    Hybrid Renderer 0.11.0-preview.42
    Entities 0.17.0-preview.41

    Steps:
    • Create a new 3D project
    • import "com.unity.rendering.hybrid" and its dependencies
    • Create an Entity with RenderBounds, Translation, LocalToWorld and RenderMesh
    • Use standard Cube, and Material
    • Play
    • RenderBounds.Center is calculated but Extents is {0, 0, 0}
    Am i doing something wrong or this is not suppose to happen?
    As far as i remember it was suppose to work like that.
     

    Attached Files:

    Last edited: May 22, 2021
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    333
    I think RenderBounds is only automatically calculated during GameObject conversion. If you add it manually, you should use the bounds from the Mesh that the entity uses, or some custom bounds if you need them.
     
  3. nomadshiba

    nomadshiba

    Joined:
    Jun 22, 2015
    Posts:
    27
    Weird because it used to work, i think it stopped working after some update and i didnt realize it at first. Meshes just disappear when i dont look at the center of them. Guess gonna make my own system to calculate it for now.