Table of Contents

Class ResourceEditorUtils

Namespace
Ceres.Resource.Editor
Assembly
Ceres.Editor.dll
public static class ResourceEditorUtils
Inheritance
ResourceEditorUtils
Inherited Members

Methods

AddAsset(AddressableAssetGroup, Object, params string[])

Add an asset to the specified addressable asset group with optional labels

public static AddressableAssetEntry AddAsset(this AddressableAssetGroup group, Object asset, params string[] labels)

Parameters

group AddressableAssetGroup

The addressable asset group to add the asset to

asset Object

The asset to add

labels string[]

Optional labels to assign to the asset

Returns

AddressableAssetEntry

The created addressable asset entry or null if failed

CleanupAssetGroup(AddressableAssetGroup)

Remove all asset entries from the specified addressable asset group

public static void CleanupAssetGroup(AddressableAssetGroup assetGroup)

Parameters

assetGroup AddressableAssetGroup

The addressable asset group to clean up

DeleteAsset(string)

public static void DeleteAsset(string path)

Parameters

path string

DeleteDirectory(string)

public static void DeleteDirectory(string path)

Parameters

path string

FindAssetEntry(string, Type)

Find an addressable asset entry by address and asset type

public static AddressableAssetEntry FindAssetEntry(string address, Type assetType)

Parameters

address string

The addressable address to search for

assetType Type

The type of asset to search for

Returns

AddressableAssetEntry

The matching addressable asset entry or null if not found

GetAssetGUID(Object)

Get the GUID of a Unity asset

public static string GetAssetGUID(this Object asset)

Parameters

asset Object

The Unity object to get GUID for

Returns

string

The asset GUID string

GetOrCreateAssetGroup(string, bool)

Get existing addressable asset group or create a new one if it doesn't exist

public static AddressableAssetGroup GetOrCreateAssetGroup(string groupName, bool createIfNotExist = true)

Parameters

groupName string

The name of the group to get or create

createIfNotExist bool

Create the group if not exist

Returns

AddressableAssetGroup

The addressable asset group

Modify(AddressableAssetGroup, bool)

Create a modification scope and marks the group as modified when any entry was added in the scope.

public static ResourceEditorUtils.AssetGroupModificationScope Modify(this AddressableAssetGroup group, bool postEvent = false)

Parameters

group AddressableAssetGroup

The addressable asset group to modify

postEvent bool

Whether to post modification events

Returns

ResourceEditorUtils.AssetGroupModificationScope

A disposable scope for managing group modifications

RemoveAssetGroups(AddressableAssetGroup[])

Remove multiple addressable asset groups from the settings

public static void RemoveAssetGroups(AddressableAssetGroup[] assetGroups)

Parameters

assetGroups AddressableAssetGroup[]

The list of addressable asset groups to remove

ToAddressableAssetEntry(Object)

Convert a Unity object to its corresponding addressable asset entry

public static AddressableAssetEntry ToAddressableAssetEntry(this Object asset)

Parameters

asset Object

The Unity object to convert

Returns

AddressableAssetEntry

The addressable asset entry or null if not found