Octahedron.cs 351 Bytes
Newer Older
SimonP's avatar
SimonP committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using UnityEngine;

namespace ProceduralToolkit.Examples.Primitives
{
    [RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))]
    public class Octahedron : MonoBehaviour
    {
        public float radius = 1f;

        private void Start()
        {
            GetComponent<MeshFilter>().mesh = MeshE.Octahedron(radius);
        }
    }
}