ink-unity-integration
ink-unity-integration copied to clipboard
Beginner question about reading Unity vars from Ink
I don't have perfectly clear how to read Unity varibles from within Ink.
i initialize characters:
public class Character : MonoBehaviour
{
public string characterName;
public Sprite icon, fullFigure;
public int health;
public int damage;
public int money;
public List<string> inventoryList = new List<string>();
public List<string> skillsSetList = new List<string>();
public string mood;
public enum Mood
{
noMood, pleased, neutral, upset, leaving
}
}
then write and bind functions for getting values:
public void GetCharacterMoney(string characterName)
{
Debug.Log("Money:" + GameObject.Find(characterName).GetComponent<Character>().money);
}
can i return the value to Ink instead of writing to the log?
help please!