CallScript
This is a shortcut method for calling scripts within scripts.
It is equivalent to:
var proxy = bridge.getScriptServiceProxy();
var res = proxy.runScript("scriptName", scriptdata);
Method Parameters
Parameter | Description |
---|---|
scriptname | The name of the script to call |
scriptdata | The json parameters to send to the script |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Construct the parameters
var scriptdata = {};
var scriptdata.score = 1000000;
// Call the script
var res = bridge.callScript("PostToAllLeaderboards", scriptdata);
// Construct the parameters
var scriptdata = {};
var scriptdata.score = 1000000;
// Call the script
var res = bridge.callScript("PostToAllLeaderboards", scriptdata);