N1ckGreek N1ckGreek - 9 months ago 43
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.