CreateCheckerTexture() public static method

public static CreateCheckerTexture ( int numCols, int numRows, int cellPixelWidth, Color col1, Color col2 ) : Texture2D
numCols int
numRows int
cellPixelWidth int
col1 Color
col2 Color
return UnityEngine.Texture2D
Esempio n. 1
0
 public static Texture2D GetBackgroundTexture()
 {
     if (s_BackgroundTexture == null)
     {
         s_BackgroundTexture = GradientEditor.CreateCheckerTexture(32, 4, 4, Color.white, new Color(0.7f, 0.7f, 0.7f));
     }
     return(s_BackgroundTexture);
 }
Esempio n. 2
0
 public static Texture2D GetBackgroundTexture()
 {
     if ((UnityEngine.Object)GradientEditor.s_BackgroundTexture == (UnityEngine.Object)null)
     {
         GradientEditor.s_BackgroundTexture = GradientEditor.CreateCheckerTexture(32, 4, 4, Color.white, new Color(0.7f, 0.7f, 0.7f));
     }
     return(GradientEditor.s_BackgroundTexture);
 }
 private void Init()
 {
     if (this.m_ColorSwatch == null)
     {
         this.m_ColorSwatch = ColorPresetLibrary.CreateColorSwatchWithBorder(14, 14, false);
     }
     if (this.m_ColorSwatchTriangular == null)
     {
         this.m_ColorSwatchTriangular = ColorPresetLibrary.CreateColorSwatchWithBorder(14, 14, true);
     }
     if (this.m_MiniColorSwatchTriangular == null)
     {
         this.m_MiniColorSwatchTriangular = ColorPresetLibrary.CreateColorSwatchWithBorder(8, 8, true);
     }
     if (this.m_CheckerBoard == null)
     {
         this.m_CheckerBoard = GradientEditor.CreateCheckerTexture(2, 2, 3, new Color(0.8f, 0.8f, 0.8f), new Color(0.5f, 0.5f, 0.5f));
     }
 }
        private void Init()
        {
            if (m_ColorSwatch == null)
            {
                m_ColorSwatch = CreateColorSwatchWithBorder(kSwatchSize, kSwatchSize, false);
            }

            if (m_ColorSwatchTriangular == null)
            {
                m_ColorSwatchTriangular = CreateColorSwatchWithBorder(kSwatchSize, kSwatchSize, true);
            }

            if (m_MiniColorSwatchTriangular == null)
            {
                m_MiniColorSwatchTriangular = CreateColorSwatchWithBorder(kMiniSwatchSize, kMiniSwatchSize, true);
            }

            if (m_CheckerBoard == null)
            {
                m_CheckerBoard = GradientEditor.CreateCheckerTexture(2, 2, 3, new Color(0.8f, 0.8f, 0.8f), new Color(0.5f, 0.5f, 0.5f));
            }
        }