A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/sprite/../assets-managing-introduction.html below:

Manual: Introduction to runtime asset management

Managing assets at runtime

Use the Resources system to load assets at runtime

Introduction to runtime asset management

Unity provides the following ways to load and manage the assets in your project at runtime:

Direct references

Direct reference asset management is the default way of managing assets at runtime in Unity. Whenever you drag an asset into a scene or onto a component through the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary
window of the Editor, you create a direct reference to that asset. When you build your application, Unity saves any referenced assets in a separate file associated with the scenes in your project.

When your application runs on the target device, Unity loads the entire asset file into memory before loading a scene. This approach isn’t dynamic and you can only load or unload a scene. If your project only uses direct references to load assets, then it can lead to slow load times, especially on devices with less memory.

Resources system

The Resources system provides a simple way of managing assets in memory. To use the Resources system, you create a folder called Resources in your project and add assets to it. During the build process, Unity finds the assets in the Resources folder and bundles them into a serialized file with metadata and indexing information. You can then use the Resources API to load and unload the assets in your application.

The Resources system has the following limitations:

It’s an ideal system for prototyping, or for smaller projects which need assets throughout the lifetime of the application. For more information, refer to Use AssetBundles to load assets at runtime.

AssetBundle system

Use the AssetBundle system to organize assets into separate container files called AssetBundles. You can store AssetBundle files in your project files, or remotely in the cloud.

The AssetBundle API minimizes the impact on network and system resources by allowing you to download AssetBundles on demand. You can use this on-demand behavior to add DLC and post-release content updates to your application. For example, you can deliver new content for your game without requiring users to download a new version of your game. The AssetBundle API then provides a way to load and unload assets from downloaded bundles.

The AssetBundle system has the following limitations:

For more information, refer to Introduction to AssetBundles.

Addressables package

The Addressables package provides a user interface in the Unity Editor to manage and organize the assets in your project. It’s built on top of the AssetBundle API and automatically manages dependencies, asset locations, and memory allocation, which you otherwise have to handle manually in the AssetBundle system. The Addressables package aims to remove the limitations of the Resources and AssetBundle system to make it easier to manage assets on demand.

Once you have made an asset Addressable, you can reference it by address in your code, rather than by its file name or AssetBundle location, which means you can change the location of an asset without needing to rewrite any code. For more information, refer to Addressables overview

ECS content management system

The Entities package has its own content management system, where you use weak references to assets to load them at runtime. You can also create content archives to deliver content to an application. For more information, refer to Introduction to content management.

Additional resources

Managing assets at runtime

Use the Resources system to load assets at runtime


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4