Forum rules - please read before posting.

Subscene not opening properly on load

Hi!

My game is first-person, 2D, and is built using scenes as parents (the active scenes) that hold multiple subscenes that get added/removed as the player navigates through a location.

The issue I'm having is that when the player is in specific subscenes and saves and loads that file, the game doesn't load properly. It loads in without certain menu elements, without a cursor, and just displays the main camera rather than the game camera. It's not crashed - everything is still running and animations still play, but the player is stuck. There's nothing at all in the console, and watching the hierarchy both the parent and the subscene load in as they should. Most of the subscenes load in perfectly, there are just a handful that don't.

Before this, I had this issue with about 5 out of 30 subscenes, and for the life of me could not find any difference with those 5. I ended up making new scenes and copying everything in - but this took forever because I had to re-link every reference. I'd really like to avoid doing that this time if possible.

Any ideas? Here's a video for reference.

Thank you!

Comments

  • Is the issue only specific to those scenes, or is there another pattern, i.e. when loading from a particular scene, or the relative ordering of scenes in the Build Settings?

    I'm not familiar enough with your game to understand what things should be looking like after loading the save-file in your video. Is the sub-scene hidden behind the main scene?

    What are your AC and Unity versions, and are any custom scripts/assets involved in the save/load process?

    The Save-game File Manager can be used to extract save-game data - can you use the "Copy to Json" function to paste in the data for a working vs non-working save?

  • Hi Chris,

    I'd tested loading from different scenes and many other things to try and find a pattern, but no luck. I wasn't aware that the order of the scenes in the build settings had any effect on anything, but I had tried saving one of those scenes with a new name, so adding that would have put it at the bottom of the build list.

    The main things in the video are missing ui buttons and no cursor/player input.

    My versions are Unity 2018.3.0f2 and AC 1.70.1 :# (I'd like to update, but I'm afraid of breaking everything). There are no custom scripts involved.

    Unfortunately I'm not seeing a Copy to Json button, likely because of my version, but I have the .save and .savj files for the two saves, so let me know if these would be useful to you and I can find a way to share them.

  • On another note, do you think it would be possible at all to update to the newest version of both unity and AC? I tried on a duplicate of my project, and updating unity went fairly smoothly with minimal issues, but updating AC caused loads of compiler errors. Am I too far gone at this point?

  • I'd say its certainly worth trying - in a backup/duplicate project - even if just to see if that solves the original issue.

    The "Upgrade notes" sections in the Changelog will note any changes that you may need to be aware of. If you can share the compiler errors - and the scripts that reference them, if custom - I can try to spot what's wrong.

  • edited April 17

    Here's what I'm getting:

    https://imgur.com/a/LfNyGWg

    Besides the compiler errors, the call stacks are weird as well. I didn't have these in my working version.

    Is there any way I could incrementally update AC using older versions? That's what I did with unity and it seemed to make the process smoother.

    Thank you so much for your help Chris!

  • Let's try to first see if the update fixes the original issue.

    Can you test the issue after deleting the custom Actions that are throwing errors?

  • Unfortunately I cannot run the game to test - deleting those scripts started a cascading effect of new compiler errors.

  • Unless you have custom scripts that affect the way scenes are added/loaded, you should be able to delete all custom scripts to get things compiling.

    Alternatively, if you have custom Actions, you're welcome to post them here and I'll give a go at upgrading them.

  • Hi Chris, I want to thank you for your willingness to help, but upon messing around with it further and working with a fresh version, I'm thinking I'm too far along in my game to be changing this - even just updating unity and not AC created a handful of new bugs to fix that I found while testing.

    I think for the original saving/loading issue, I'll just go and brute force it. This honestly will be the faster option.

    Thank you again for your awesome customer support!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.