What’s the difference between all of those? I’m using Unity5.
It’s a valid question and the answer is simple: There’s no difference.
The EventType is just an enum and “MouseDrag” as well as “mouseDrag” return the same value. It’s declared like this:
public enum EventType
{
MouseDown,
MouseUp,
MouseMove,
MouseDrag,
KeyDown,
KeyUp,
ScrollWheel,
Repaint,
Layout,
DragUpdated,
DragPerform,
DragExited = 15,
Ignore = 11,
Used,
ValidateCommand,
ExecuteCommand,
ContextClick = 16,
mouseDown = 0,
mouseUp,
mouseMove,
mouseDrag,
keyDown,
keyUp,
scrollWheel,
repaint,
layout,
dragUpdated,
dragPerform,
ignore,
used
}
I can’t remember which came first the “lowerCamelCase” or the “UpperCamelCase” version, but at some point in history they decided to use the other version. Since then, for backward-compatibility, we have both versions.
Since i can’t remember which they (Unity) actually prefer i can’t suggest which one you should use. Both will work at the moment. Maybe they will implement an automatic API update (like for those shortcut properties) when they finally deprecate one of the two.