Skip to content

Instantly share code, notes, and snippets.

@JonRurka
Created October 21, 2014 23:07
Show Gist options
  • Save JonRurka/fe3630330adeea6c40a9 to your computer and use it in GitHub Desktop.
Save JonRurka/fe3630330adeea6c40a9 to your computer and use it in GitHub Desktop.
class SelectedUnits : Monobehavior
{
public List<Transform> selectedList;
private Static SelectedUnits _instance;
public Static SelectedUnits Instance { get { return _instance;}}
public void AddTransform(Transform trans)
{
selectedList.Add(trans);
}
}
You can then add any transform to that list by calling SelectedUnits.Instance.AddTransform(theTransform)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment