Class AddressablesBuildDataBuilderContext
Data builder context object for Addressables.
Inheritance
Namespace: UnityEditor.AddressableAssets.Build
Syntax
public class AddressablesBuildDataBuilderContext : IDataBuilderContext
Constructors
AddressablesBuildDataBuilderContext()
Construct a new AddressablesBuildDataBuilderContext object.
Declaration
public AddressablesBuildDataBuilderContext()
AddressablesBuildDataBuilderContext(IDataBuilderContext)
Construct a new AddressablesBuildDataBuilderContext object, copying values from the one passed in.
Declaration
public AddressablesBuildDataBuilderContext(IDataBuilderContext toCopy)
Parameters
Type | Name | Description |
---|---|---|
IDataBuilderContext | toCopy | The context to copy values from. |
AddressablesBuildDataBuilderContext(AddressableAssetSettings)
Creates a default context object with values taken from the AddressableAssetSettings parameter.
Declaration
public AddressablesBuildDataBuilderContext(AddressableAssetSettings settings)
Parameters
Type | Name | Description |
---|---|---|
AddressableAssetSettings | settings | The settings object to pull values from. |
AddressablesBuildDataBuilderContext(AddressableAssetSettings, BuildTargetGroup, BuildTarget, Boolean, Boolean, String)
Creates a default context object with values taken from the AddressableAssetSettings parameter.
Declaration
public AddressablesBuildDataBuilderContext(AddressableAssetSettings settings, BuildTargetGroup buildTargetGroup, BuildTarget buildTarget, bool developerMode, bool sendProfilerEvents, string playerBuildVersion)
Parameters
Type | Name | Description |
---|---|---|
AddressableAssetSettings | settings | The settings object to pull values from. |
BuildTargetGroup | buildTargetGroup | The BuildTargetGroup to set. |
BuildTarget | buildTarget | The BuildTarget to set. |
System.Boolean | developerMode | Is develepor mode. |
System.Boolean | sendProfilerEvents | Send profiler events. |
System.String | playerBuildVersion | The player build version. |
Properties
Keys
Collection of context keys.
Declaration
public ICollection<string> Keys { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> |
Implements
Methods
GetValue<T>(String, T)
Get a context value.
Declaration
public T GetValue<T>(string key, T defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key for the value. |
T | defaultValue | The default value. |
Returns
Type | Description |
---|---|
T | The value cast to the type T. |
Type Parameters
Name | Description |
---|---|
T | The type of the context value to retrieve. |
Implements
SetValue(String, Object)
Sets a context value.
Declaration
public void SetValue(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key for the value. |
System.Object | value | The value to set. |