Hey Guys!
So I have spent the last few hours getting to grips with Reflection and MethodInfo, etc,
And I’ve managed to write a custom in-game console which displays all functions with a specific key word, and their parameters(types, and optional), etc.
The way I call the functions across every asset using the targeted script is with:
“MethodInfo.Invoke”
The problem I’m having now, is that any public variables I change in game, such as whether a component is enabled, it keeps that state upon existing play mode.
It was my belief that the variables returned to their original/user-defined state upon returning to editor mode.
Am I doing something wrong?
Or am I going to have to create private versions of everything I want to edit with the console, and set them from the public on Start?
Thanks in advanced guys!
Oh and you can have the console script if you want!
It can call any function with any number of parameters!
(I’ve only written a parser for int, float, string, Vector2 and Vector3 so far)
Thanks again!