Search Unity

How to use FrozenRenderSceneTag

Discussion in 'Graphics for ECS' started by Guedez, Feb 16, 2020.

  1. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    RenderMeshSystemV2 super slow or super fast and it seems adding FrozenRenderSceneTag is absolutely crucial to use it, yet I can't seem to find any info on FrozenRenderSceneTag.
    Should I just be adding
    new FrozenRenderSceneTag() { SectionIndex =1}
    to whatever I want to draw fast?
    There is that
    Hash128 SceneGUID
    that I've have no idea how to use and
    int SectionIndex
    that I just set to 1. Also
    int HasStreamedLOD
    is a int rather than a boolean, so I bet it is doing more than just telling if the mesh has steaming lod or not.
    So what are those and what's the correct way of using them?
     
  2. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    Sorry for necroing this, but a year later I still don't know how to correctly use this.
     
  3. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    I don't think you should be using it directly. It's added automatically for you during conversion from the
    FrozenStaticRendererSystem

    You can use StaticOptimizeEntity to mark an entity static.
     
  4. andywatts

    andywatts

    Joined:
    Sep 19, 2015
    Posts:
    112
    If I understand correctly, V2 doesn't to use StaticOptimizeEntity, but does use FrozenStaticRenderSceneTag.
    FrozenStaticRenderSceneTag can be used to upload a RenderMesh once to GPU.
    Not sure how the SectionIndex value is used tho.