Search Unity

Question override MeshRendererBaker

Discussion in 'Graphics for ECS' started by filod, Jan 14, 2023.

  1. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    my case is i do need MeshRenderer run in subscene at edit time, but i only use it for debug purpose(not authoring), and i would like strip it with out baking, i can't inherit MeshRendererBaker because it's private, any other ways to achieve this?
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,267
    Add a BakingOnlyEntityAuthoring component to the GameObject.
     
  3. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    BakingOnlyEntityAuthoring is not feasible, because i do need the Transform Component.
     
  4. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    the workaround i found is use a WorldSystemFilterFlags.EntitySceneOptimizations system to Remove rendering Components