mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-22 08:08:51 -05:00
* fix #305 empty list of tagged objects throws NRE * added missing indexer
This commit is contained in:
parent
8c1d6f215c
commit
a7240651f6
@ -199,6 +199,7 @@ namespace UnityAtoms.Tags
|
||||
public static GameObject FindByTag(string tag)
|
||||
{
|
||||
if (!TaggedGameObjects.ContainsKey(tag)) return null;
|
||||
if (TaggedGameObjects[tag].Count < 1) return null;
|
||||
return TaggedGameObjects[tag][0];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user