• 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 amayasan013261 · Jun 18, 2015 at 06:23 AM · 2d gameleveling

i would like to ask what is the best and simple code for changing to the next level when a game object is triggered?

once the enemy is defeated the player will move to the net level after moving to the other side of the game...the movements of the character is just either left or right no jumps...and it is 2d 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
1
Best Answer

Answer by DoubleIsLoveDoubleIsLife · Jun 18, 2015 at 08:40 AM

Application.LoadLevel(Application.LoadedLevel+1)

Make sure to put all of your level in the build settings.

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 amayasan013261 · Jun 18, 2015 at 09:50 AM 0
Share

oh thanks i got it...i'm new at this so it helps :D

avatar image Hellium · Jun 18, 2015 at 09:53 AM 0
Share

@amayasan013261 : You could have make like... 5 seconds of research on Google to have your answer ?

By the way, don't forget to check DoubleIsLoveDoubleIsLife's answer by clicking on the check mark under the downvote button.

avatar image amayasan013261 · Jun 18, 2015 at 11:01 AM 0
Share

i wanted to be sure...

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Using the head look controller as a method to keep ship level with ground. 1 Answer

Start Up Menu For 2D Game 5 Answers

Jump Function C# hassle! 0 Answers

How to let the user draw lines in a 2D game? 1 Answer

Updating localPosition using parents' position 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges