Unity-Technologies / usd-unity-sdk

Integration of Pixar's Universal Scene Description into Unity. UPDATE: This package has been superseded by our new bundle of USD packages. Please see README & link below for further details.
https://forum.unity.com/threads/new-openusd-packages-now-available.1524583/
Apache License 2.0
498 stars 75 forks source link

Add Editor Analytics for package. #385

Closed vickycl closed 1 year ago

vickycl commented 1 year ago

Purpose of this PR

Ticket/Jira #: USDU-384

Links: Spike document | Editor Data Collection form

Begins adding basic analytics to understand package usage. Includes:

This PR doesn't capture everything we would like to, as called out in the doc. It's mostly an MVP to build upon. Payloads and Variants events standout as features that might be relatively simple but useful to collect.

Testing

Functional Testing status:

Currently attempting to write automated tests. Manually tested that the basic workflows collate the data correctly using the Analytics Debugger, and viewed the data on BigQuery, all looks ok.

Performance Testing status:

None yet.

Overall Product Risks

Complexity: medium

Halo Effect: low

Additional information

Note to reviewers:

Reminder:

SimonBoorer commented 1 year ago

Another thought - I think you can use timer.Elapsed.Seconds rather than timer.ElapsedMilliseconds * 0.001f - but might it make more sense to capture time in milliseconds anyway?

vickycl commented 1 year ago

@michaeljblain

This seems to now correctly indicate import failure for our test case. Longer term we should address error handling in a more thorough way. Some minor feedback:

  • the commit message doesn't indicate the purpose of the inclusion of the SceneTemplateSettings.json file.

This was an accident :) thanks for pointing it out!

  • I think we still should store the ms as a double instead of casting to float.

Done