Hello Guys’
I have this code:
public var gObj : GameObject;
function Create() {
var obj;
obj = new OBJ(); //Creates a model and it has a GameObject member.
gObj = obj.obj;
…
Debug.Log("bounds: " + gObj.GetComponent(MeshFilter).bounds);
}
ok so gObj is GameObject and I make the assignment of obj.obj that I am sure is of the same type. When I call Debug.Log I try to access the component but I get a NullReferenceException message… and I don’t quite understand why
thanks.
Giancarlo