Question about FindObjectsOfType

Hi.
I’m trying to convert some code from finding objects with tag to type because unity support told me it uses less resources to do so.
So my question is.
If I have an array I made

private GameObject[] FloorArray;

How do I fill it?

FloorArray = GameObject.FindGameObjectsWithTag("ColoredFloor");

This doesn’t work, and if I later want to remove all objects in it without Red as tag. how do I do that?

…convert some code from finding objects with tag to type because unity support told me it uses less resources to do so…” - that doesn’t really make any sense. The functions have different purposes - if you’re trying to find all gameobjects that have been tagged with “ColoredFloor” then you need to use FindGameObjectsWithTag(). If you want to find all objects of a particular type (e.g. a HingeJoint) then you use FindObjectsOfType.

It’s not a matter of performance or resource usage - they simply do different things.