fungus icon indicating copy to clipboard operation
fungus copied to clipboard

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

Open Monydragon opened this issue 2 years ago • 1 comments

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 avatar Aug 16 '22 03:08 Monydragon

Have you solved it yet?

luckcatchyou avatar Mar 30 '24 18:03 luckcatchyou