Quantcast
Channel: Answers for "Problem calling another scripts function (JS)"
Browsing all 4 articles
Browse latest View live

Answer by Moor

var diamManager : DiamondManger; just assign the script in the inspector and don't want this diamManager = gameObject.GetComponent("DiamondManger");

View Article



Answer by Huacanacha

You need to put the "diamManager =" line inside the Start() function. The object/script hasn't been fully initialized when you call GetComponent so the component you are looking for doesn't exist yet.

View Article

Answer by Moor

var diamManager : DiamondManger; just assign the script in the inspector and don't want this diamManager = gameObject.GetComponent("DiamondManger");

View Article

Answer by Huacanacha

You need to put the "diamManager =" line inside the Start() function. The object/script hasn't been fully initialized when you call GetComponent so the component you are looking for doesn't exist yet.

View Article
Browsing all 4 articles
Browse latest View live




Latest Images