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

Avoid using UnityUtil outside the ViewerService #5254

Open
4 tasks
Amantini1997 opened this issue Nov 19, 2024 · 0 comments
Open
4 tasks

Avoid using UnityUtil outside the ViewerService #5254

Amantini1997 opened this issue Nov 19, 2024 · 0 comments

Comments

@Amantini1997
Copy link
Contributor

Description

Right now, there are a few places where we call UnityUtils methods, mainly calibration components.
It is preferable to use ViewerService (which wraps those methods and then provides an API to call them) instead.

Suggested solution

Invoke the equivalent UnityUtils methods from ViewerService instead. If missing, create them.

Goal

  • Avoid using UnityUtils directly from components outside the Viewer

Tasks

  • Identify the places (outside the ViewerService) where UnityUtils methods are invoked
  • If missing, create the wrapper for those methods in ViewerService (note: I use the word "wrapper", but they might be more than mere wrapper. For instance, instead of just awaiting for the viewer to be ready and then call the UnityUtils method, they may contain more logic to provide a more concise API that better reflects the frontend needs. Use discretion)
  • Replace those UnityUtils methods with ViewerService methods
@Amantini1997 Amantini1997 changed the title We should avoid using UnityUtil outside the ViewerService Avoid using UnityUtil outside the ViewerService Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant