Hi…
So I am kind of new to unity and C# and working on a project.
Right now I am stuck in setting panel. I put a toggle to turn the game window in to fullscreen and back to window mode.
tried so many scripts and spend couple of hours searching on google.
any how.I do not want to use a key to change to fullscreen.
did try:
screen.fullscreen = !screen.fullscreen;
and bunch of variables of this but nothing seems to be working.
just want the toggle function to switch between fullscreen and window mode.
I know this is an old post, but the answer is that you have to set the function to public. If it’s a private void, then you’re not going to be able to access the function outside of the script itself.