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;
}
}
Also in C#:
- unity check when clicked on object
- c# declare an int list
- bind repeater to dictionary
- Linq - Random Elements
- c# resize image keep aspect ratio
- bool toggle unity c#
- convert generic to type c#
- asp list box
- get out of foreach statement c#
- c# string methods
- unity get velocity at point
- c# param exception
- get all child gameObject of gameObject C#
- vb.net check if datatable has rows
- how to get component in unity c#
- convert string to boolean c#
- rotatearound unity
- unity persistent data
- sticky footer bootstrap 3
- unity left mouse button
- how to trim path in C#
- how to generate random numbers in c#
- unity oncollisionenter2d
- c# random number between 0 and 1