Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Inbasagar · Jun 12, 2016 at 10:04 PM · androidprefabcrashcollidersperformance optimization

Game Crash While loading Level With Many Prefabs

Okay... I'm Creating this game for mobile platforms. I'm Using Track Sections(like straight, left , sharp right etc...) to construct the track using an editor script. All the track sections are prefabs. The number of track sections goes more than 100s. It's Hard to split these track sections into different levels (because it's in development stage and i also want to test it in mobile phones). Because of this my game is experiencing crash/performance issues. Is there any other way to optimise the tracks (like generating those tracks at run time, or disabling and enabling at run time).

Note: - the track has some mesh colliders and cast shadow is set to off for the stuff that doesn't need shadows

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

1 Reply

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

Answer by PandawanFr · Jun 12, 2016 at 11:40 PM

I guess there are many options, but the only one I can think of right now is Serialization. What you could do is Serialize the position and all data of your tracks, and then delete them when they are too far away, and get them back later once the player is close enough to see them.

Here are a few links to get you started:

http://blogs.unity3d.com/2014/06/24/serialization-in-unity/

http://answers.unity3d.com/questions/443525/serialize-a-gameobject-including-components.html

http://answers.unity3d.com/questions/998574/save-serialize-gameobjects.html

Comment
Add comment · Show 6 · 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 Inbasagar · Jun 13, 2016 at 06:55 AM 0
Share

So... I should build the track in editor, give an prefab id (like 1 = straight, 2 = left, 3 = right, 4 = split....) then create an .xml/.json file having the position,rotation and prefab id then instantiate it on runtime right?

avatar image Inbasagar · Jun 13, 2016 at 07:01 AM 0
Share

And... should I just Delete it or disable it?

avatar image PandawanFr Inbasagar · Jun 13, 2016 at 11:26 PM 0
Share

You could just simply disable it and that wouldn't require any serialization actually. (Dunno why I didn't think of that)

But if you still wanna go with serialization, then you have to delete it, because you would just be re-generating a prefab at the same spot

avatar image Inbasagar PandawanFr · Jun 14, 2016 at 07:23 AM 0
Share

Last Question... Can using a script for deter$$anonymous$$ing the position of a lot of objects result in performance impact?

Show more comments
avatar image Inbasagar · Jun 15, 2016 at 05:04 AM 0
Share

Thanks @PandwanFr

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Crash on splash screen 0 Answers

Random Crashes (SIGSEGV) on Android Huawei devices - (maybe linked to AssetBundles and/or Textures) 2 Answers

Android Build Just Closes, No Crash Error 0 Answers

Crashes right after splash screen, fine in editor.,Error right after splash screen, works fine in Editor. 0 Answers

Android App crashes on " server.Start() " HELP 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