Search Issue Tracker

Won't Fix



Found in


Issue ID




EditorOnly Tag is ignored on Prefabs that are instantiated by code

Build Pipeline


How to reproduce:
1. Open the user-submitted project ("")
2. Build the project and observe the text objects

Expected result: the "EditorOnly" tagged text objects are not visible in the build
Actual result: The instantiated prefab text objects are not removed in the build even though they have the "EditorOnly" tag

Reproduced in: 2019.2.0a9, 2019.1.0b8, 2018.3.10f1, 2018.2.0f2

  1. Resolution Note:

    The EditorOnly tag is only supported on objects in Scenes, and has never been supported on assets being built into an asset bundle. We do not plan on adding support for this at this time.

Comments (1)

  1. Alejandro-Martinez-Chacin

    Sep 30, 2021 16:58

    Oh, just seriously got bit by this one.
    Use case:
    - Thousands of prefabs instantiated to create a level. These prefabs have particle systems, sounds, etc (self contained objects).
    - Particle systems just for existing (even if not awoken and completely disabled) take a small memory footprint. This adds up to sometimes GBs of memory on particles that might never be played.

    - Have a pool of particles to be reused for each of those previous instances when needed.
    - For editing purposes, work with the particle systems inside the prefab for placement, sizing, etc... leave this particle system as EditorOnly as it will be instantiated/placed later on dynamically on the parent of that Transform.

    This fails then because the EditorOnly tag won't cull objects tagged as EditorOnly inside prefabs.

    Is there any interest in taking a second look at this at some point? 'EditorOnly' is a bit misleading if it is only 'EditorOnly if the object is standing there on a scene'
    Or maybe some best practices to do it as a build post process? when the prefabs get processed for a build?

    Thanks in advance

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.