Forum rules - please read before posting.

Can I load a save through script?

2»

Comments

  • Hi Chris,
    I put logs for all 3 of the lines but only 2 of them appear, 538 and 1764
    Here are the screenshots: https://imgur.com/a/jgI3Sb8

    Thanks so much for your time again Chris I really really appreciate it

  • Oddly, your custom script function "Load1Multi" is the last to be displayed - whereas it should be first, if that's what's causing the game to be loaded.

    Are all the messages appearing as a result of loading the save, i.e. did you clear the log before running the test?

    Make sure the "Collapse" button is also unchecked, which'll ensure all logs appear in the correct order.

    What is the full message (stacktrace included) of the first message that appears, once the process begins?

  • Hi Chris,
    Yes the logs are cleared before I get to that point.
    I turned off collapsible and is this what you mean by stacktrace?
    https://imgur.com/a/lxo76iq

  • It is, thank you.

    It looks like the SaveSystem operation is being run twice. Can you check that you don't have multiple copies of this component in your scene, or on the GameEngine / PersistentEngine prefabs?

    What's the stacktrace of the second "on level was loaded" message?

  • Hey Chris, thanks heres the stacktrace of the second one

  • That looks like the last line in the Console - is that not the 3rd instance of the line?

    If you replace the message with:

    Debug.Log ("on level was loaded", this);
    

    Then clicking the instances of the line in the Console will "ping" the GameObject that its coming from. Can you confirm that all three come from the PersistentEngine object, and that this object only has one "SaveSystem" component?

  • edited October 2022

    Sorry Chris my bad, I misunderstood what you meant.
    This is the second instance of the line:

    Edit: All 3 instances are being pinged by PersistentEngine and there's only 1 SaveSystem component

  • If this is all from one load request, it's not clear why you're getting three lines like this.

    I'm not sure I'll be able to understand why without seeing the project for myself.

    If you can PM me a .zip of the project, along with instructions on how to recreate the issue, I will take a look.

  • I appreciate that Chris, it's a big project so I'll make a backup and minimise it down for you. Thank you!

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.