using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Cyber.Util { /// /// Mesh database, contains all the meshes in the game. This should be /// used if meshes are needed at runtime. /// public class MeshDB : MonoBehaviour { private static MeshDB Singleton; /// /// The meshes that can be used at runtime. /// public Mesh[] Meshes; /// /// Sets the Singleton. /// public MeshDB() { Singleton = this; } /// /// Get the mesh at the defined index. /// /// The mesh. /// Index. public static Mesh GetMesh(int index) { return Singleton.Meshes[index]; } } }