Replicating Editor Workflows at Runtime
Unity developers typically rely on a specific set of tools within the Editor to organize game logic and visual hierarchies. Concepts like prefabs, prefab variants, and asset references are foundational to how scenes are built. However, these systems are traditionally restricted to the design phase. The Runtime Asset Database changes this dynamic by bringing these essential management functionalities into the runtime environment. This allows for the implementation of a save and load subsystem that mirrors the familiar asset management found in the Editor, enabling applications to handle complex object hierarchies and data relationships dynamically.
By building on Unity Editor prefab concepts, the library allows for the creation and manipulation of assets while the application is running. This functionality is particularly relevant for projects requiring runtime editors or systems where players can create, modify, and save their own content. The API provided by the developer supports asset variants, ensuring that the same modular logic used during development can be applied to runtime-generated objects.
Technical Architecture and Serialization
The technical backbone of the Runtime Asset Database involves a sophisticated serialization system designed to handle the nuances of Unity-specific data. A key component of this architecture is the DynamicSurrogate system. Recent updates have expanded this system to include support for the serialization of generic types and Unity.Object references. This is a critical feature for developers working with complex data structures that do not naturally fit into standard serialization formats.
The library includes a Surrogate generator, accessible via the Unity menu under Tools > Surrogate Settings. This tool gives developers the option to enable or disable property generation, allowing for fine-tuned control over how data is processed. The inclusion of SerializableArray and SerializableList extension methods further simplifies the handling of collections, ensuring that arrays and lists of data are preserved accurately during the save and load process.
Complex Component and Scene Management
Managing scenes at runtime often involves dealing with components that contain non-Unity types which may, in turn, reference other components. The Runtime Asset Database addresses these complex dependency chains. Specifically, it resolves issues where saving scenes with prefabs containing such nested references might fail. By ensuring that components referencing other components—even those using custom, non-Unity types—are correctly handled, the system maintains the integrity of the object graph during both the saving and loading phases.
This stability extends to the application of changes to prefabs. The developer has implemented fixes to ensure that applying changes to prefabs with complex component structures works as intended. For those utilizing ID mapping to track assets across different sessions, the addition of IDMap extension methods provides a more streamlined way to interact with asset identifiers. These technical refinements ensure that as a scene grows in complexity, the underlying database can keep track of every individual element and its relationship to the whole.
Extensibility and Pipeline Integration
Flexibility is a core attribute of the Runtime Asset Database. It is designed to be extensible, allowing developers to introduce new types and components into the system as needed. This extensibility is supported by pluggable external asset importers, which permit the application to bring in data from sources outside the standard Unity package. This makes it possible to build a pipeline where assets are imported, managed, and serialized entirely within the live environment.
The library also integrates with Unity’s Addressables system, providing a modern approach to asset management that is compatible with asynchronous loading and remote content distribution. For developers focused on visual consistency, the system includes the ability to create Shader Profiles and provides methods to override ThumbnailUtil functionality. These tools allow for the generation and management of visual metadata, such as object thumbnails, directly at runtime.
Compatibility and Environment Support
The Runtime Asset Database is designed for use with Unity 2021.3.45 and newer versions. It maintains compatibility across different render pipelines, including the Built-in Render Pipeline, High Definition Render Pipeline (HDRP), and Universal Render Pipeline (URP). This broad support ensures that the runtime asset management logic remains consistent regardless of the visual direction of the project.
Recent maintenance has also addressed compiler errors specific to Unity 6, ensuring that the library remains functional as developers transition to newer versions of the engine. Whether managing simple data assets or complex prefab hierarchies with deep component nesting, the library provides a structured framework for handling assets outside of the traditional Editor environment. Through the use of surrogate serialization and a replicated prefab API, it offers a standardized way to build dynamic, persistent worlds within Unity.
Project Screenshots
Protected download
Access this resource
All resources are 100% manually reviewed to eliminate all risks.


