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
0
Question by CalledToGaming · Mar 04, 2010 at 10:06 PM · spawnlevel

Character Loading Location

I have a series of Levels. They are activated by walking through collision boxes which then loads the next scene(Pretty simple)

The problem I'm having is that when I load from "Scene 2" back to "Scene 1" it naturally spawns the character at the origional game starting location. I want it to spawn him right outside the door (the door that leads between scene 1 and 2)

I'm trying to work the script but I just don't know how to do it.

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
2

Answer by StephanK · Mar 05, 2010 at 09:25 AM

In your levels you should define spawn points at every "door". Then you can create a GameObject that "survives" Application.LoadLevel(). You can do this by calling GameObject.DontDestroyOnLoad(MyObject).
In that GO you could store something like lastLevel. Now if you load a new level you can look up last level and spawn the player at the correct spawn point.

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 CalledToGaming · Mar 06, 2010 at 08:30 AM 0
Share

Nothing i do seems to be working. I Understand the concept. But everything I try ends in the same results I'm having. Something's just not working. It's putting a big halt on my game project.

avatar image StephanK · Mar 06, 2010 at 10:59 AM 0
Share

Can you describe what's happening or what exactly is not working? What's the result you are having?

avatar image CalledToGaming · Mar 07, 2010 at 08:06 AM 0
Share

I don't know exactly, I guess I just dont' know how to make spawn points, and then tell the system, "when you load Scene 1, from Scene 2, Place Character here, but when you load scene 1 from scene 3, place him here ins$$anonymous$$d.". That's pretty much exactly what I'm looking for at the moment.

avatar image
0

Answer by Ty1ensen · Jan 31, 2013 at 11:52 PM

you could duplicate all scenes and put you character in the places you want to spawn them in and make the script load the scene that has the right spawn in it. alot of work but thts what i do plus im a terible scripter so i do the stuuf like that prety much all the time

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

1 Person is following this question.

avatar image

Related Questions

C# Make array based on script variable 1 Answer

Inspector Definitions for New Script Components Problem 0 Answers

A small spawning challenge.. 5 Answers

spawn points/ player transition from level to level with multiple exits and entrances 3 Answers

Level spawning statement 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