Forum rules - please read before posting.

Some questions about saving and loading the game

Hi. I I have some questions about the Save/Load system.

  1. I use a custom action to switch cameras with Cinemachine. After I load the save file, AC recognizes the last active camera, but Cinemachine doesn't, so a different camera is displayed. AC's Status debug window shows the correct camera. How can I access the information of the saved camera so I can switch to it using my custom method? Or what would be the best way to approach this?
  2. I have a button to go back to the Main Menu. Then, on the main menu, I have a Load game button. After clicking on it and after the scene loads, my Pause menu is active. The Pause menu prefab doesn't have any "Remember" component, then why is it remaining active?
  3. Is the OnLoad cutscene of a scene run only when Loading the save file? Does the OnStart cutscene run as well? Will the OnStart cutscene run every single the time the scene is visited during gameplay?
  4. I have some scenes that are very different from normal gameplay. There are many local systems to determine the palyer progress in these scenes. Relying on the Player position, hotspots, triggers, etc. isn't enough. If I want to save the different information exclusive to these scenes, how could I do it?

Comments

    1. What method are you using to integrate the Cinemachine Brain with AC? An integration package, which supports saving, is available on the Downloads page.
    2. Check that the Pause menu's ID number is unique in the Menu Manager - this was an issue with an earlier version. If necessary, you can run a Menu: Change state Action after loading to force the Pause menu off.
    3. Only one or the other will run - not both. OnStart is run when the scene begins via natural gameplay (i.e. beginning the game, or switching to it with an Action). OnLoad is run when the scene begins as a result of loading a save-game.
    4. A tutorial on writing custom Remember components can be found here.
  • Thanks for the response!

    1. I'm not using the package available on the Downloads page. I'm using a custom action that calls the main camera's SetGameCamera() and sets the new cinemachine camera's priority. Installing the package would require reworking many portions of my game, so I would rather not do that. I'm thinking of a way to access the saved camera and then in the OnLoad set the Cinemachine priority. I imagine I would have write another custom action for this.
  • The package on the Downloads page includes a "Remember Cinemachine VCam" component, which you can use without the rest of it.

    Attaching it to a Virtual Camera will save its priority, position, etc - is that the data you're looking to save?

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.