Esempio n. 1
0
        /// <summary>
        /// Register a new Interactor to be processed.
        /// </summary>
        /// <param name="interactor">The Interactor to be registered.</param>
        public virtual void RegisterInteractor(XRBaseInteractor interactor)
        {
            if (m_Interactors.Contains(interactor))
            {
                return;
            }

            m_Interactors.Add(interactor);

            m_InteractorRegisteredEventArgs.manager    = this;
            m_InteractorRegisteredEventArgs.interactor = interactor;
            interactor.OnRegistered(m_InteractorRegisteredEventArgs);
            interactorRegistered?.Invoke(m_InteractorRegisteredEventArgs);
        }
Esempio n. 2
0
        /// <summary>
        /// Register a new Interactor to be processed.
        /// </summary>
        /// <param name="interactor">The Interactor to be registered.</param>
        public virtual void RegisterInteractor(XRBaseInteractor interactor)
        {
            if (m_Interactors.Contains(interactor))
            {
                return;
            }

            m_Interactors.Add(interactor);

#if AR_FOUNDATION_PRESENT
            if (interactor is ARGestureInteractor)
            {
                m_GestureInteractablesNeedReconnect = true;
            }
#endif

            m_InteractorRegisteredEventArgs.manager    = this;
            m_InteractorRegisteredEventArgs.interactor = interactor;
            interactor.OnRegistered(m_InteractorRegisteredEventArgs);
            interactorRegistered?.Invoke(m_InteractorRegisteredEventArgs);
        }