Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Variables Null Reference After Working correctly for a first run-through. #1059

Open
Monydragon opened this issue Aug 16, 2022 · 1 comment
Labels
bug Doing something it's not meant to, or not doing something it's meant to.

Comments

@Monydragon
Copy link

Describe the bug
I have multiple scenes with flowcharts in each of them with a few global variables. when trying to run the game and initially everything works correctly the global variables work as expected. However after running through and retrying by clicking play on the editor again it causes the error "NullReferenceException: Object reference not set to an instance of an object" and the class that it is referencing is handling global variables.

To Reproduce

  1. Create multiple scenes with flowcharts.
  2. Add global variables on each of the flowcharts to mirror my experience 2 string and 1 bool global variables.
  3. Have C# scripts modify global variables by accessing the flowchart and saving strings/bools to them
  4. Run through multiple times having a flowchart have excute on game started event and having say blocks that have the global variables in them.
  5. Watch for unexpected/crashes/errors.

Expected behavior
Global variables to work as expected when running the game.

Screenshots
FungusError

Versions & Platform (please complete the following information):

  • Unity version 2021.3.7f1
  • Fungus Version 3.13.8
  • Editor OS: Windows 10
  • Build Platform WebGl, Windows, Linux
@Monydragon Monydragon added the bug Doing something it's not meant to, or not doing something it's meant to. label Aug 16, 2022
@luckcatchyou
Copy link

Have you solved it yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Doing something it's not meant to, or not doing something it's meant to.
Projects
None yet
Development

No branches or pull requests

2 participants