- Home /
Question by
emirkutluay · May 07, 2020 at 05:35 PM ·
arraysfindgameobjectswithtag
How to use GameObject.FindGameObjectsWithTag with more than one tag.
I want to add objects with tags npc or police to the allCars array how can I do that? I tried this doesn't work
allCars = GameObject.FindGameObjectsWithTag("NPC");
allCars += GameObject.FindGameObjectsWithTag("Police");
Comment
Your answer
Follow this Question
Related Questions
Tagged objects not returning value 0 Answers
How to use FindGameObjectsWithTag 2 Answers
Using a Parameterized arraylist (C#)??? 1 Answer
Can a tagged object exclude itself from FindGameObjectWithTag? 3 Answers
Check/compare array elements 1 Answer