Class GuidReferenceAttribute
Attribute that links a type to an identifier. It is used by the GuidReferenceHelper to link data together without using a hard reference. It should be used on string fields that represent the datas id. Ultimately, this id is later used by the IDataLoaderService to look up the data.
Namespace: IdleKit.Framework
Assembly: cs.temp.dll.dll
Syntax
public class GuidReferenceAttribute : PropertyAttribute
Examples
This sample shows the recommended usage
[SerializeField, GuidReference(typeof(ICurrencyData))]
private string _currencyId;
[SerializeField, GuidReference(typeof(ICurrencyData), typeof(ICardData))]
private string[] _requirementIds;
Constructors
GuidReferenceAttribute()
Link to all Types registered in the GuidReferenceHelper
Declaration
public GuidReferenceAttribute()
GuidReferenceAttribute(Type[])
Link to provided Types
Declaration
public GuidReferenceAttribute(params Type[] types)
Parameters
Type | Name | Description |
---|---|---|
Type[] | types | The Types to include |
GuidReferenceAttribute(Type[], Type[])
Link to provided Types. Exclude types in excludes
Declaration
public GuidReferenceAttribute(Type[] types, Type[] excludes)
Parameters
Type | Name | Description |
---|---|---|
Type[] | types | The Types to include |
Type[] | excludes | The Types to exclude |
Properties
excludes
Declaration
public Type[] excludes { get; }
Property Value
Type | Description |
---|---|
Type[] |
types
Declaration
public Type[] types { get; }
Property Value
Type | Description |
---|---|
Type[] |