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 aballif · May 10, 2016 at 07:50 PM · characterscene-loading

LoadScene without unloading the last.

I am trying to make it so that my character can go into a room. The room is a new scene. I am currently using Application.LoadLevel( ); to move to the next room, but when I go back to the last room, I want the character to be right outside the door instead of starting back at the spawn-point. I have one main overworld, with all the other small rooms.

Would LoadLevelAdditive be a good way to load the next level, without unloading the last so that the character will stay outside the door? I don't want the character to move while I am still in a level because I want the character to stay right outside the door. There is another character in the next scene so I only want to move that character while the first is waiting outside the door.

In a previous game, I made a copy of the main world for every door. Each one had the character outside each one of the doors. I know that there is a better way but I can't figure one out.

In simple terms, I want it to stand outside the door that it just came from when I go back to the overworld and not start the scene over at the beginning spawn point.

What would be the best way to do this?

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 ddsinteractive · May 10, 2016 at 08:48 PM

Can you save the translation/transform into a global variable before leaving the room and entering the next scene/room?

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 aballif · May 10, 2016 at 08:51 PM 0
Share

Do you mean create an empty object that the character can teleport to when it enters the scene?

avatar image ddsinteractive aballif · May 10, 2016 at 09:21 PM 0
Share

It could be an empty GO if you desire. I was thinking more of scripting which would adjust the character's transform and translate to where it left, albeit 180 degrees so they're now facing away from whence they came. (through the door so to speak)

avatar image aballif ddsinteractive · May 10, 2016 at 10:26 PM 0
Share

If I use an empty game object, would I use something like gameObject.transform.translate(PublicGameObject.transform)

I tried that but it doesn't recognize it. How would I do it?

avatar image ddsinteractive aballif · May 10, 2016 at 09:24 PM 0
Share

Here is an example using a similar line of thought:

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

62 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 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 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 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 avatar image avatar image

Related Questions

Rigidbody.addforce after scene reload 1 Answer

Help! With player positions after scene change!! 0 Answers

How to run a script twice in a scene 0 Answers

How can I find a disabled/inactive GameObject? 0 Answers

Ios Build freezes when i click a button to switch Scenes 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