x


How do I change scenes from triggers in UNity

I need a clear and concise answer from start to finish please? Assume no scripting exp. and assume no coding has been done yet. Thank you K

please email me at shabazzster@gmail.com

thanks.

more ▼

asked Apr 02 '10 at 05:16 AM

khalil gravatar image

khalil
38 6 7 12

there's a post here you REALLY should read...forgot the title... :(

Nov 19 '10 at 03:45 PM fireDude67

its about the kind of questions we get here...

Nov 19 '10 at 03:49 PM fireDude67
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

First off, answers are posted here, nor do we hold your hand while we help you. You should probably remove your e-mail address from your post unless you want to get spammed.

To set up a trigger that loads a level, place a Box Collider in your world where you want the trigger to be, mark the "Is Trigger?" checkbox in the collider properties in the Inspector, and then attach something like this script (you must call the filename LevelTrigger.cs) to the same object that the Box Collider contains:


using UnityEngine;

public class LevelTrigger : MonoBehaviour
{
     void OnTriggerEnter(Collider other)
     {
          Application.LoadLevel(0);
     }
}
more ▼

answered Apr 02 '10 at 06:10 AM

qJake gravatar image

qJake
11.6k 43 78 161

thanks for the answer ..don't know if it works,,,but or.. and by the way.. if we were more privy to holding each others hand, we might get where we wont to go a bit faster if you know what I mean .... We are all artists, and its our responsibility to help each other out, no matter how simple or complex the issue may be you know?

Apr 02 '10 at 06:55 AM khalil

the answers that are posted all come from devs who have been able to link basic scenes. I need to know how to get from a-b then i may be more interested in which "answers are posted here." Thanks K

Apr 02 '10 at 06:57 AM khalil

Now when you say "you must call the filename LevelTrigger.cs" to the same object that the Box Collider contains: can you please explain to me what you mean?

Apr 02 '10 at 07:08 AM khalil

And in the end, this doesn't work. "Hold my hand" and be my partner and help me out. Its not about pride its about art... Can somebody put their tail between their legs for just a sec and give me a real and concise answer? Please....

Apr 02 '10 at 07:23 AM khalil

Haha... we aren't artists. We're programmers. Or at least I am. And I don't hold anybody's hand through ANYTHING. You ARE smart enough to figure it out yourself.

Apr 02 '10 at 09:07 AM qJake
(comments are locked)
10|3000 characters needed characters left

As it happens, I posted a demo of a Level Manager object, which loads multiple scenes. It can be found on the Forums at: Simple Demo of a Level Manager. It includes a complete set of (C#) scripts that switch levels, each time the user clicks on an object in the current Scene.

And yes, you may need to understand how scripting works, to modify it to work in your game. Writing scripts is a major part of Unity development.

more ▼

answered Apr 02 '10 at 02:34 PM

Cyclops gravatar image

Cyclops
7.1k 33 63 115

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x132
x106

asked: Apr 02 '10 at 05:16 AM

Seen: 5136 times

Last Updated: Apr 02 '10 at 10:08 AM