snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.59k stars 291 forks source link

Flowchart window GUIerror Causing StackOverflow FIX in Unity 2021 #1053

Closed breadnone closed 2 years ago

breadnone commented 2 years ago

Description

Quick fix for the Flowchart editor window for Unity 2021 as reported by some users in https://github.com/snozbot/fungus/issues/1052

What is the current behavior?

Will throw GUI Error: Invalid GUILayout state in FlowchartWindow view, and will cause StackOverflow randomly.

Important Notes

EDIT: Description & Title

EDIT 2: Reverted unrelated commit!

stevehalliwell commented 2 years ago

I'll confirm the fix across supported unity versions, then squash merge. Might need to cherrypick across to master to make a bugfix build too.

P.S. try a rebase to drop the undesired commit rather than having to make another commit in the chain that undoes a previous one.

breadnone commented 2 years ago

I'm afraid I'll mess up something if I rebased this tbh -__- , either way, it's a one-liner fix (thus, mentioned as quick fix), I'll consider closing this and make a new pr instead.