Feedback: Generated C# Asset documentation

The generated C# input actions asset has lots of handy features. For example it’s IDisposable. It has properties like public InputBinding? bindingMask, public ReadOnlyArray<InputDevice>? devices and public ReadOnlyArray<InputControlScheme> controlSchemes. It has a public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false) method.

The generated action map structs it generates have associated interfaces and a way to bind your code to them as callback listeners. These things are all great!

But they are hard to discover. Most of them are undocumented. The only documentation about the generated class we get is here:Input Action Assets | Input System | 1.11.0. We get a small example which thankfully shows off the SetCallbacks approach, but the scripting API is completely undocumented.

I understand it may be a challenge to document generated code that has dynamically named properties, but a quick overview page of all the available properties, interfaces, and methods that will be generated would be an excellent tool. As it is, I find myself generating such a class manually just to try to remember what’s in it.

1 Like