I've started fiddling around with showing screenshots in my load menu, which was originally based on the default Unity UI you can choose in the new game wizard.
It seems that the save menu is still active when the screenshot is saved, so you also get a nice picture of the save menu smack in the centre of the screenshot.
This doesn't happen with the AC menu system - I checked with two completely fresh projects based on the new game wizard, one using the default Unity UI and one using AC's system.
Not a huge problem for me right now, but just thought I'd share it here...
Comments
Sorry for bringing this up again. I use AC 1.50f
I have the same problem using with AC based ones and it looks like UI ones too.
Display: Label and Screenshot
Settings: Take screenshot when saving - checked
Time display: Time and Date
If it had been dealt with later versions of AC.
Could you kindly recommend how to fix it in 1.50f
I know I should have updated AC but I'm too scared to redo my project.
Add to Menu.cs:
Replace SaveSystem.TakeScreenshot coroutine (around line 324) with:
Then in PlayerMenus, replace the following on line 278:
with:
When I add to Menu.cs it gives 4 errors
Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs(155,74): error CS0103: The name `RuntimeCanvas' does not exist in the current context
Replace the two mentions of RuntimeCanvas with canvas.
Thank you Chris for looking into it.
I have 5 more new errors instead after replacing all RuntimeCanvas to Canvas in menu.cs
Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs(155,74): error CS0119: Expression denotes a
type', where a
variable',value' or
method group' was expectedAssets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs(157,66): error CS0120: An object reference is required to access non-static member `UnityEngine.Component.gameObject'
Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs(160,48): error CS0120: An object reference is required to access non-static member `UnityEngine.Component.gameObject'
Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs(167,74): error CS0119: Expression denotes a
type', where a
variable',value' or
method group' was expectedAssets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs(171,48): error CS0120: An object reference is required to access non-static member `UnityEngine.Component.gameObject'
"canvas" with a lower-case "c".
Thank you it all works but I had to put back
private string GetSaveExtension ()
{
if (GetSaveMethod () == SaveMethod.XML)
{
return ".savx";
}
else if (GetSaveMethod () == SaveMethod.Json)
{
return ".savj";
}
return ".save";
}
to SaveSystem.cs since it was giving me
Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs(92,149): error CS0103: The name `GetSaveExtension' does not exist in the current context
and all refered to GetSaveExtension
I tried to replace GetSaveExtension to TakeScreenshot gives 9 other errros like
Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs(92,149): error CS1501: No overload for method
TakeScreenshot' takes
0' argumentsAssets/AdventureCreator/Scripts/Save system/SaveSystem.cs(106,71): error CS1502: The best overloaded method match for `System.IO.DirectoryInfo.GetFiles(string)' has some invalid arguments
Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs(106,71): error CS1503: Argument
#1' cannot convert
object' expression to type `string'I made no mention of removing GetSaveExtension. Only that the TakeScreenshot function above should replace the existing TakeScreenshot function.
Thank you Chris, I shouldn't have removed that, my bad.
However I noticed now I get all menus (inventory, menu, and other in game menus) flick off and on when autosave is executed. It turns them off and makes a screenshot (in the editor and build). There is no smooth nice screen transition between scenes.
Is there a way to disable it on autosave?
Line 984 of SaveSystem reads:
Amend it to the following to prevent taking a screenshot when autosaving:
Autosave saves nicely and no menus flicks when I change scenes now, but the autosave screenshot in load/save menu is not updated.
Sorry to drag this on and take your time Chris.
Are you looking to disable save screenshots for the autosave, or show menus during it? It's got to be one or the other, if you don't want to have the menu flickering, which is necessary when saving in order to hide them from the screenshot.
To allow for save screenshots when autosaving, but show menus during it, undo the previous change and replace the TakeScreenshot coroutine with:
Then replace:
with: