private void Start() { // CancellationToken取得 var token = this.GetCancellationTokenOnDestroy(); // ButtonクリックのUnityEvent UnityEvent clickEvent = _button.onClick; // AsyncUnityEventHandlerをキャッシュ _asyncUnityEventHandler = clickEvent.GetAsyncEventHandler(token); MoveAsync(token).Forget(); }
public void Construct(CancellationToken token) { triggerPulledEventHandler = xrGrabInteractable.activated.GetAsyncEventHandler(token); }