Esempio n. 1
0
        void Awake()
        {
            Assert.IsNotNull(_Font, "_Font is not defined on " + RayDebugUtils.GetObjectName(this));
            Assert.IsNotNull(_MeshFilter, "_MeshFilter is not defined on " + RayDebugUtils.GetObjectName(this));

            Setup();
        }
Esempio n. 2
0
 void WriteChar(char ch)
 {
     if (ch == '\n')
     {
         _x  = _anchorX;
         _y += _LineHeight;
     }
     else if (ch >= FIRST_CHAR && ch < LAST_CHAR)
     {
         if (_lastRectIndex >= _MaxRect)
         {
             Debug.LogError("Character buffer overflow on " + RayDebugUtils.GetObjectName(this));
             return;
         }
         var ci = _CharInfo [(int)ch - FIRST_CHAR];
         if (ch == ' ')
         {
             _x += ci.advance;
             return;
         }
         var vi = _lastRectIndex * 4;
         var x0 = _x + ci.minX;
         var x1 = _x + ci.maxX;
         var y0 = _Height - (_y - ci.minY);
         var y1 = _Height - (_y - ci.maxY);
         _Vertices [vi + 0] = new Vector3(x0, y0, 0);
         _Vertices [vi + 1] = new Vector3(x0, y1, 0);
         _Vertices [vi + 2] = new Vector3(x1, y0, 0);
         _Vertices [vi + 3] = new Vector3(x1, y1, 0);
         _UVs [vi + 0]      = ci.uvBottomLeft;
         _UVs [vi + 1]      = ci.uvTopLeft;
         _UVs [vi + 2]      = ci.uvBottomRight;
         _UVs [vi + 3]      = ci.uvTopRight;
         _Colors [vi + 0]   = _Colors [vi + 1] = _Colors [vi + 2] = _Colors [vi + 3] = _textColor;
         _x += ci.advance;
         _bounds.Encapsulate(_Vertices [vi + 0]);
         _bounds.Encapsulate(_Vertices [vi + 3]);
         _lastRectIndex++;
         _IsDirty = true;
     }
 }
Esempio n. 3
0
 void Awake()
 {
     Assert.IsNotNull(_Master, "_Master is not defined on " + RayDebugUtils.GetObjectName(this));
 }
Esempio n. 4
0
 void Awake()
 {
     Assert.IsNotNull(_Profiler, "_Profiler is not defined on " + RayDebugUtils.GetObjectName(this));
     Assert.IsNotNull(_Canvas, "_Canvas is not defined on " + RayDebugUtils.GetObjectName(this));
 }