Skip to content

vverum/Unity_BuildObjectRemover

Repository files navigation

Build Object Remover

The Build Object Remover allow you to automatically remove object with selected tag from scenes from a build.

Overview

By default Unity Editor removes objects with tag 'EditorOnly' from build and runtime.
Build Object Remover allow you to add more tags that will be removed from selected platforms and build types.

Tool view in editor

Installation

Latest steps available at Unity manual

Via Package manager as gitURL

  1. Copy https link to this repository
    https://github.com/vverum/Unity_BuildObjectRemover.git
  2. Open package manager in unity
  3. Press Add button (+ in the upper left corner) and select Add package from git URL...
  4. Paste link and press add

Via Package manager as local file

  1. Download package (tgz file) from releases
  2. Move file to project location
  3. Open package manager in unity
  4. Press Add button (+ in the upper left corner) and select Add package from tarball...
  5. Select package file

Unity Asset Store

  1. install normally like any unity asset from Unity Asset Store

Requirements

Package dependencies:

  • com.unity.settings-manager #2.0.1

Setup Build Object Remover

Build Object Remover view is located in Project Settings

Adding and removing tags

  1. Adding and removing tags is as simple as pressing the appropriate button. Add and remove
  2. Select correct tag from drop-down list with tags in new created row.
  3. Enable the row with selected tag.
  4. Select correct build type.
  5. Done.

Seting build type

In Remove from build types you are selecting the type of build when the object will be removed.

Build Types

  • Nothing - does not remove from any runtime or build
  • Everything - remove from any runtime or build
  • Editor Play Time - remove from play time in editor
  • Development - remove from builds that have checked Development option
  • Release - remove from build that is not development

For example:
If only 'Development' is selected, then objects in "Development" build will remove, but objects in the release build will not be removed.

Add platform

  1. Press Add Platform button.
  2. Select the platform you want to add options to.
  3. Press Add Platform again.

A tag set on a specific platform will not override the tag setted in All platforms!

Do not forget to save changes

Press Apply button to save current changes.
Press Revert button to discard currently unsaved changes.

Changes that are not applied before build will not take effect!

Debug

Tags marked to remove will be listed in log in console after building process. Add and remove

This tool is Open Sourced

github.com/vverum/Unity_BuildObjectRemover

LICENSE: Modified MIT License (MIT)

This project's license is available in the provided "LICENSE.md" file.

About

The Build Object Remover allow you to automatically remove a chosen object from a scene from a release build.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages