Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCF-6396 - Processor content model re-org #2123

Open
wants to merge 2 commits into
base: docs-content-model-reorg
Choose a base branch
from

Conversation

siobhan-unity
Copy link
Collaborator

Re-org for Processor documentation.

@unity-cla-assistant
Copy link

unity-cla-assistant commented Feb 3, 2025

CLA assistant check
All committers have signed the CLA.

@siobhan-unity siobhan-unity changed the title First draft of processor docs re-org DOCF-6396 - Processor content model re-org Feb 3, 2025
Comment on lines 23 to 27
When you create bindings for your [actions](actions.md), you can choose to add processors to the Bindings. These process the values from the controls they bind to, before the system applies them to the Action value. For example, you could invert the `Vector2` values from the controls along the Y axis before passing the values to the associated Action.

Processors on Actions work the same way, but affect all bindings on an Action.

If there are processors on both the Binding and the Action, the Input System processes the processors from the binding first.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixture of B(b) and A(a) for bindings and actions

@@ -1,25 +1,30 @@
# Predefined Processors
# Built-in Processors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need this page? it's repeating information that's already in the API docs.

I'd be tempted to bin it and add something to the intro doc that's like:

## Built in processors

The Input System package comes with a set of built-in processors, defined in the `Processors` class, which you can use with [bindings](ActionBindings.md), [actions](actions.md) and [controls](controls.md). For a list of processors, refer to the [`Processors` API documentation](../api/UnityEngine.InputSystem.Processors.html)

@duckets what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be useful to have a much smaller simpler page with a list or table of the built-in processors, each with a single line describing what they are and a link to the API.

Also need to check that the API description is at last as good as the description from the manual, and replace if not - for example i looked at "Invert Vector 3" and the manual says:

Inverts the values from a Control (that is, multiplies the values by -1). Inverts the x axis of the vector if invertX is true, the y axis if invertY is true, and the z axis if invertZ is true.

Whereas the API says:

Inverts the x and/or y and/or z channel of a Vector3.

The manual content is better, so we should replace the API text with that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ben's suggestions works for me.

There is some information in this page that isn't in the API docs, and I"m not sure if it's more appropriate for the user manual or the API docs - specifically I'm talking about the paragraphs in lines 112 and 113. What would you suggest for those?

@@ -1,8 +1,10 @@
# Writing custom Processors
# Writing custom processors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the toc this is "Write" rather than "Writing"


If you [create a layout from JSON](layouts.md#layout-from-json), you can specify processors on your Controls like this:

```CSharp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```CSharp
```json

Copy link
Collaborator

@duckets duckets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change, which is to simplify the built-in processors page

@@ -1,25 +1,30 @@
# Predefined Processors
# Built-in Processors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be useful to have a much smaller simpler page with a list or table of the built-in processors, each with a single line describing what they are and a link to the API.

Also need to check that the API description is at last as good as the description from the manual, and replace if not - for example i looked at "Invert Vector 3" and the manual says:

Inverts the values from a Control (that is, multiplies the values by -1). Inverts the x axis of the vector if invertX is true, the y axis if invertY is true, and the z axis if invertZ is true.

Whereas the API says:

Inverts the x and/or y and/or z channel of a Vector3.

The manual content is better, so we should replace the API text with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants