I have a really basic question. What do you do about unnasigned object variables? I mean like a variable that will only be assigned at run time. But it seems the in C# it has to be assigned before, so do you create an empty object or just assign it to a random object.
Depends on the scope where the variables are used, and the compiler used. Generally speaking, uninitialized variables that are used with no value will yield compiler errors but it's pretty possible that VC# auto-assigns default values to uninitialized variables. I know the Mono compiler from Unity does it for variables…
I am not quite sure I get what you mean. You can have a varible with nothing assigned to it in c# just define it as etc.. Or is this not what you meant. Also it would be cool if you could add some hlsl or glsl stuff to the list as this would be useful for people getting into tech art.
r_fletch_r: It makes sense for the compiler to allow you to define variables in the class scope but not in the method scope, because the variables declared in the class scope can be changed at runtime before they are used by anything/anyone. The compiler can not foresee that. If they are used before they are assigned then,…
originated from a message conversation: yes it's popular with game scripting (realtime system integration), I use it a lot for all kinds of tasks (many people would use python for that, which I never got into). Scripting languages like Lua are useful to "generate code", I've used Lua to generate maxscript code or shader…