N1ckGreek N1ckGreek - 1 year ago 78
C# Question

How to assign Transform via code

How can i assign automatically the Transform via code using something like


enter image description here

Answer Source
raycastEnd = GameObject.Find("RaycastEnd").transform;

If you have multiple objects named "RaycastEnd" it will return the first one. the first one may be unpredictable.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download