Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity add component

//Use the AddComponent<T>() Method to add a component to your gameobject
GameObject gameObject;

gameObject.AddComponent<BoxCollider>(); //Component has to be an actual Unity component
 
PREVIOUS NEXT
Tagged: #unity #add #component
ADD COMMENT
Topic
Name
5+6 =