N1ckGreek N1ckGreek - 7 months ago 35
C# Question

How to assign Transform via code

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


enter image description here

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

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