I am currently programming using Unity and C#, and I have trouble linking a string value to a function using a dictionary.
I think of a code looking like this :
private string name;
void function1()
{
// code
}
private Dictionary<string, ?function?> nameToFunction = new Dictionary<string, ?function?>();
// The part between interrogation marks being unknown to me
// Trying to call the function with the name
nameToFunction[name]
I am sorry if my question isn't relative, or if there are simpler solutions I haven't thought of, but I am starting to learn programming.
Thanks for your answers !