Overview
A High-Performance "Find and Replace" for Unity Scenes
Scene Object Replacer is a standalone, free utility designed to handle mass editing in Unity. Powered by the Unity Job System and Burst Compiler, it runs complex filtering and replacement logic on worker threads, ensuring the Editor remains responsive even when processing tens of thousands of objects.
The Origin Story
I originally developed this tool as the internal deployment utility for BurstLOD, a paid optimization suite I released a few months ago. I needed a way to quickly swap "greybox" placeholder assets for final art, and to populate large terrains without manually painting thousands of trees.
While it is included in the paid suite, I am releasing it now as a standalone free asset because basic workflow utilities shouldn't always be paywalled. I made this to solve my own level design bottlenecks, and I’m sharing it in hopes it saves you time too.
Core Features
This is not a simple DestroyImmediate / Instantiate loop. It is a robust tool with deep filtering and placement logic.
- Replace Anything: Swap Scene GameObjects, Prefabs, or Materials.
- Deep Filtering: Don't just find by name. Filter targets by Tag, Layer, or Component. You can even drag a specific C# script asset into the filter list to target only objects containing that specific logic.
- Weighted Random Pools: Replace a single source object with a probabilistic mix of new assets (e.g., "Replace Cube with 60% Rock_A, 20% Rock_B, and 20% Rock_C").
- Advanced Spatial Control:
Spatial Volumes: Restrict operations to a Box, Sphere, or Cylinder volume.
Binned Weighting: Modulate spawn probabilities based on position. For example, configure Snow_Tree to only spawn in the "High" altitude bin, and Swamp_Tree to only spawn in the "Low" altitude bin.
Proximity & Density: A Burst-compiled $N^2$ pre-pass that analyzes object density. It can automatically cull objects that are too close (clipping) or remove isolated objects that are too far from neighbors. - Terrain Support: Fully supports Terrain Trees and Terrain Details (grass).
Note: For Details, it supports probabilistic replacement on terrains using "Instance Count" mode. For legacy "Coverage" mode terrains, it performs high-speed layer swapping. - Safety First: Includes a "Dry Run" analysis mode that generates a detailed report of what will be changed before you commit. All operations are fully registered with Unity's Undo system.
Real-World Use Cases
The tool is built to solve specific, repetitive problems commonly faced during level design:
- Greybox to Final Art: Instantly replace hundreds of placeholder cubes or capsules with final art prefabs, automatically applying random rotation and scale variation to break up repetition.
- Biome Management: Selectively replace vegetation on a terrain within a specific radius. For example, replace all "Oak Trees" with "Swamp Trees" only within a specific low-altitude area of your map.
- Material Overhauls: Swiftly swap a deprecated material for a new one across every MeshRenderer in the scene, regardless of the object hierarchy.
- Procedural Cleanup: If you use procedural spawners that create cluttered results, use this tool to "thin out" dense clusters without deleting everything and starting over.
Precision & Control
Replacing objects blindly can ruin a scene. This tool includes advanced filtering and placement logic to give you granular control over what gets changed and where.
- Spatial Filtering: Restrict operations to a specific 3D volume (Box or Cylinder) or a specific altitude range (Min/Max Y). This allows you to target specific areas—like a town square or a mountain peak—without affecting the rest of the world.
- Binned Weighting: A more advanced feature for naturalistic placement. You can adjust replacement probabilities based on location. For example, configure the tool to spawn "Snowy Rocks" at high altitudes and "Mossy Rocks" at low altitudes within the same operation.
- Proximity & Density Control: Includes a "Pre-Process" filter that analyzes object density. It can automatically remove objects that are too close to each other (preventing clipping) or remove isolated objects that are floating too far from their neighbors.
- Smart Placement: When replacing objects, the tool can raycast downward to snap new instances to the ground and align them to the surface normal, ensuring your new props sit correctly on the terrain or floor geometry.
Safety & Workflow
Mass-editing a scene can be risky, so the tool is designed with safety rails to prevent accidents.
- Analyze (Dry Run): Before committing to any changes, you can run an analysis. This generates a detailed report showing exactly how many objects were found, which filters they matched, and what will be replaced.
- Presets: Save your complex configurations (source lists, destination weights, filters) as ScriptableObject presets. This allows you to share setups with your team or reuse specific replacement logic (e.g., "Forest Thinner") across different scenes.
- Non-Blocking: Because it utilizes the Job System, the tool processes data asynchronously. This prevents the Editor from hanging or crashing when calculating filters for scenes with tens of thousands of objects.
Open Development & Expectations
This asset is intentionally niche. I built it to solve specific bottlenecks in my own development process, and while I have polished it for public release, it may not fit every single edge case in every project.
- Feedback: If you find a bug or have an idea for a feature that would improve your workflow, please let me know. I am active in maintaining my tools and value user input.
- Support: The package includes comprehensive documentation covering every setting and workflow.
- It's Free: I am releasing this because I believe in sharing useful tools with the community. If it saves you a few hours of manual work, then it has done its job.
The Veridian Ecosystem
The Scene Object Replacer is part of a larger optimization pipeline. While this tool helps you populate your scenes with high-detail assets, you will eventually need to optimize those assets to keep your frame rate high.
If you find this tool useful, I encourage you to check out my primary optimization suite:
[BurstLOD: Burst-Powered Optimization Suite]Once you have replaced your greybox cubes with thousands of high-quality models, BurstLOD allows you to generate LODs, fuse meshes, and optimize geometry directly in the editor without slowing down your workflow.
- Automatic LOD Generation: Create LOD chains for entire folders of assets in the background.
- Mesh Fusion: Combine multi-part objects to reduce draw calls.
- Interactive Sculpting: Fix mesh issues manually within Unity.
Please check out my publisher page to see BurstLOD and other optimization tools designed to respect your time and performance budget.
Documentation