-
Unibug.Expose (name:String, value:float, minRange:float, maxRange:float):float
Description:
Use this format when you want to expose/control a float variable. You have to pass in the current value of the variable (in the "value" parameter) and
assign the function's return value back to the variable.
Parameters:
name - This is a friendly label that will be displayed in the Unibug interface next to the controls.
value - This is the current value of the variable.
minRange - This is the minimum possible value that you want assigned to this variable.
maxRange - This is the maximum possible value that you want assigned to this variable.
Example:
function Update ()
{
enemySpeed = Unibug.Expose ("Enemy Speed", enemySpeed, 0.0, 100.0);
}
-
Unibug.Expose (name:String, value:int, minRange:int, maxRange:int):int
Description:
Use this format when you want to expose/control an integer variable. You have to pass in the current value of the variable (in the "value" parameter) and
assign the function's return value back to the variable.
Parameters:
name - This is a friendly label that will be displayed in the Unibug interface next to the controls.
value - This is the current value of the variable.
minRange - This is the minimum possible value that you want assigned to this variable.
maxRange - This is the maximum possible value that you want assigned to this variable.
Example:
function Update ()
{
numEnemiesToSpawn = Unibug.Expose ("Enemy Quantity", numEnemiesToSpawn, 0, 10);
}
-
Unibug.Expose (name:String, value:boolean):boolean
Description:
Use this format when you want to expose/control a boolean variable. You have to pass in the current value of the variable (in the "value" parameter) and
assign the function's return value back to the variable.
Parameters:
name - This is a friendly label that will be displayed in the Unibug interface next to the controls.
value - This is the current value of the variable.
Example:
function Update ()
{
isInvincible = Unibug.Expose ("Player Invincible", isInvincible);
}
-
Unibug.Expose (name:String, value:String):String
Description:
Use this format when you want to expose/control a string variable. You have to pass in the current value of the variable (in the "value" parameter) and
assign the function's return value back to the variable.
Parameters:
name - This is a friendly label that will be displayed in the Unibug interface next to the controls.
value - This is the current value of the variable.
Example:
function Update ()
{
assetPath = Unibug.Expose ("Asset Server Path", assetPath);
}
-
Unibug.Expose (name:String, tgt:GameObject, rcv:String)
Description:
Use this format when you want to set up a button to send a message to an object.
Parameters:
name - This is a friendly label that will be displayed on the button.
tgt - This is the game object that the message will be sent to.
rcv - This is the name of the message to send, in other words, the function that will be called in the receiving object's script.
Example:
function Update ()
{
Unibug.Expose ("Kill Enemies", enemyParentObj, "KillEnemies");
}
-
Unibug.Expose (name:String, tgt:GameObject, rcv:String, param:Object)
Description:
Use this format when you want to set up a button to send a message to an object.
Parameters:
name - This is a friendly label that will be displayed on the button.
tgt - This is the game object that the message will be sent to.
rcv - This is the name of the message to send, in other words, the function that will be called in the receiving object's script.
param - This is the object that will be passed to the message recipient/function.
Example:
function Update ()
{
Unibug.Expose ("Freeze Enemies", enemyParentObj, "SetEnemyMovement", false);
}