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.

Question override MeshRendererBaker

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

  1. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    201
    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,012
    Add a BakingOnlyEntityAuthoring component to the GameObject.
     
  3. filod

    filod

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

    filod

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