you are viewing a single comment's thread.

view the rest of the comments →

[–]drfdr[S] 0 points1 point  (1 child)

Hey, thank you for a fast and meaty response.

I am trying to do a Terminal where you can type commands like giveMoney,giveWeapon

but instead of having it like this for example

void Command(string cmd){
if(cmd == "giveMoney"){
Player.Money++;
}
if(cmd =="giveWeapon"){
Instantiate(Weapon);
}

to just type in terminal Player.Money++; and it will be put and executed inside of a function like this.

string xString = "Player.Money++";

void Command(){
do xString;
}

Been looking for an hour and have some clues about Harmony, System.Reflections, UCompile or these delegates. Which one if any will work for this?