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 Fenuva · Oct 30, 2012 at 02:41 AM · playerscenechangelevelradius

Change scenes from area?

Greetings, I would like to know if anyone knows how to make it so a the player changes scenes after entering a certain radius. I am planning on using this on my current game so that it changes scenes when the player walks into the end of the level area so it can switch to the next level scene. Thank you!

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 christopherwright · May 16, 2018 at 05:37 PM 0
Share

it says var is an unexpected symbol

1 Reply

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

Answer by Phoskryfes · Oct 30, 2012 at 04:01 AM

If you get to the desired platform, you will go to the other scene. If that is your question, insert this to that platform. Make a tag for your player named "Player". Also set your platform into trigger. Put the name of the scene in the LevelToLoad. Also, include the scene in your build and run settings.

 var target: Transform;
 
 function OnTriggerEnter(other:Collider){
    Debug.Log("Trigger is on");
    if(other.gameObject.tag =="Player"){
      Debug.Log("I am here ");
      Application.LoadLevel("LevelToLoad");
    }      
 }
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 Phoskryfes · Oct 30, 2012 at 10:29 AM 0
Share

Could you accept my answer by pressing the check button at the left side of my answer?

avatar image Fenuva · Oct 30, 2012 at 12:26 PM 0
Share

How do I create a tag for my player?

avatar image Phoskryfes · Oct 30, 2012 at 12:40 PM 0
Share

press your player, you would then see a "untagged" at the top of the inspector tab. press that then press add tag. Go to the element then type "Player". then put your player a tag named "Player". Big P because it's case sensitive. Then put the script I wrote to the platform.

avatar image Phoskryfes · Oct 30, 2012 at 01:01 PM 0
Share

If you have anymore questions, add me on FaceBook.

https://www.facebook.com/jodhale?ref=tn_tnmn

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

11 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

Related Questions

Unity 5 OnTriggerEnter Change scene, Not working 1 Answer

Player object carried from scene to scene 1 Answer

One small change for many scenes? 2 Answers

carrying player data from one scene to the next 1 Answer

Load a Scene and Move the Player to an Specific Location. 6 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