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 outsky · Jul 26, 2012 at 11:33 PM · prefabloadlevel

Put all GameObjects of a scene into a prefab

I wonder if it's okay to put all GameObjects of a scene into a single prefab, so I could Instantiate it instead of LoadLevel.

If it's okay, what's the difference between those two methods? Is there any additional overhead?

What exactly is the prefab? 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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Muuskii · Jul 27, 2012 at 12:13 AM

Seems like the difference would be that after you've loaded the prefab all the objects that were previously there would still be around. You could delete them, and have the overhead of deleting objects one at a time. But why would you want to do this?

Comment
Add comment · Show 3 · 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 outsky · Jul 27, 2012 at 01:33 AM 0
Share

Ok,let me explain: I made a game which had 10 levels. Now, I want to slice the game window into 2 parts vertically, and each part is independent to the other one. By doing this, I can not use LoadLevel, since it would affect both parts.

avatar image Muuskii · Jul 27, 2012 at 02:17 AM 0
Share

Oh! That makes sense. In that case you might be able to use DontDestroyOnLoad but I don't see a way of "YesDestroyOnLoad" When you're finally done with it. So if you have a "root empty" parenting all the elements to a prefab based level you should be able to easily destroy it and all it's childern. I thought there was a function for this but I can't find it at the moment.

I can see why this might have some performance issues, so it might be a good idea to split levels into smaller prefabs where line of sight is blocked from one segment to the next. Loading segments as you need them. . .

avatar image outsky · Jul 27, 2012 at 08:48 AM 0
Share

thanks man. I'll try..

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

6 People are following this question.

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

Related Questions

A node in a childnode? 1 Answer

Unity fire1 prefab in code 2 Answers

Changing value of prefab without effecting all instances. 1 Answer

How can i display a pdf file in a unity scene ? 2 Answers

Player movement and trigonometry help, anyone 2 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