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. Dismiss Notice

Bug BakingOnlyEntityAuthoring still bakes

Discussion in 'Entity Component System' started by Richay, Oct 6, 2023.

  1. Richay

    Richay

    Joined:
    Aug 5, 2013
    Posts:
    75
    I'm under the impression that BakingOnlyEntityAuthoring is, despite the name, to prevent gameobjects from being baked.

    - If this isn't true, then how can I 100% ignore a gameobject from baking systems in a subscene?

    Even though my gameobject has BakingOnlyEntityAuthoring, it is still definitely being included in baking systems, although it is correctly not part of the final subscene. I can verify this by warning spam (Shader [Universal Render Pipeline/Lit] on [light] does not support skinning).

    My use case is that I have editor-only gameobjects as children of gameobjects I do want to bake, to allow viewing placeholder visuals while placing them (the real visuals are created at runtime, as they have non-bakable components). Of course, I could use gizmos, but this setup is far more controllable and customizable, and before converting the game to ECS, Just Worked(tm).

    The old StopConvert (I forget the exact name) was perfect in this sense.
     
    Last edited: Oct 6, 2023
    Occuros likes this.
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    The name is accurate. It does not prevent the object from being baked. Just prevents the baked result from reaching runtime (kinda).

    I do have a fix for this for Entities Graphics in particular in my framework, but besides that there isn't any known workaround that I am aware of.
     
  3. Richay

    Richay

    Joined:
    Aug 5, 2013
    Posts:
    75
    Ah. Damn. Seems like a normal thing to want to ignore a gameobject from being baked. Hopefully it'll be added in the future. Thanks Latios.
     
    Occuros likes this.