private static unsafe bool UpdateData() { LastUpdateResult = SRanipal_Lip_API.GetLipData_v2(ref LipData); if (LastUpdateResult == Error.WORK) { for (int i = 0; i < WeightingCount; ++i) { unsafe { Weightings[(LipShape_v2)i] = LipData.prediction_data.blend_shape_weight[i]; } } } return(LastUpdateResult == Error.WORK); }
private static bool UpdateData() { if (Time.frameCount == LastUpdateFrame) { return(LastUpdateResult == Error.WORK); } else { LastUpdateFrame = Time.frameCount; } LastUpdateResult = SRanipal_Lip_API.GetLipData_v2(ref LipData); if (LastUpdateResult == Error.WORK) { for (int i = 0; i < WeightingCount; ++i) { Weightings[(LipShape_v2)i] = LipData.prediction_data.blend_shape_weight[i]; } } return(LastUpdateResult == Error.WORK); }