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 Paradoks · Jun 03, 2014 at 05:16 PM · cameraupdatedisplayminimapmini-map

Is it possible to make a camera update only once every X seconds ?

Hi ,

I am making a moba/rts like game, so i got two camera, the main one and the minimap one. The minimap camera is making me lose around 30fps on my frame rate, so i wondered:

Is there a way to make this minimap camera update every 1/4 second while continuing to display, so i got 3/4 of my 30fps back ?

thanks

Comment
Add comment · Show 6
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 revolute · Oct 01, 2014 at 05:10 AM 0
Share

Perhaps your $$anonymous$$imap calculations are too expensive? In my game, I use 3 cameras (ui menu, 2D background map, 3D object that moves) and so far no lag issues with camera.

avatar image revolute · Oct 01, 2014 at 05:13 AM 0
Share

If so, try using IENumerator to calculate every few frames.

avatar image Kiwasi · Oct 01, 2014 at 06:11 AM 0
Share

I've wondered about the same thing, for an entirely different purpose. Basically running a non game simulation where the accuracy and speed of calculations are more important then the rendering. The idea would be to run Update as fast as possible, but only render three or four times a second. I didn't find a solution. I'd be interested if anyone has seen one.

avatar image HarshadK · Oct 01, 2014 at 06:18 AM 1
Share

@Bored$$anonymous$$ormon you can use InvokeRepeating to execute your tasks at certain interval that you require to run as fast as possible and set your FPS to be three or four as required. You can surely use InvokeRepeating to substitute Update.

avatar image Kiwasi · Oct 01, 2014 at 06:47 AM 1
Share

@Harshad$$anonymous$$. I hadn't thought about doing it that way. I'll tuck it away for future use. I wonder how InvokeRepeating behaves if the method takes longer then the repeat time. I might have to do some playing there.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Jeff-Kesselman · Jun 03, 2014 at 05:17 PM

Well you could enable the camera one frame every N frames and disable it in the next one. You would have to render to a texture in order to keep it for display (pro only)

But are you really sure that's your issue? It might be worth taking a closer look at the code with the Profiler.

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 Paradoks · Jun 03, 2014 at 06:23 PM 0
Share

if i enable/disable the camera, i will have a "flickering" effect that i dont want. the effect i am looking for is really a freezing image. about the rendering to texture, i am not even sure it would be worth as the full process of writing an image could be heavier that the normal camera update, anyway i dont have unity pro so i cant do that or either profile the project.

the extra draw calls are not really an issue, they are just slowing the frame rate, thats all. and i need those.

avatar image
0

Answer by Kiwasi · Oct 01, 2014 at 06:16 AM

For mini maps the best performance solution is to have the minimpap camera render only one layer. Attach a symbol GameObject (simple sprite or quad with an image) as a child of every GameObject you wish to display on the map.

Of course you should ensure the main camera doesn't render your symbol layer as well.

Comment
Add comment · 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

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

23 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 avatar image avatar image avatar image avatar image

Related Questions

Minimap camera display size. 1 Answer

MiniMap with player and object icons 1 Answer

How do I attach a Camera to a GUI (for a Mini map) 4 Answers

Camera placement / size behavior 3 Answers

Getting Camera View (Mini-map) 0 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