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

Grouped actions cause NullReferenceException #74

Closed
jaylarkstudios opened this issue Nov 10, 2018 · 1 comment
Closed

Grouped actions cause NullReferenceException #74

jaylarkstudios opened this issue Nov 10, 2018 · 1 comment
Assignees
Labels
bug Something isn't working confirmed
Milestone

Comments

@jaylarkstudios
Copy link

Unity version 2018.2.151f1. After updating to GameFlow v1.1.2 the Group action is throwing a NullReferenceException, as long as it contains at least one action. I've tried several different actions inside the Group action, and they all cause an exception to be thrown, though the message displayed varies.

When the Group contains Interpoplate or Wait actions, the exception reads

NullReferenceException: Object reference not set to an instance of an object
GameFlow.TimeAction.StartTimer ()
GameFlow.TimeAction._OnSetup ()
GameFlow.Block.Setup ()
GameFlow.Group.OnSetup ()
GameFlow.Block._OnSetup ()
GameFlow.Block.Setup ()
GameFlow.Sequence.Step (Boolean ignoreBreakpoint)
GameFlow.Program.Step (Boolean ignorePause)
GameFlow.Program.Update ()

When the Group contains Set Variable Value or Play Sound actions, the exception reads

NullReferenceException: Object reference not set to an instance of an object
GameFlow.Group.OnExecute ()
GameFlow.Sequence.Step (Boolean ignoreBreakpoint)
GameFlow.Program.Step (Boolean ignorePause)
GameFlow.Program.Update ()

If the Group action is empty, it does not throw an exception.

To reproduce:

  1. Create a new scene and make sure the newest version of GameFlow is imported.
  2. Create three cubes. Position one in the middle and deactivate it. This will be the interpolate target. Move the other two to opposite ends of the screen.
  3. Attach the GameFlow component to the Main Camera.
  4. Add the OnStart program to the GameFlow component.
  5. Add two Interpolate actions, and have both side cubes interpolate their position to the middle cube.
  6. Run the scene. The two cubes should move to the center, one right after the other.
  7. Stop the scene, and create a Group action in the GameFlow component, and then move both interpolate actions inside the group.
  8. Run the scene again. This time, the cubes do not move, and the console is filled with NullReferenceException messages.
@evasiongames evasiongames added this to the v1.2 milestone Dec 1, 2018
@evasiongames evasiongames added bug Something isn't working confirmed labels Dec 1, 2018
@evasiongames evasiongames self-assigned this Dec 1, 2018
@evasiongames
Copy link
Owner

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests

2 participants