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

fix fpsdisplay perf, add comments and frame range #1993

Merged
merged 1 commit into from
Apr 23, 2018
Merged

fix fpsdisplay perf, add comments and frame range #1993

merged 1 commit into from
Apr 23, 2018

Conversation

david-c-kline
Copy link

FpsDisplay was repeatedly fetching components if the user did not use both a TextMesh and a uGui Text component. Fixed by adding Start() and calling InitBuffer there instead of in Update.

Also added a range (1-300) to the number of frames used to calculate FPS and some documentation comments.

Fixes: #1913 .

[Tooltip("How many frames should we consider into our average calculation?")]
[SerializeField]
[Range(1, 300)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 300?

Copy link
Author

Choose a reason for hiding this comment

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

it's 5 seconds at 60fps. no reason other than that. this field feels like it needs a range value. do you have a suggested max number of frames?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope just curious

@david-c-kline david-c-kline merged commit b40dfbe into microsoft:may18_dev Apr 23, 2018
@david-c-kline david-c-kline deleted the fps1913 branch April 23, 2018 19:42
@StephenHodgson
Copy link
Contributor

@davidkline-ms is there a PR for dev?

@david-c-kline
Copy link
Author

@StephenHodgson, thanks for keeping me honest. There will be one today :)

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.

2 participants