Skip to content

Potential event naming conflict #15

Description

@paulmasri

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:

  • Vector2IntEvent (Vector2Int)
  • Vector2IntEvent (Vector2, int)

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.

  • Vector2IntEvent
  • Vector2_IntEvent

and a hyphen in the Create menu

e.g.

  • Vector2Int Event
  • Vector2-Int Event

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions