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 gmamafilms · Aug 22, 2016 at 01:32 AM · camerascripting problemcolliderscene-switchingscript loading

How to change scenes when camera enters a collider. (answerer will be rewarded)

I put a collider on the camera and I want to change a scene when a camera enters a collider. I have been trying to figure this out for a while and I want it C# please because it is only script that I know. Please keep it as simple as possible. The person who answer will be rewarded.

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
0
Best Answer

Answer by Monkiman300 · Aug 22, 2016 at 10:15 AM

It'll say "out of date" or some BS if you're using the newer 5x unity, but it still works as of 5.4.1f so itll work for now... Basically in C# you would:

 void OnTriggerEnter (Collider entity){
 
           if(entity.tag == "Player")
                 {
                      Application.LoadLevel ("Scene Name");
                  }
  }

Like I said, it'll say us scene manager blah blah, but this works too

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
0

Answer by ArturoSR · Aug 22, 2016 at 02:48 AM

Hi, OK, there is only one easy way, you need to load the new level (scene), but this is important, must be hidden, that is, all the new objects or group of objects have to be disabled, with this you can toggle the visibility of it, until you load a new level.

I recommend to group all your objects from each level, this make it more easy to toggle instead one by one.

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 gmamafilms · Aug 22, 2016 at 02:57 AM 0
Share

there is no code I was asking for a script.

avatar image ArturoSR gmamafilms · Aug 22, 2016 at 03:34 AM 0
Share

Sorry, but this is very simple, so you only need to find how to do it, if you are a noob, I recommend to read the documentation about SetActive(), DontDestroyOnLoad() and LoadLevelAdditive(), sorry to be so rude, but don't wait that any gives a full code just for a "reward" that I suppose it has to be the button on this post, I'm not fan of the "virtual rewards", I believe on hard work and hours of practical study.

avatar image gmamafilms · Aug 22, 2016 at 03:36 AM 0
Share

you still don't understand me I'm asking how to make a scene load when a camera enters a collider.

avatar image ArturoSR gmamafilms · Aug 22, 2016 at 03:54 AM 0
Share

I really understand, already give you some clues, just read, that's all, make some tests and I sure you, you will feel great when you find it, if for tomorrow night you have not found the answer, send me the code you have and I would gladly do I fix it for you, cheers.

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

102 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 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

Switching Cameras, Movement not working. 1 Answer

How to rotate a bone along with the camera 0 Answers

Where am i going wrong with my repeating background? 0 Answers

How would I change material properties of a box collider via script? 0 Answers

Object appears to glitch as it moves whenever the camera follows it. 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