Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Exalia · Aug 19, 2013 at 01:41 PM · androideditorprofilerstatistics

How to display profiling data on screen (Android)

Hi there,

I was wondering if its possible and if it is how to display Profiled data such as CPU Usage, FPS, Frame time, Draw Calls, Texture Count and Texture Memory via GUI Text or something similar.

I've managed to set up FPS easily however real FrameTime (before Vertical Sync) is proving difficult to access aswell as the others.

Thanks in advance for the help :)

alt text

statisticswindow.png (92.5 kB)
Comment
Add comment · Show 12
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Exalia · Aug 21, 2013 at 11:35 AM 0
Share

I thought this would be a common thing that people do i'm really surprised I haven't got any replies yet :S

avatar image roojerry · Aug 21, 2013 at 11:45 AM 0
Share

Do you have Unity Pro? It comes with a built in profiler. Do you need the profiling data on the screen? Drawing that information would actually skew your profiling results, much like the running the editor skews profiling.

Here is another question similar to yours. Sounds like you are able to access those same stats, but only from within the editor.

avatar image Exalia · Aug 21, 2013 at 12:00 PM 0
Share

I do have Unity Pro yes, I require the profiler to be shown on screen.

Even so it is important that people viewing my game can have the ability to see these stats.

Damn it, the stats window you get in the editor is exactly what I need but I need it running on the release build. :(

avatar image roojerry · Aug 21, 2013 at 12:06 PM 0
Share

Why would people playing your game need to see any of these stats? Those stats are really for development and debugging. I dont really see how they would help enhance the gameplay for your users

avatar image Exalia · Aug 21, 2013 at 12:39 PM 0
Share

This seems to be a bit of a personal and irrelevent question

I work for a company that sells IPs. To sell these IPs and maintain investors I have to create demos using my company's IPs to convince investors and future partners why they should.

I'm attempting to create a Demo (not a game, but If i tell people i'm creating a demo they probably wont have any idea what im talking about)

I need to display this information to express how the hardware is handling the processes on screen.

I hope that answers your question although I feel like I didn't need to tell you any of that really

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by c.rajiv.chandel · Aug 21, 2013 at 01:20 PM

So it depends on what all information you want for each of this information you have to use different methods; I already this in past and it helps in checking out build performance on device.

For FPS you can use these scripts:- http://wiki.unity3d.com/index.php?title=FramesPerSecond

For monitor memory usage usage:- getruntimememorySize(object) getmonoheapsize getMonoUsedSize

you can google these function, and you can display this on screen using GUItext or anything you feel comfortable with. hope this helps? Thanks

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Aug 21, 2013 at 01:28 PM 0
Share

Those three methods seems to be about memory occupation not CPU usage. You can have plenty of free space but a processor running snail speed.

avatar image
1

Answer by fafase · Aug 21, 2013 at 01:20 PM

So unity does not let you see those information because it seems it won't allow you to use the PerformanceCounter class, even though it shows up on Intelisense (or I am doing wrong).

You could have a secondary program though, like a basic opengl or VS Form application on which you display diagram based on values fetched from the PerformanceCounter class.

http://msdn.microsoft.com/en-us/library/w8f5kw2e.aspx

You open the side application looking there:

http://answers.unity3d.com/questions/139203/open-a-external-program.html

EDIT: So it seems you can get the Performance Counter with Unity, see here http://answers.unity3d.com/questions/506736/measure-cpu-and-memory-load-in-code.html

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Exalia · Aug 23, 2013 at 11:26 AM 0
Share

This is okay but I'd like to see what other people have to say :)

avatar image Exalia · Sep 02, 2013 at 10:43 AM 0
Share

Has anyone else got an answer for this? I know this can't be the case. I can retrieve the profiling data via logcat, I just want to know how to access it via script :(

avatar image Exalia · Sep 03, 2013 at 10:51 AM 0
Share

Thanks for the link, can't get it working just yet but I'll ask around on this thread :)

avatar image Exalia · Sep 03, 2013 at 11:13 AM 0
Share

Actually your edit only works for windows, I'm on android

avatar image Exalia · Sep 03, 2013 at 12:52 PM 0
Share

Anyone got anything on this matter? :) Thanks

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Creating Unity Plugin 1 Answer

Creating Unity Statistics Plugin 0 Answers

Retrieving Profiler Stats (Android) 1 Answer

perfHUD & Unity 0 Answers

android shader issue 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges