x


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?

more ▼

asked Jul 06 '12 at 12:37 PM

benfattino gravatar image

benfattino
160 41 58 61

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jul 06 '12 at 01:23 PM

Kryptos gravatar image

Kryptos
7.2k 5 32

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.

Jul 07 '12 at 10:05 AM benfattino
(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:

x1091
x716
x90
x21

asked: Jul 06 '12 at 12:37 PM

Seen: 383 times

Last Updated: Jul 07 '12 at 10:05 AM