We are heads down, noses to the keyboard on our Unity Asset store product: JigScript. If you use Unity you will want JigScript. It lets you code in Unity, during Play mode, in a C# syntax that is optimized to bring out the power of Unity3d.
JigScript is a script. It is not a visual tool. JigScript is a set of keywords and functions that we have supported in C# behind the scenes. You type your JigScript into a text document, point your JigScript Prefab to the text document and then your JigScript will run in your game. Just like Unity, JigScript
Written by a master of languages, Kelly Wilson, JigScript is optimized for power, simplicity and ease of use. From the JigScript pull down menu to Play Mode scripting, as you program in Unity using JigScript you will notice the speed increase.
If you are familiar with C, C++, C# Java or JavaScript then you will be very comfortable with JigScript. The syntax has been kept as close as possible to these languages, so you don’t have to shift your mind as you move from JigScript to any other part of your development. Additionally, because JigScript is written for Unity, it works well with all other aspects of Unity3d and other plugins.
A JigScript program is a series of statements. For example, the following statement displays the text Hello World in the Unity Console window:
print(“Hello World”);
The script starts running with the first statement encountered and ends when all of the statements have been run. A JigScript statement starts with a reserved word sometimes known as a command and ends with a semi-colon ; symbol. In the previous example, print was the command and the statement ended with semi-colon ;.
There can be any number of statements in a JigScript program. Some commands require statements to be grouped. Grouped statements are known as a statement block. Statements are grouped with the open bracket { and close bracket } symbols. For example, the following code:
for(var count=0; count<10; ++count)
{
print(“Hello World”);
}
prints Hello World 10 times to the console by placing the print statement inside a for loop. The reserved word for, requires a statement block. Note: In JigScript statement blocks must be explicitly specified. This is the case even for statement blocks that contain only a single statement. This is different than C, C# and C++ which allow single statements to form an implicit statement block.
Like a JigScript program, there can be any number of statements in a statement block and statement blocks can contain other statement blocks if required.