Array of locations (or enum)

How could I get an array of locations, in a script?

EG: I have this:

using UnityEngine;
using System.Collections;

public float locX;
public float locY;
public float locZ;

How can I store “locX”, “locY”, “locZ” into an array, so I can do something like this:

Locations[locationid][locX] = 214.2;

Why not just use an array of Vector3’s?

How would I do that? Please could you provide me with an example in C#? Thanks!

var loc1 = new Vector3(locX, locY, locZ);
var loc2 = new Vector3(locX2, locY2, locZ2);
var locations = new Vector3[] { loc1, loc2 };

There are lots of collection types and lots of ways to work with them. If you don’t know how to create a basic array or even what a Vector3 is then I would highly recommend you start reading some beginner materials and read the Unity documentation.

Oh yeah, I do know about them. I don’t know why I didn’t think of that in the first place lol. Thanks!