Answers for "unity getcomponent in parent"

C#
1

unity get component in parent

void OnCollisionEnter(Collision collision)
{
PlayerController pl = collision.gameObject.GetComponentInParent<PlayerController>();
}
Posted by: Guest on February-10-2022

C# Answers by Framework

Browse Popular Code Answers by Language