Hi there, I’m just watching this video: unity javascript part 2 04 variable assigning and print function in Walker Boy Studio - Video Training and Tutorials on Vimeo
The series is very good so far, but I’ve come to a point, where the maker of the video does something, which doesn’t work at my unity:
var box;
box = "small box ";
boxNumber = 3;
print (box + boxNumber);
It should print "small box 3"but I get the error: “Operator ‘+’ cannot be used with a left hand side of type ‘Object’ and a right hand side of type ‘int’.”
Which I totally understand as I come from php, where variables are “connected” via “.” ($first.$last)
Why doesn’t it work?