- Home /
Select object in another scene
I'm using a script to activate/deactivate script attached on a specific object:
var OBJWithScript : GameObject;
var ScriptName : String;
//etc...
function DisableScript () {
OBJWithScript.GetComponent(ScriptName).active = false;
}
function EnableScript () {
OBJWithScript.GetComponent(ScriptName).active = true;
}
How can i select object that's is in another scene?
Answer by Kryptos · Jul 06, 2012 at 01:23 PM
You can't. A scene is not accessible from another one. Actually only the objects of the current scene exist.
You could load the other scene additively, resulting in a merged scene. It depends on what you are trying to achieve.
The problem is that an object of a scene should activate that of another. I solved with the use of a script that contiente a global variable. Thanks for answer.
Your answer
Follow this Question
Related Questions
Effect object in another scene 1 Answer
instatiating an object from another object and automatically tagging it to be collected 3 Answers
How can I Select/focus the SceneView in Editor? 2 Answers
Persistent game objects 1 Answer
Highlight more than one object in the scene, but select only one to move around 0 Answers