1 Draw Call HUD possible with JS?

Hello all.
I have been messing around with GUIManager, SpriteUI… and as long as they are not JavaScript my script understanding ir really poor (believe me, I have enough with JS).

Is it in C for performance reasons or language limitations?

because I would be pleased to buy a package that brings low drawcall fully functional HUD in Java Script… :roll:

thanx

no people use C# because unlike Unity Script (unluckily also called JavaScript although it shares very little with what is known and expected as JS) its an industry standard language → more resources and commonly much more known.

you don’t develop a monster thing in something you don’t know that well or in something thats language wise more restircted than what you use.

for UI systems the reason is simple: JS does not offer any multi inheritance at all (extend 1 class, implement multiple interfaces), as such you can not realistically write anything remotely flexible

that’s what I thought.
Thank you Dreamora

Another reason is that JS is very forgiving - which can be a strength, obviously - but it also means that in some situations, it lets you make mistakes without generating a compiler error. It doesn’t force you to be as explicit in your code as C#, which means (without getting too technical) its often easy to think it’s working one way, when really it is working (or rather, isn’t working) a completely different way. C# forces you to be very explicit about what you want it to do, so you avoid lots of mistakes before they become hard-to-find bugs. This means it usually takes more code than JS to do the same things, but in the end, you save more time from avoiding hard-to-find bugs.

There was a great talk given by the makers of Touch KO (iPhone game) at the last Unite where they shared their experiences with JS versus C#, and they said in no uncertain terms, always use C# for a good sized project as JS lets you get yourself into trouble far too easily. Whereas C# will generate compiler errors and force you to get it right before compiling. That way, you won’t be tracking down bugs for hours and hours later on.

All of that said, I’m planning on releasing a sprite-based GUI package that should make dealing with UIs extremely simple, and for the most part, you won’t have to worry about what language its written in as most of the setup will be done in the editor/inspector. So stay tuned.