Answer the question
In order to leave comments, you need to log in
How to access the topmost object in the gameobject hierarchy in Unity?
I shoot with raycast at one of the many colliders on objects that are in the attachments of the game object on which the script of the ColBehavior type hangs.
From the raycast script I get a link to the ColBehavior script via
behavior = shoot_ray.transform.GetComponentInParent<ColBehavior>();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question