Hi Chris,
I am having a little issue with my Screen Resolution in my options, there is a bit of a delay in the resolution changing, sometimes you need to click through a couple of times. Any reason why this is happening?
This was the feedback given from the QA tester at GOG.
The game starts at 640×480 by default and changing it takes much more time than it should, as there is a significant delay before a resolution can be changed again. Ideally, the game should start in the resolution the same as the desktop. Moreover, changing resolutions should not take minutes. It’s a very basic option that’s supposed to take no longer than a few seconds to set.
Below is my ActionApplyResolution.cs and further down is a folder with screenshots and a video of the issue.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace AC
{
[System.Serializable]
public class ActionApplyResolution : Action
{
public override ActionCategory Category { get { return ActionCategory.Engine; }}
public override string Title { get { return "Apply resolution"; }}
override public float Run ()
{
int chosenIndex = GlobalVariables.GetIntegerValue (267); // Replace '0' with your own variable's ID number
if (chosenIndex >= 0)
{
Resolution chosenResolution = Screen.resolutions [chosenIndex];
Screen.SetResolution (chosenResolution.width, chosenResolution.height, Screen.fullScreen);
KickStarter.playerMenus.RecalculateAll ();
}
bool windowed = GlobalVariables.GetBooleanValue (266);//CHANGE TO WINDOWED/FULLSCREEN VARIABLE
Screen.fullScreen = windowed;
return 0f;
}
}
}
You can see the video here:
https://www.dropbox.com/scl/fo/91bzhvbgugyfat6l04t4t/h?rlkey=l62c3eyavjdtyo3w8d544b2yf&dl=0
Thanks Chris!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Try the Graphic Options template on the Downloads page. It replaces the old screen-resolution tutorial, and also sets its default value to the current resolution.
Thanks Chris!
Seem to be getting a number of errors!
Assets/AdventureCreator/Downloads/Graphic options/Assets/Scripts/Editor/GraphicOptionsTemplate.cs(120,46): error CS0246: The type or namespace name 'TemplateEditor' could not be found (are you missing a using directive or an assembly reference?)
UNITY 2020.3.30f1
AC v1.75.2
See screenshots here
https://www.dropbox.com/scl/fo/osw8i71pfppy04tefuuxc/h?rlkey=rekx719ecyd7q5f6ggqg8zvee&dl=0
The template system requires the latest AC version.
Ok, so updated to the latest AC, and all working on editor, but I exported my game (MAC build) and when I went ot open the menu, it just crashed the game?
See video and screenshots here:
https://www.dropbox.com/scl/fo/rxfjteea3tqr5jcqhw2jw/h?rlkey=ru9cbppevxh769gtycc6uh7dl&dl=0
Check Unity's player and crash Log Files - any relevant details?
Did you apply the template following the included instructions, or add the Menu manually? Check that the Canvas prefab the Menu references uses a global string variable that's present in your Variables Manager.
I downloaded the package from the download page, imported and hit apply. Can you help with more info on connecting the global variable? See my screenshots here:
https://www.dropbox.com/scl/fo/rxfjteea3tqr5jcqhw2jw/h?rlkey=ru9cbppevxh769gtycc6uh7dl&dl=0
Check the log files, and share a screen of the prefab's Inspector.
ok checking now, prefab inspector shots here:
https://www.dropbox.com/scl/fo/dn5hj0v722ecnvu06sit6/h?rlkey=u7q6s6pbyfwgm81lqkbos4pe3&dl=0
I have updated the template. Download and re-import it.