Posts about programming

Unity: Converting between C# and Javascript

Posted by on Oct 18, 2011 in Blog Posts, Resources, Tutorials, Unity3D | 0 comments

In Unity, the two most commonly used languages are C sharp and JS (technically Unityscript, which is very similar to Javascript). One of the most common questions asked by new users on UnityAnswers is “How do I convert X script between Javascript and C#?” Typically, the people asking these sorts of questions have found a script they want to use or play with, but they’ve only worked in C# or JS and don’t know anything about the other language. Well, have no fear: here are a few resources that explain the differences...

read more

Quick Tutorial: C# – How Objects allow you to be flexible

Posted by on Oct 8, 2011 in Blog Posts, Learning, Tutorials | 0 comments

Note: this is a fairly advanced tutorial that assumes you’ve already done some basic programming in C#. In our TerraViz tool, we have a number of dropdown menus. There’s a bit of code that allows you to pass in a list of strings, and those become the items of the dropdown menu. The code we already had worked great, but then we wanted to have a dropdown that would show images instead of text. We could have just created one dropdown that shows text and one that shows images, but duplicating code is always...

read more