Database Control Pro Documentation
Version 1.0.0 onwards


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

Image Unavailable

Now to run the sequence you will need to create an IEnumerator and use StartCoroutine to run it.
A IEnumerator is needed as it will contain a delay to wait for the result when the Command Sequence finishes.

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

Image Unavailable

Finally create your IEnumerator anywhere in the class just like a normal method 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.