docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Group settings and schemas overview

    Group settings set how Unity treats the assets in a group in content builds. Group settings control properties such as the location where Unity builds AssetBundles or bundle compression settings.

    To open a group's settings, open the Addressables Groups window (Window > Asset Management > Addressables > Groups), then select a group. The group's settings are displayed in the Inspector.

    A group's settings are declared in Schema objects attached to the group. When you create a group with the Packed Assets template, the Content Packing & Loading and Content Update Restriction schemas define the settings for the group. The default Build scripts expect these settings.


    The Inspector window for the Default Local Group

    Note

    If you create a group with the Blank template, then Unity doesn't attach any schemas to the group. The default build script can't process assets in a blank group.

    Schemas

    A group schema is a ScriptableObject that defines a collection of settings for an Addressables group. You can assign any number of schemas to a group. The Addressables system defines a number of schemas for its own purposes. You can also create custom schemas to support your own build scripts and utilities.

    The built-in schemas include:

    • Content Packing & Loading: The main Addressables schema used by the default build script and defines the settings for building and loading Addressable assets. For information on the settings for this schema, refer to Content Packing & Loading schema reference.
    • Content Update Restrictions: Defines settings for making differential updates of an earlier build. For more information about this schema refer to Content Update Restriction schema reference.

    Create a custom schema

    To create your own schema, extend the AddressableAssetGroupSchema class, which is a kind of ScriptableObject:

    using UnityEditor.AddressableAssets.Settings;
    
    public class __CustomSchema __: AddressableAssetGroupSchema
    {
       public string CustomDescription;
    }
    

    Once you've defined a custom schema object, you can add it to existing groups and group templates using the Add Schema buttons in the Inspector windows of those entities.

    You might also want to create a custom Unity Editor script to help users interact with your custom settings. For more information, refer to Custom Inspector scripts.

    In a build script, you can access the schema settings for a group using its AddressableAssetGroup object.

    Additional resources

    • Content Packing & Loading schema reference.
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)