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 instruct9r · May 17, 2013 at 02:26 PM · iosfreezeparticleslowemission

iOS Game freeze, when particles emitted for first time.

Hello.

I'm building a puzzle game, where on a certain point, particle emitter emits about 30 particles (Blowing stars). When i run the game for first time on iPAD, on the verry first particle emission, the game freeze for a fraction of a second. It's allmost not noticeable on iPad 4, but it is on iPad mini and iPod 5.

This happens only when the game runs for first time (Meaning if you close (Not suspend) the game and then run it again it does it again on the first particle emission). After that all emissions run smoothly with absolutely no slowing...

Is there something i can do about this? Are the particles a lot? I mean 30 particles doesn't seem a lot... The particles have matterial with a texture of small star, so it's like blowing stars..

Thanks

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by MD_Reptile · May 17, 2013 at 02:31 PM

Thats probably caused by the game first loading the resources to run the particle, not so much the particle happening, just the lag of loading up its texture and settings.

You could probably just have your emitter running somewhere hidden, and that way the lag happens when you very first load the level (normal stuff for games) and then, disable it, and move it to the position where it will actually be used, then re-enable at the right time.

That way, the lag would be over with before the player is engaged in the actual level. This is a good idea to apply this sort of thing in games with lots of unique instantiation/particles/anything...

Comment
Add comment · Show 4 · 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 instruct9r · May 17, 2013 at 02:48 PM 0
Share

Thanks :) I was thinking to add one other emitter, that emits particles to the side of the screen.. But would that be countered as emitting, if it's not infront the camera? Or maybe i shoud do it behind the background of the game...

avatar image MD_Reptile · May 19, 2013 at 10:06 PM 0
Share

I would just do it somewhere behind the camera, completely out of view, then shut it off, and move back to its actual position, waiting to be triggered. Try that out and see if it stops the lag.

avatar image instruct9r · May 20, 2013 at 01:24 AM 0
Share

I have duplicated the emitter and moved it to the back of the background plane of the game and it blows stars once when the level starts. No lagging anymore :)

thanks

avatar image MD_Reptile · May 20, 2013 at 02:21 AM 0
Share

No problem, be sure to thumbs up my answer if its helpful :)

avatar image
1

Answer by Graham-Dunnett · May 17, 2013 at 02:33 PM

http://docs.unity3d.com/Documentation/ScriptReference/Shader.WarmupAllShaders.html

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 instruct9r · May 17, 2013 at 03:13 PM 0
Share

I've tried, that line of code and it does reduce the freezing time, but the game still freeze, when the particles blow... It's maybe from the particles themself, not only from the texture and matterial..

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

15 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

Related Questions

Problem rendering particles in ios 1 Answer

unity freezes repeatedly 1 Answer

Free fall and transformation of object very slow on iPod Touch 4 1 Answer

Updating mesh.vertices or mesh.colors slow on iOs. 0 Answers

Asset store freezes up everything 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