コード例 #1
0
        [Inject] void Init(LipDataSendModel lipDataSendModel)
        {
            var lipSyncContext = GetComponent <OVRLipSyncContextBase>();

            this.UpdateAsObservable().Subscribe(_ =>
            {
                if (lipSyncContext != null)
                {
                    // get the current viseme frame
                    OVRLipSync.Frame frame = lipSyncContext.GetCurrentPhonemeFrame();
                    if (frame != null)
                    {
                        lipDataSendModel.SendData(frame);
                    }
                    // Update smoothing value
                    if (smoothAmount != lipSyncContext.Smoothing)
                    {
                        lipSyncContext.Smoothing = smoothAmount;
                    }
                }
            });
        }
 public void Init(LipDataSendModel lipDataSendModel)
 {
     this.lipDataSendModel = lipDataSendModel;
 }