To use iCanScript, you first need to install a visual scripts on one of your game objects. To illustrate this process, we will add a visual script to a sphere that will later be used as a trigger zone.
To do so, you must:
Et voilà, you have a visual script !!! It does not do anything yet but it is ready to listen and react to Unity messages. We will look at defining and handling Unity messages in the next section. For now, let’s examine the changes brought when creating the visual script.
When iCanScript creates a visual script, it attaches two (2) Unity script components on the game object. These components are:
The iCS_VisualScript contains the visual script persistant data including the definitions of nodes, ports, bindings as well as their layout information. It is populated and modified by the iCanScript editors.
The iCS_Behaviour is dynamically created from the visual script data and includes the source code for the message handlers of the visual script. It uses the execution services of the iCanScript engine library (i.e. iCanScriptEngine.dll) to manage the execution flow and resolve data contention (also known as deadlocks).
Created : 2015-03-16 20:21:16, Last Modified : 2015-03-16 20:21:16