Search Unity

what exactly does the StaticOptimizeEntity ?

Discussion in 'Entity Component System' started by Opeth001, Feb 8, 2020.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Hello Everyone,

    im trying to make static Entities which at a certain point can be destroyed (Destructables: Walls, Trees ...).
    at first i thought it was related to RenderBoundsUpdateSystem (in Hybred Package) which skips WorldRenderBounds and ChunkWorldRenderBounds calculation for Entities with StaticOptimizeEntity Tag but another Optimization is happening somewhere and i can't find where StaticOptimizeEntity is referenced in packages.

    Please can anyone give me more details about it or point me to the right Script or documentation ?

    Thanks
     
    StyleToken likes this.
  2. nicolasgramlich

    nicolasgramlich

    Joined:
    Sep 21, 2017
    Posts:
    231
    One thing I noticed today is that when adding
    StaticOptimizeEntity
    to my "spawn locations", which have a
    SpawnAction
    (ComponentData), my System looking for
    SpawnAction
    doesn't pick them up anymore. It seems like
    StaticOptimizeEntity
    is way more "static" than we'd think. (Sidenote: I'm in a subscene, haven't tested this yet in a normal Scene)
     
    StyleToken and Opeth001 like this.
  3. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    StyleToken and Opeth001 like this.