API v1 checking… · p50 — · 0 installs/hr
v0.10.0
Package
View on GitHub
gilzoide
10 0

Conditionally modify GameObjects and Components at import time based on build configurations, with zero runtime overhead. Supports editor vs built player detection, development vs release builds, scripting define symbols, and platform-specific conditions. Use PropertyModifier to change component values, KeepObjectsModifier to conditionally include elements, or DeleteObjectsModifier to remove them—perfect for managing platform-specific UI, debug features, and build-variant assets.

Install via Unity Package Manager

Add to Unity Package Manager

Paste this URL into Unity's Window › Package Manager › + › Add package from git URL, or click Install.

git https://www.pkglnk.dev/conditional-objects.git
Package ID com.gilzoide.conditional-objects · Updated May 4, 2026
Install 0

README

Rendered from GitHub

Conditional Objects

Scripts that modify GameObjects and Components at Prefab/Scene import time, based on build configurations. All processing is done in the editor at import/build time, so there's no runtime penalty in built players.

Features

  • Supported conditions:
    • Editor vs Built player
    • Development vs Release build settings
    • Scripting define symbols
    • Active build platform
  • Conditionally modify GameObject or Component properties with the PropertyModifier script (e.g.: setting different controller sprites between PlayStation and Xbox platforms)
  • Conditionally keep GameObjects or Components with the KeepObjectsModifier script (e.g.: keep a "Login with Google Play Games" button in Android only)
  • Conditionally delete GameObjects or Components with the DeleteObjectsModifier script (e.g.: delete a debug button in release builds)

How to install

Install via Unity Package Manager using the following URL:

https://github.com/gilzoide/unity-conditional-objects.git#1.0.0-preview2

Unity support

AImportTimeObjectModifier in Scenes are supported in all Unity versions.

Before Unity 2020.2, prefabs are only supported when directly instanced in scenes.

Creating your own modifier

  1. Create a script that inherits from AImportTimeObjectModifier
  2. Implement the abstract void Apply(bool filtersMatch) method inside a #if UNITY_EDITOR block. Check out the DeleteObjectsModifier script for an example.
  3. Add the script to your game objects in Prefabs/Scenes

Whenever a prefab with your script is reimported or a scene is processed (either played in editor or built), the modifier will be applied and immediately destroyed.

Known issues

  • UNITY_EDITOR and DEVELOPMENT_BUILD scripting define symbols are not detected correctly during builds, use the dedicated Editor and Development filters instead
  • Extra scripting define symbols passed to BuildPipeline.BuildPlayer are not detected correctly during builds
Versions 0

No versions tracked yet.

Dependencies 0

No dependencies.

Changelog 0 releases

No changelog entries yet. Run the admin Changelog & Version Scanner to pull from the repository's CHANGELOG.md.

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **Conditional Objects** to your Unity project via Package Manager:

1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/conditional-objects.git
```

[![pkglnk](https://www.pkglnk.dev/badge/conditional-objects.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/conditional-objects)
Embed badge README snippet
Markdown
[![pkglnk installs](https://www.pkglnk.dev/badge/conditional-objects.svg)](https://www.pkglnk.dev/pkg/conditional-objects)
HTML
<a href="https://www.pkglnk.dev/pkg/conditional-objects"><img src="https://www.pkglnk.dev/badge/conditional-objects.svg" alt="pkglnk installs"></a>
URL
https://www.pkglnk.dev/badge/conditional-objects.svg

Comments

No comments yet. Be the first!