In-Game Console and Permanent Variable Changes

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:

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!

Hey Guys!

I actually fixed it, and figured I should post the solution in case anyone else has this problem.

My console was invoking a method I chose for every ‘MonoBehaviour’ of the Method’s matching System.Type;

The problem was that it wasn’t just affecting the instantiated game-time version,
but the inspector version too.

The simple solution was when I was invoking a method, making sure that the 'MonoBehaviour’s ‘HideFlags’ were equal to ‘None’!

So! Done and dusted!

Thanks again guys!