Quantcast
Channel: Answers for "Searching a List of GameObjects by name"
Viewing all articles
Browse latest Browse all 4

Answer by ZGTR

$
0
0
Easily done using Linq: GameObject temp = list.Where(obj => obj.name == "Sword").SingleOrDefault(); This will return your game object if found. Otherwise, null. You have to import `System.Linq` though.

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>