snozbot / fungus

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

The Set Variable and If commands don't properly show ObjectVariable data #893

Closed CG-Tespy closed 4 years ago

CG-Tespy commented 4 years ago

Describe the bug When you set a variable for these commands to work with, the Data field just shows empty lines.

To Reproduce

  1. Create a Flowchart with two ObjectVariables
  2. Add a block with a Set Variable command
  3. Under Conditions, set the variable to one of the ObjectVariables in the flowchart
  4. See as the Data field is empty
  5. You'll get similar results when doing this with the If command

Expected behavior The data field for ObjectVariables to let you select wither a variable or a specific Object

Versions & Platform (please complete the following information):

Additional Context The same issue happens with custom variable types.

pansam14 commented 4 years ago

If this helps, it looks like the object variable is just missing its propertyDrawer. Duplicating GameObjectVariableDrawer and just rewriting stuff to use Object solved this for me.

CG-Tespy commented 4 years ago

@pansam14 Thank you very much! That solved the issue for me as well ^_^