示例#1
0
        protected void Init()
        {
            if (null == m_Param)
            {
                m_Param = new OrbbecManagerParam();
            }

            if (m_Param.IsTrackingSkeleton)
            {
                m_Param.IsUseUserGenerator = true;
            }

            if (m_Param.IsUseUVC)
            {
                m_Param.IsUseUserImage = false;
            }

            m_Wrapper.Init(m_Param);

            if (m_Param.IsUseHandsTracker)
            {
                m_Wrapper.OnHandsUpdate = OnHandsUpdate;
            }

            if (ms_Instance.m_Param.IsNeverSleep)
            {
                Screen.sleepTimeout = SleepTimeout.NeverSleep;
            }

            if (m_Param.IsTrackingSkeleton)
            {
                m_Wrapper.UserEnterCallBack  += OnUserEnter;
                m_Wrapper.UserLeaveCallBack  += OnUserLeave;
                m_Wrapper.UserUpdateCallBack += OnUserUpdate;
            }

            m_OrbbecCallback = WaitForDevice;
        }