コード例 #1
0
    void OnRenderObject()
    {
        if (Camera.current == Camera.main)
        {
            Matrix4x4 matrix = Matrix4x4.TRS(transform.position, Quaternion.identity, Vector3.one * size);
            VectorRenderer.DrawMesh(m_Mesh, material, matrix);

            if (autoAdd)
            {
                for (int i = 0; i < m_PositionList.Count; i++)
                {
                    matrix = Matrix4x4.TRS(m_PositionList[i], Quaternion.identity, Vector3.one * size);
                    VectorRenderer.DrawMesh(m_Mesh, material, matrix);
                }
            }
        }
    }