Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is just a shortened version of
- ObjectsToBeSaved.ForEach(PrintList);
- //This. However only List's (AFAIK) offer this ability.
- foreach (GameObject item in ObjectsToBeSaved)
- {
- PrintList(item);
- }
- // This is a 'function' in C# - However it cannot return anything.
- void PrintList(GameObject go)
- {
- print(name + " prints " + go.name);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement