microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Create a test scene or a prefab for the FPSDisplay script #42

Closed alexdrenea closed 8 years ago

alexdrenea commented 8 years ago

Monitoring performance and frame rate is a pretty important part in developing a HoloLens app.

I quickly found the FPSDisplay script in the toolkit but there wasn't a lot of documentation on how to use it. So I wrote a prefab to make it really easy to integrate in your scene.

You guys think it would be a good contribution to the project? Maybe also use it in one of the demo/test scenes? If so any suggestions where ?

I wrote a blog post with details and a link to the file not sure if it's OK to post it here but you can find it on my profile page.

jwittner commented 8 years ago

I was wondering why we've duplicated this functionality here when it already exists in the Unity Standard Assets. Does the Unity one not function correctly?

For reference - it's under the Utility portion of the Standard Assets. The script is FPSCounter.cs, with Prefab FrameRateCounter.prefab.

alexdrenea commented 8 years ago

Good point - I looked into it just now and there are some differences:

  1. The Unity counter has a slower refresh rate and does not show the frame render time
  2. The prefab that comes with it is not ready to use directly as-is. The text is black so it needs a background to be displayed on top of and positioning needs to be adjusted

Also, I am sure a lot of people (me included) don't know about that script and most of them don't even import the Utility package in their HoloLens Unity app.

jwittner commented 8 years ago

Yeah, I had to switch the text to world space and change its color - no background needed though. Other than that I just dropped it under my camera and positioned it and it worked well. The refresh and render time may be strong arguments to keep this one.

I wonder how others feel.

On Tuesday, May 17, 2016, Alex Drenea notifications@github.com wrote:

Good point - I looked into it just now and there are some differences:

  1. The Unity counter has a slower refresh rate and does not show the frame render time
  2. The prefab that comes with it is not ready to use directly as-is. The text is black so it needs a background to be displayed on top of and positioning needs to be adjusted

Also, I am sure a lot of people (me included) don't know about that script and most of them don't even import the Utility package in their HoloLens Unity app.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/Microsoft/HoloToolkit-Unity/issues/42#issuecomment-219713948

NeerajW commented 8 years ago

Creating an FPS display prefab for the HoloToolkit makes sense. In addition to refresh and render times, we can add more counters in the future. Perhaps number of vertices, draw calls etc. However, I have not yet found a good way of calculating the draw calls.