well, I'm not talking about web games
is it as absurdly difficult to remember all the functions and stuff if you're making something in Unity with JS is what I'm asking
like do I have to type something ridiculous like
document.getElementById("beep").style.color = "blue";
just to change the color of some text
and then there's getElementsByTagName and getElementsByClassName which are ridiculously long and ugh
jQuery is great because you can just use CSS selectors. but JS alone is a mess
var getId = function(id) {
return document.getElementById(id);
};
var getClass = function(class) {
return document.getElementsByClassName(class);
};
var getTag = function(tag) {
return document.getElementsByTagName(tag);
};
byId('some element id').style.color = 'blue';
byClass('some element class')[0].style.color = 'blue';
byTag('some element tag')[0].style.color = 'blue';
anyway, no. There's no documents or tag names and stuff in Unity. You define stuff in the beginning and just use that variable later on.