I'm trying to use a script to set a value called "HealingCost", but it doesn't seem to be working.
The LUA Script code:
Code: Select all
Variable["HealingCost"] = GetHealingCost()
Code: Select all
private void OnEnable()
{
Lua.RegisterFunction("GetHealingCost", this, GetType().GetMethod("GetHealingCost"));
}
private void OnDisable()
{
Lua.UnregisterFunction("GetHealingCost");
}
double GetHealingCost()
{
Debug.Log("geting healing cost");
double healingCost = 101;
return healingCost;
}