BBGamelib.ccUtils.GUIDrawRect C# (CSharp) Method

GUIDrawRect() public static method

public static GUIDrawRect ( Rect position, Color color ) : void
position UnityEngine.Rect
color Color
return void
		public static void GUIDrawRect( Rect position, Color color )
		{
			if( _staticRectTexture == null )
			{
				_staticRectTexture = new Texture2D( 1, 1 );
			}
			
			if( _staticRectStyle == null )
			{
				_staticRectStyle = new GUIStyle();
			}
			
			_staticRectTexture.SetPixel( 0, 0, color );
			_staticRectTexture.Apply();
			
			_staticRectStyle.normal.background = _staticRectTexture;
			
			GUI.Box( position, GUIContent.none, _staticRectStyle );
		}
	}