Class AssetReferenceT<TObject>
Generic version of AssetReference class. This should not be used directly as CustomPropertyDrawers do not support generic types. Instead use the concrete derived classes such as AssetReferenceGameObject.
상속된 멤버
네임스페이스: UnityEngine.AddressableAssets
어셈블리: solution.dll
구문
[Serializable]
public class AssetReferenceT<TObject> : AssetReference, IKeyEvaluator where TObject : Object
타입 파라미터
이름 | 설명 |
---|---|
TObject |
생성자
이름 | 설명 |
---|---|
AssetReferenceT(string) | Construct a new AssetReference object. |
메서드
이름 | 설명 |
---|---|
LoadAsset() | Load the referenced asset as type TObject. This cannot be used a second time until the first load is released. If you wish to call load multiple times on an AssetReference, use LoadAssetAsync<TObject>(object) and pass your AssetReference in as the key. See the Loading Addressable Assets documentation for more details. |
LoadAssetAsync() | Load the referenced asset as type TObject. This cannot be used a second time until the first load is released. If you wish to call load multiple times on an AssetReference, use LoadAssetAsync<TObject>(object) and pass your AssetReference in as the key. on an AssetReference, use Addressables.LoadAssetAsync<>() and pass your AssetReference in as the key. See the Loading Addressable Assets documentation for more details. |
ValidateAsset(string) | Validates that the asset located at a path is allowable for this asset reference. An asset is allowable if it is of the correct type or if one of its sub-asset is. |
ValidateAsset(Object) | Validates that the referenced asset allowable for this asset reference. |