Hi there,
I have a third-party, art asset, it has multiple MeshColliders on it. I want my code to get all the Mesh Collider components on this single GameObject, but am unsure how to run that.
Any tips?
Hi there,
I have a third-party, art asset, it has multiple MeshColliders on it. I want my code to get all the Mesh Collider components on this single GameObject, but am unsure how to run that.
Any tips?
Doesn’t GetComponents work? Unity - Scripting API: GameObject.GetComponents
Uhm, so what’s the issue with using GetComponents<MeshCollider>()
? It returns all components of that type that are attached to this gameobject.
Sweet! I had no idea!
Thank you