Answers for "unity check if a gameobject has a component"

C#
4

unity check if a gameobject has a component

if(gameObjectToCheck.GetComponent<Rigidbody>() != null) { //do something }
Posted by: Guest on June-23-2020

Code answers related to "unity check if a gameobject has a component"

C# Answers by Framework

Browse Popular Code Answers by Language