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 /
avatar image
1
Question by Trevor 1 · Mar 03, 2010 at 06:31 PM · playerdestroyrespawn

how to spawn and destroy

Okay I have another question to ask, and this is when the player approaches a part in the level for a section of it to load.

I want to keep all of it together in one whole level so i dont have to keep creating a seperate biuld, to just make it so that when the game starts, keep the "begining section" of the level first, but everything else will be gone till you reach like a checkpoint, or in this case a triggered gameobject, to delete "the begining section" and create "middle Section" to keep the player from lag and delay, while playing the game.

And I want to keep doing this through out the rest of the entire game. I would Love to know the script as i am a scripting noob, i will admit but not affraid to ask.

Thank you.

Check out our site!

www.delvegame.webs.com

Comment
Add comment · Show 1
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 cregox · Mar 05, 2010 at 06:18 PM 0
Share

Are you looking for a solution like the "strea$$anonymous$$g sub-levels" on Unreal Engine? I have no idea how, but there are some new keywords for you, if that's it. ;)

2 Replies

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

Answer by Cyclops · Mar 10, 2010 at 09:40 PM

On the other hand, you might not asking about streaming, so much as making areas visible as a player activates various triggers. Which is actually how I first interpreted the question, until I saw the bit about lag. If that's the case, what you can do is:

Make an empty GameObject (GO) for each zone you want, and name them (example, I'll call one Level_9). Move the objects to be in that zone, under the GO as children. Disable Level_9 in the Editor - it's the checkbox near the name in the Inspector. When it asked, you also want to disable all the children. They should no longer be visible when the level starts.

The second part, enabling them is a bit more tricky. You need a script on each triggering item, that will re-enable a specific GO and all its children. The script would be attached to some object (call one, say, Portal_9), which would set to fire on mouse-click or collider proximity. The script would have a public GameObject variable, which you set to Level_9. That gives the script a reference to the GO.

Here is a question/answer on writing a script to trigger based on object proximity:
Triggering a GUI based on Proximity.

Then, when the script fires, it has to enable Level_9 and all its children. Here is another answer which talks about how to enable a GO + children:
Enable/disable a complex GameObject?

And yes, it's going to be a fair bit of programming - welcome to Unity. :)

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
avatar image
1
Best Answer

Answer by Cyclops · Mar 10, 2010 at 09:37 PM

There's two possible answers, depending on what you're trying to do. If you're just trying to keep the player from staring at a long loading bar, then you can do something like this:

make the first scene a really small loader scene that does a progress bar, and use a streaming web player. That way your progress bar will come up fast (even on dial-up) and you can do whatever you want in Unity to make it nifty. Well, within reason...the point is to keep the first scene really small. :)

To quote Eric5h5 from: Web Player Loading Screen
For more information, see the manual at Web Player Streaming

With this method, everything in the scene will be loaded (eventually), but it shouldn't slow down the player.

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

No one has followed this question yet.

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Player Respawn Script - Not Working 1 Answer

How do you destroy respawned clones? 1 Answer

change script so enemy car gets destroyed when collided with player car 0 Answers

Instantiate spawns 2 instead of 1, help? 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