-
Notifications
You must be signed in to change notification settings - Fork 328
NEW: ISX-2099 InputAction code-setup (authoring) analytics #2003
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
|
||
// NOTE: We do not want to trigger entering/exiting play-mode for this small data-sanity check | ||
// so just stick to triggering it explicitly. A better test would have been an editor test | ||
// going in and out of play-mode for real but not clear if this is really possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is possible - there are other tests that do this E.g. texture streaming tests in trunk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to learn how to do that properly. I tried it but when I programmatically exited play-mode the test aborted. We state its possible in the docs, but couldn't see any reference to how: https://docs.unity3d.com/Packages/[email protected]/manual/edit-mode-vs-play-mode-tests.html
Note: You can also control entering and exiting Play Mode from your Edit Mode test. This allow your test to make changes before entering Play Mode.
EditorApplication.playMode doesn't seem to do the job for me....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In and edit and play mode test You should be able to use code like this:
yield return new EnterPlayMode();
yield return new ExitPlayMode();
See this for more details internally:
https://github.cds.internal.unity3d.com/unity/com.unity.memoryprofiler/blob/46687aa966bea49d093041968fb6d40cc8fd39f4/com.unity.memoryprofiler/Tests/Editor/SceneRootsAndAssetBundles/ReferenceToTests.cs#L58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will land this as-is and file a separate task on this. if ok @lyndon-unity ? There are many places to change to that / correct triggers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A ticket have now been filed.
Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionCodeAuthoringAnalytic.cs
Show resolved
Hide resolved
Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs
Show resolved
Hide resolved
Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, only minor comments.
Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionCodeAuthoringAnalytic.cs
Outdated
Show resolved
Hide resolved
Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionCodeAuthoringAnalytic.cs
Show resolved
Hide resolved
Will check this today/tomorrow morning |
… mode to allow for extensions.
…ologies/InputSystem into isx-2099-code-setup-analytic
Description
This PR adds play-mode editor analytics for tracking input action code-setup paths where users are using code/APIs to setup actions instead of assets.
Changes made
Added basic per-function analytics that also get aggregated into a simple boolean expression whether code setup paths are being used or not.
I personally think this is quite brittle and may generate false positives since it require manual suppression to avoid it. I see no current way around it. Notably in
OnScreenStick
and inTrackedPoseDriver
. All other (current) references to this API surface seems to be from test cases where the analytics are anyway stubbed away.Testing
Added test case to track analytics being recorded similar to existing analytics unit tests.
Tested with Analytics SDK locally. Also will be confirmed with analytics team in backend before merged.
Risk
Small, main risk is recording false positives indirectly through internal calls (in the future). Might be that this is heavily used on XR side? If it is it might require suppression there.
Checklist
Before review:
Changed
,Fixed
,Added
sections.Analytics_ShouldReportCodeAuthoringAnalytic
addedArea_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: