Database Control Pro Documentation
Version 1.0.0 onwards



UnityScript

In order to run a Command Sequence in UnityScript you will need to reference the Database Control Pro namespace.
To do this add the following to the top of your script:

Image Unavailable

We would advise running the sequence in a seperate funtion as it will involve a delay.
To do this we need to create the function and run it.

To Run the function, use the following code wherever you need it:

Image Unavailable

Finally create your function anywhere in the script and make sure it includes the following code:

Image Unavailable

The Debug.Log line just writes the Command Sequence responce to the Console. This can be replaced with any code you like using the returnText variable (string) as the responce.

In this example the Command Sequence called "Login" is being run on the "Database 1" database. The first input variable (username) will have its value set to "johnSmith" and the second (password) to "password123". The string[] for input values needs to match the number of input variables in your Command Sequence and they need to be in the correct order. If your sequence doesn't have any input variables this third parameter can be completley left out.

Look at the code used in the Demo Scenes for more examples.