lisandroct / EventSystem

Event system for Unity using ScriptableObjects
MIT License
14 stars 1 forks source link

Potential event naming conflict #15

Open paulmasri opened 3 years ago

paulmasri commented 3 years ago

Although I haven't encountered this as a problem in my projects so far, there is the potential for a naming conflict on the generated code.

The following two event types result in the same event class name because of how event arguments are concatenated:

When generating code this does not generate any errors, but the first event type gets overwritten by the second one.

If you think it's worthwhile, the event names could use underscores to delineate the argument types in the class names

e.g.

and a hyphen in the Create menu

e.g.

Of course this would be a breaking change to any projects currently using more than one argument, but wouldn't affect anyone using just the default events.