- Home /
This question is vague and not concise.
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.
there's a post here you REALLY should read...forgot the title... :(
Answer by qJake · Apr 02, 2010 at 06:10 AM
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); } }
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?
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 $$anonymous$$
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?
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....
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.
Answer by Cyclops · Apr 02, 2010 at 02:34 PM
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.
Oh yeah. It is about pride - and program$$anonymous$$g, but still it isn't too much of art. Srry bout posting this on yours. Lol
Follow this Question
Related Questions
Accurate scene loading progress bar... 1 Answer
Modify Scene origin before loading scene? Or LoadLevelAdditive @ certain world position 0 Answers
Change Scene keeping Character and GUI Canvas 1 Answer
[Solved] Storing a GameObject in a var and then instantiating it in a new scene? 2 Answers
Scene loading problem 5 Answers