{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Property ExceptionHandler | Addressables | 1.21.17
docs.unity3d.com
"{0}"의 검색 결과

    목차 표시/숨기기

    Property ExceptionHandler

    ExceptionHandler

    Global exception handler. This will be called whenever an IAsyncOperation.OperationException is set to a non-null value.

    선언
    public static Action<AsyncOperationHandle, Exception> ExceptionHandler { get; set; }
    프로퍼티 값
    타입 설명
    Action<AsyncOperationHandle, Exception>
    예
    using System;
    using UnityEngine;
    using UnityEngine.AddressableAssets;
    using UnityEngine.ResourceManagement;
    using UnityEngine.ResourceManagement.AsyncOperations;
    
    internal class AddExceptionHandler : MonoBehaviour
    {
        void Start()
        {
            ResourceManager.ExceptionHandler = CustomExceptionHandler;
        }
    
        // Gets called for every error scenario encountered during an operation.
        // A common use case for this is having InvalidKeyExceptions fail silently when 
        // a location is missing for a given key.
        void CustomExceptionHandler(AsyncOperationHandle handle, Exception exception)
        {
            if (exception.GetType() != typeof(InvalidKeyException))
                Addressables.LogException(handle, exception);
        }
    }
    문서 개요
    맨 위로
    Copyright © 2023 Unity Technologies — 상표 및 이용약관
    • 법률정보
    • 개인정보처리방침
    • 쿠키
    • 내 개인정보 판매 금지
    • Your Privacy Choices (Cookie Settings)