Forum rules - please read before posting.

Variables in the Variable Editor are gone during runtime.

I have a list of Global Variables but whenever I play the game, the variables are missing and only a warning that says "Runtime values cannot be viewed without a GameEngine present in the scene." Fortunately, the variables come back when the game isn't running but this prevents me from accessing the Global Variables with the "GlobalVariables.GetVariable(").FloatValue". Is there a way to fix this?

Here's the image for reference:
https://imgur.com/a/BIthNdf

Comments

  • The runtime values are handled by AC's scene objects - for them to show, you will need to be running an AC scene.

    To show the variables, you'll either need to use the Scene Manager to convert the current scene into an AC one, or uncheck "Show runtime values?".

  • Question? In order to convert the current scene into an AC one is by clicking "Organise scene:" With folders/Without folders?

  • Either will convert it. The folders are just to aid organisation - the "Without folders" option will make the minimum additions to the scene for it to become an AC scene.

  • edited January 19

    I tried what you suggested and it didnt work but I did found the reason why my Variables disappear and its because I added that scene to the Build Profile and set it active. Which also gives me two errors that I couldnt use "GlobalVariables.GetVariable("Brightness").FloatValue;"
    Why does this happen?

    Pic for reference:
    https://imgur.com/a/6Qfxpb6

    EDIT: I realized it wasnt the added scene to the profile thats causing the issue but rather I tick off the "Show runtime values?" to make the variables shown again. But those two errors is something I couldnt put my finger at eventhough the Variables are properly named in the Variable Editor.

  • The top of your Console begins with a "Bypassing regular AC startup" message, indicating that the open scene is a Loading screen, which does not involve AC's regular initialisation process and won't generate runtime instances of Global variables if this is your game's first scene.

    Adjust your Loading screen settings to prevent this scene from being considered your Loading screen, and the data should be found.

  • How will adjust my Loading Screen Settings on that scene?

  • Under the "Scene loading" section of the Settings Manager.

  • You mean this one that says "Use loading screen"? then Choose loading scene by: Number, Loading scene index: 0?

    https://imgur.com/a/Ejh3DPP

    My Main Menu scene is 0 so that would mean all this time my MainMenu is being used as a Loading Scene and thats why I get this weird Variables going missing in the Variable Edtior?

  • That's correct.

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.