Struct AssetRef<T>
A resilient reference to a specific asset in DewResources database. Survives resource unloads and variant clears.
Assembly: Dew.Core.dll
Syntax
[Serializable]
public struct AssetRef<T> where T : Object
Type Parameters
Constructors
AssetRef(T)
Declaration
public AssetRef(T v = null)
Parameters
| Type |
Name |
Description |
| T |
v |
|
Fields
guid
Declaration
Field Value
isActor
Declaration
Field Value
isMonoBehaviour
Declaration
public bool isMonoBehaviour
Field Value
typeAssemblyQualifiedName
Declaration
public string typeAssemblyQualifiedName
Field Value
typeName
Declaration
Field Value
Properties
asset
Declaration
[JsonIgnore]
public T asset { get; set; }
Property Value
lightAsset
Declaration
[JsonIgnore]
public T lightAsset { get; }
Property Value
Methods
ClearCache()
Declaration
Equals(AssetRef<T>)
Declaration
public bool Equals(AssetRef<T> other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
System.ValueType.Equals(object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
System.ValueType.GetHashCode()
GetType()
Declaration
[Obsolete("Using GetType() on AssetRefs is typically a mistake", true)]
public Type GetType()
Returns
| Type |
Description |
| System.Type |
|
Operators
operator ==(AssetRef<T>, AssetRef<T>)
Declaration
public static bool operator ==(AssetRef<T> left, AssetRef<T> right)
Parameters
Returns
implicit operator AssetRef<T>(T)
Declaration
public static implicit operator AssetRef<T>(T t)
Parameters
| Type |
Name |
Description |
| T |
t |
|
Returns
implicit operator T(AssetRef<T>)
Declaration
public static implicit operator T(AssetRef<T> assetRef)
Parameters
| Type |
Name |
Description |
| AssetRef<T> |
assetRef |
|
Returns
operator !=(AssetRef<T>, AssetRef<T>)
Declaration
public static bool operator !=(AssetRef<T> left, AssetRef<T> right)
Parameters
Returns