// Initiallizes the array holding the skidmark sections. void Awake() { Ins = this; skidmarks = new markSection[maxMarks]; for (var i = 0; i < maxMarks; i++) { skidmarks[i] = new markSection(); } mesh = new Mesh(); GetComponent <MeshFilter>().sharedMesh = mesh; }
void OnDestroy() { Ins = null; }