Uncategorized

LIST

A LIST is dynamically sized while an ARRAY is fixed in size:

List<Type> name;

Using it in a Unity script where declaring it so it can be used in the Inspector, we would use:

[SerializeField] List<Transform> waypoints;

This is used to maintain the list of transform locations along a waypath (comprised of waypoints) – meaning it’s the path a wave of enemy ships will follow in a space shooter or bugs will follow on a garden-based tower defense game.