Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

getcomponent

public Gameobject a; //this allows you to drag an object into a slot in the unity software
private transform b; //this is a variable that can only be assigned and altered in script

b = a.GetComponent<Transform>(); //this finds the transform component of 'a' and assigns that to 'b'
 
PREVIOUS NEXT
Tagged: #getcomponent
ADD COMMENT
Topic
Name
3+1 =