PhaserEditor2D-v3 icon indicating copy to clipboard operation
PhaserEditor2D-v3 copied to clipboard

Double clicking newly-added component saves .components and opens script editor

Open michaelgundlach opened this issue 4 years ago • 4 comments

Right now if I want to create a new component, I

  1. Go to e.g. Behaviors.components
  2. Press A
  3. Change its name in the Inspector
  4. Double click the component to edit it - nothing happens
  5. Press Ctrl-S to save Behaviors.components
  6. Double click the component again to open the editor.

I'd like to skip #5 and #6 :)

michaelgundlach avatar Jan 06 '22 14:01 michaelgundlach

Do you mean, auto-saving the file?

PhaserEditor2D avatar Jan 06 '22 14:01 PhaserEditor2D

Sure, or not requiring a save in order to edit the component. Once the user double clicks a component they have expressed the intention to edit it, so that should be the outcome.

michaelgundlach avatar Jan 06 '22 14:01 michaelgundlach

Mmm... I don't like to make "hidden" operations. I prefer to show a message to the user: "The component is not compiled yet, do you want to save and compile the components?". If the user agrees, then it saves the components, compiles them, and opens the output file.

PhaserEditor2D avatar Jan 06 '22 14:01 PhaserEditor2D

Agreed, then they've moved their fingers to the keyboard to type and can just press Enter to confirm

michaelgundlach avatar Jan 06 '22 15:01 michaelgundlach

I close this because, in future versions of the editor, I should remove user components. Instead, I encourage using the new script nodes.

PhaserEditor2D avatar Apr 25 '23 05:04 PhaserEditor2D