Переглянути джерело

Bugfix: Fixing uninitialized camera viewport values when creating a camera component through reflection

BearishSun 8 роки тому
батько
коміт
58b6cdd959
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      Source/BansheeCore/Components/BsCCamera.h

+ 4 - 4
Source/BansheeCore/Components/BsCCamera.h

@@ -258,10 +258,10 @@ namespace bs
 
 		// Only valid during construction
 		SPtr<RenderTarget> mTarget;
-		float mLeft;
-		float mTop;
-		float mWidth;
-		float mHeight;
+		float mLeft = 0.0f;
+		float mTop = 0.0f;
+		float mWidth = 1.0f;
+		float mHeight = 1.0f;
 
 		/************************************************************************/
 		/* 						COMPONENT OVERRIDES                      		*/