Hi Chris,
just a simple question - hopefully.
I just finished the brilliant resolution tutorial,
http://www.adventurecreator.org/tutorials/adding-screen-resolution-option along with part 2.
However, I can't seem to be able to run the builded game in windowed mode, despite having selected "Fullscreen window" in Player -> D3D9 Fullscreen mode. I even tried to take off the "Default is Full Screen" option but no luck.
I tried to take off the "Set Resolution" Actionlist which ran on start, and that that point it does work again. Is there anything I can add to the action so that I can add an option to have the game run in windowed mode?
I apologise if it's actually a complicated issue, but I can't grasp what's happening exactly. I don't see anything in the code that should force the game to not only adjust resolution but also forcing itself into going fullscreen.
p.s. I normally keep Unity's resolution+input dialog disabled.
Comments
In hindsight, I could have made this more clear. However, the point of the tutorial is to explain the principles in adding video options, rather than the exact code you need for your game (because everyone's needs are different)
Setting the bool to "false" instead would put it in windowed mode, but you'd probably want to extend the Action to make use of a "fullscreen bool" of your own that goes in the Global Variables list, just like the resolution one in the tutorial. You could then combine these variables into the Action, and process not just the resolution, but also the fullscreen state, in one, e.g.:
int resolutionSetting = GlobalVariables.GetIntegerValue (1);
bool isFullscreen = GlobalVariables.GetBooleanValue (3); // For example
if (resolutionSetting == 0)
{
// Set to 640x480
Screen.SetResolution (640, 480, isFullscreen);
}
// etc
I feel dumb now. Following the tutorial, I didn't pay attention to that true\false boolean near the resolution numbers and somehow I had completely forgot about those, to the point that I couldn't find the boolean haha. That makes everything clear.
Thanks also for the extra logic bit. That's of course what I planned to do. Gonna do that asap
edit: done, and works! Yohoo!
I have a cutSceene that runs as at startup On start and some actions do not run. Just nothing, no errors, so I tried to delay with Wait Engine for 0.1 now it works. I thought I was alone in this.
It is Actionlist: Run in Parallel > Object: Check Presence I had to sandwich Engine: Wait in between two.
AC 1.50b
It is affecting other stuff too.
For instance I have an actionlist asset of music that runs on start ( I call it from my OnStart cutscene)
And now I have to add Engine: Wait there too.
It is probably affecting anything related with OnStart scene. I have to check it.
I hope this will be fixed soon.