2
Q:

unity3d get component

using UnityEngine;

public class GetComponentExample : MonoBehaviour
{
    void Start()
    {
        HingeJoint hinge = gameObject.GetComponent(typeof(HingeJoint)) as HingeJoint;        if (hinge != null)
            hinge.useSpring = false;
    }
}
-1

New to Communities?

Join the community