コード例 #1
0
        public DebugRenderingSystem()
        {
            _zTestBatch  = new BatchedLineDraw(depthTest: true);
            _alwaysBatch = new BatchedLineDraw(depthTest: false);
            _lineEntries = new List <DrawLineEntry>(16);

            _textStyle           = new GUIStyle();
            _textStyle.alignment = TextAnchor.UpperLeft;
            _drawTextEntries     = new List <DrawTextEntry>(16);
            _attachTextEntries   = new List <AttachTextEntry>(16);
        }
コード例 #2
0
        private void CheckInitialized()
        {
            //	as RuntimeDebugDraw component has a very low execution order, other script might Awake()
            //	earlier than this and at that moment it's not initialized. check and init on every public
            //	member
            if (_drawTextEntries == null)
            {
                _ZTestBatch  = new BatchedLineDraw(depthTest: true);
                _AlwaysBatch = new BatchedLineDraw(depthTest: false);
                _lineEntries = new List <DrawLineEntry>(16);

                _textStyle           = new GUIStyle();
                _textStyle.alignment = TextAnchor.UpperLeft;
                _drawTextEntries     = new List <DrawTextEntry>(16);
                _attachTextEntries   = new List <AttachTextEntry>(16);
            }

            return;
        }