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
0
Question by Triqy · Jun 14, 2013 at 11:31 PM · guidebuggizmosstatsdraw calls

Draw Call Stat inside a GUIText?

Hey guys I am trying to put a GUIText in my scene and test my custom batching script on my models but the problem is that im trying to do this on a tablet...

I want to put the draw calls stat inside a GUIText of some sort and view it via. real time when the game is being played on my tablet.

Any help would greatly be appreciated. Thanks!

Comment
Add comment · Show 3
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 Owen-Reynolds · Jun 15, 2013 at 12:57 AM 0
Share

What are you having trouble with? Your question heading suggest you're having trouble writing to a GUIText (which is easy, and a perfectly fine way to debug.) But is the real problem how to look up # of draw calls?

avatar image Triqy · Jun 15, 2013 at 01:06 AM 0
Share

No i want to put the draw calls in to GUIText so i can look at how many draw calls i have on tablets ins$$anonymous$$d of on pc at run time. i know when i press play i can view the draw calls on the pc through the gizmo but its hard to tell on tablets because well its on the tablet ... lol i was just wonder if there was a way to view the draw calls through a GUIText... I cant seem to find anything relating to the draw calls in the unity scripting reference

avatar image Owen-Reynolds · Jun 15, 2013 at 04:13 PM 0
Share

Yes, it is very easy to write the draw calls into a guiText on a tablet: StatText.guiText.text=""+calls;

The tricky part is computing the variable calls, which, as Eric writes below, has no built-in way to get.

For things you can compute, writing to a guiText works fine.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Eric5h5 · Jun 15, 2013 at 01:12 AM

There is no access to draw call information in a build. However there's no difference between draw calls in the editor and a build, so you can just look at the draw call info in the editor.

Comment
Add comment · Show 2 · 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 Triqy · Jun 15, 2013 at 01:26 AM 0
Share

Well the reason im asking is the game i am build has a very complex dynamic batching scipt that batches all the models textures on screen into a empty game object to dynamically optimize the players game performance to on the fly. The type of game im building is an rts and requires the player to build buildings in the 3D environment.

When you drag out a building on my terrain it breaks the built in dynamic batching for the model and creates excessive draw calls when building. This being known forced me to create a custom batcher in which it batches say 5 same type buildings and put them into a empty game object resulting from 5 draw calls to 1 draw call.

I guess all have to deal with it if what you say is true and i can't put draw call info into a GUIText. Its not really a problem, but rather than an annoyance. Thanks for your help though! :)

avatar image Eric5h5 · Jun 15, 2013 at 02:51 AM 0
Share

As I said, you can just look at the stats in the editor.

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

16 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

Related Questions

Can you call OnDrawGizmos manually? 0 Answers

Network Usage Statistics 1 Answer

Using Handles in EditorWindow 0 Answers

How to dynamically access to the inside of the Stats value in Unity3D 0 Answers

RectTransform Anchor gizmos missing 5 Answers


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