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

Fixed destroying of EventHandler on "Create/Fowchart" menu item #951

Open STARasGAMES opened 3 years ago

STARasGAMES commented 3 years ago

Comment in code says that this should apply only to GameStarted event handler. Now prefab may have a default EventHandler that is not a GameStarted. For example, MessageReceived.

What is the current behavior?

I change the Flowchart prefab to have MessageReceived as a default event handler. When creating Flowchart using "Tools/Fungus/Create/Flowchart" menu item, EventHandler gets deleted.

What is the new behavior?

I change the Flowchart prefab to have MessageReceived as a default event handler. When creating Flowchart using "Tools/Fungus/Create/Flowchart" menu item, EventHandler stays as expected.

Ohh... And I see I added a new line character at the end of the file. I don't know how to fix this:)