The Replace Duplicates operation scans the entire scene for duplicated assets such as meshes, materials, and textures. Once identified, it replaces these duplicates with a single reference, significantly optimizing the scene by reducing memory usage and improving overall performance. This operation is particularly useful in complex scenes where multiple identical assets exist due to importing or manual duplication.
Dependencies
The Replace Duplicates operation should be run after Hierarchy Merge and before any operations that modify individual assets, such as Create Instances.
- Hierarchy Merge: This operation should be run before Replace Duplicates to ensure a clean hierarchy.
- Create Instances: This should be executed after Replace Duplicates to maximize the efficiency of instances by reducing asset count.
Best Practices
- Pre-check Scene: Before running this operation, ensure that no essential duplicated assets are needed for specific gameplay or visual requirements.
- Project Scale: For large projects with many assets, consider running it on a per-level basis to manage memory usage effectively.
- Backup: Always back up your scene before running this operation, as it makes extensive modifications to the asset references in the scene.
Considerations
- Data Integrity: Be cautious with complex materials and textures that may look identical but serve different purposes. The operation may unify them, resulting in unintended visual changes.
- Performance Overhead: Running this operation on very large scenes may temporarily increase CPU and memory usage. Break down the operation into smaller sections if needed.