Пример #1
0
        void DrawBounds()
        {
            GUIKit.RecordAndSetHandlesMatrix(transform.localToWorldMatrix);

            GUIKit.RecordAndSetHandlesColor(boundsColor);
            GUIKit.HandlesDrawWireLocalBounds(mesh.bounds);
            GUIKit.RestoreHandlesColor();

            GUIKit.RestoreHandlesMatrix();
        }
Пример #2
0
        void DrawNormals()
        {
            GUIKit.RecordAndSetHandlesMatrix(transform.localToWorldMatrix);

            var normals = mesh.normals;

            if (!Kit.IsNullOrEmpty(normals))
            {
                int count    = normals.Length;
                var vertices = mesh.vertices;

                GUIKit.RecordAndSetHandlesColor(normalsColor);
                for (int i = 0; i < count; i++)
                {
                    GUIKit.HandlesDrawAALine(vertices[i], vertices[i] + normals[i] * normalsSize);
                }
                GUIKit.RestoreHandlesColor();
            }

            GUIKit.RestoreHandlesMatrix();
        }