I am trying to create a game with scripting in C#. I asked a similar question earlier but the example pointed to invovled hardcoding in the .cs file. Is there anyway to compile and run an Assembly containing C# code that contains functions, assignments, operators and types that can change variables in the hosting .cs file?
For example:
my .cs file contains a string variable myName.
my script code contains a function myfunction.
Is there any way to access myName from my function and change its value in my .cs file just by calling the Invoke method on myfunction? Without hardcoding myfunction in my .cs file?