@@ -111,7 +111,7 @@ public enum ErrorCode :int
111111 [ System . Serializable ]
112112 public class ErrorUnityEvent : UnityEngine . Events . UnityEvent < ErrorCode >
113113 {
114-
114+
115115 }
116116
117117 // Update is called once per frame
@@ -229,20 +229,20 @@ private IEnumerator init ()
229229 else if ( webCamTexture . width > 16 && webCamTexture . height > 16 ) {
230230 #else
231231 else if ( webCamTexture . didUpdateThisFrame ) {
232- #if UNITY_IOS && ! UNITY_EDITOR && UNITY_5_2
233- while ( webCamTexture . width <= 16 ) {
234- if ( initCount > timeoutFrameCount ) {
235- isTimeout = true ;
236- break ;
237- } else {
238- initCount ++ ;
239- }
240- webCamTexture . GetPixels32 ( ) ;
241- yield return new WaitForEndOfFrame ( ) ;
242- }
243- if ( isTimeout ) break;
244- #endif
245- #endif
232+ #if UNITY_IOS && ! UNITY_EDITOR && UNITY_5_2
233+ while ( webCamTexture . width <= 16 ) {
234+ if ( initCount > timeoutFrameCount ) {
235+ isTimeout = true ;
236+ break ;
237+ } else {
238+ initCount ++ ;
239+ }
240+ webCamTexture . GetPixels32 ( ) ;
241+ yield return new WaitForEndOfFrame ( ) ;
242+ }
243+ if ( isTimeout ) break;
244+ #endif
245+ #endif
246246
247247 Debug . Log ( "name " + webCamTexture . name + " width " + webCamTexture . width + " height " + webCamTexture . height + " fps " + webCamTexture . requestedFPS ) ;
248248 Debug . Log ( "videoRotationAngle " + webCamTexture . videoRotationAngle + " videoVerticallyMirrored " + webCamTexture . videoVerticallyMirrored + " isFrongFacing " + webCamDevice . isFrontFacing ) ;
@@ -256,7 +256,7 @@ private IEnumerator init ()
256256
257257 #if ! UNITY_EDITOR && ! ( UNITY_STANDALONE || UNITY_WEBGL )
258258 if ( screenOrientation == ScreenOrientation . Portrait || screenOrientation == ScreenOrientation . PortraitUpsideDown ) {
259- rotatedRgbaMat = new Mat ( webCamTexture . width , webCamTexture . height , CvType . CV_8UC4 ) ;
259+ rotatedRgbaMat = new Mat ( webCamTexture . width , webCamTexture . height , CvType . CV_8UC4 ) ;
260260 }
261261 #endif
262262
@@ -360,9 +360,9 @@ public bool DidUpdateThisFrame ()
360360
361361 #if UNITY_IOS && ! UNITY_EDITOR && ( UNITY_4_6_3 || UNITY_4_6_4 || UNITY_5_0_0 || UNITY_5_0_1 )
362362 if ( webCamTexture . width > 16 && webCamTexture . height > 16 ) {
363- return true;
363+ return true;
364364 } else {
365- return false ;
365+ return false ;
366366 }
367367 #else
368368 return webCamTexture. didUpdateThisFrame;
@@ -409,7 +409,7 @@ public Mat GetMat ()
409409 private void flipMat ( Mat mat )
410410 {
411411 int flipCode = int . MinValue ;
412-
412+
413413 if ( webCamDevice . isFrontFacing ) {
414414 if ( webCamTexture . videoRotationAngle = = 0 ) {
415415 flipCode = 1 ;
@@ -428,7 +428,7 @@ private void flipMat (Mat mat)
428428 flipCode = - 1 ;
429429 }
430430 }
431-
431+
432432 if ( flipVertical) {
433433 if ( flipCode == int . MinValue ) {
434434 flipCode = 0 ;
@@ -440,7 +440,7 @@ private void flipMat (Mat mat)
440440 flipCode = 1 ;
441441 }
442442 }
443-
443+
444444 if ( flipHorizontal) {
445445 if ( flipCode == int . MinValue) {
446446 flipCode = 1 ;
@@ -452,7 +452,7 @@ private void flipMat (Mat mat)
452452 flipCode = 0 ;
453453 }
454454 }
455-
455+
456456 if ( flipCode > int . MinValue) {
457457 Core. flip ( mat, mat, flipCode) ;
458458 }
0 commit comments