Calling static methods whilst attached to Unity

Hi All,

I have a controller class which exposes a series of static methods to enable interaction with a UWP application. At the moment I’m developing the Unity part of my project so I need to be able to debug the Unity elements. If I play my project from Visual Studio through ‘Attach to Unity and Play’ is there a way of interactively calling static methods of my controller class?

I’ve tried using the Visual Studio Immediate window but that gives the error ‘The expression cannot be evaluated while in run mode.’.

Does anyone know if it is possible to call static methods from an interactive session while the game is in Play?

Cheers,
Andy.

You could just create a button in a ongui method in a monobehavior file which calls your static function when pressed.

So simple I can’t believe I didn’t think of that. Perfect. Thank you.

Andy.