docs.unity3d.com
    目次を表示する/隠す

    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.

    Inheritance
    Object
    AssetReference
    AssetReferenceT<TObject>
    AssetReferenceAtlasedSprite
    AssetReferenceGameObject
    AssetReferenceSprite
    AssetReferenceTexture
    AssetReferenceTexture2D
    AssetReferenceTexture3D
    Inherited Members
    AssetReference.m_AssetGUID
    AssetReference.OperationHandle
    AssetReference.RuntimeKey
    AssetReference.AssetGUID
    AssetReference.SubObjectName
    AssetReference.IsValid()
    AssetReference.IsDone
    AssetReference.Asset
    AssetReference.ToString()
    AssetReference.LoadAsset<TObject>()
    AssetReference.LoadScene()
    AssetReference.Instantiate(Vector3, Quaternion, Transform)
    AssetReference.Instantiate(Transform, Boolean)
    AssetReference.LoadAssetAsync<TObject>()
    AssetReference.LoadSceneAsync(LoadSceneMode, Boolean, Int32)
    AssetReference.UnLoadScene()
    AssetReference.InstantiateAsync(Vector3, Quaternion, Transform)
    AssetReference.InstantiateAsync(Transform, Boolean)
    AssetReference.RuntimeKeyIsValid()
    AssetReference.ReleaseAsset()
    AssetReference.ReleaseInstance(GameObject)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.AddressableAssets
    Syntax
    [Serializable]
    public class AssetReferenceT<TObject> : AssetReference, IKeyEvaluator where TObject : Object
    Type Parameters
    Name Description
    TObject

    Constructors

    Name Description
    AssetReferenceT(String)

    Construct a new AssetReference object.

    Methods

    Name Description
    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.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)