x


how to use other objects from other scenes in a script?

could someone please explain to me how to use other objects in other scenes in a script? All Help is GREATLY appreciated! Thanks!

more ▼

asked Aug 25 '10 at 02:12 AM

john 2 gravatar image

john 2
75 29 35 46

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

2 answers: sort voted first

I have been using the Resources.Load method. You will need to make a new folder called Resources and put any assets or prefabs in this folder. You can then programmatically load these items using Resources.Load("myItem").

Take a look at the documentation here:- http://unity3d.com/support/documentation/ScriptReference/Resources.Load.html

Good luck!

Dave

more ▼

answered Dec 18 '10 at 12:31 PM

boymeetsrobot gravatar image

boymeetsrobot
587 7 10 22

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

You can't use objects that don't exist in your scene unless you load them into your current scene. You can do this by either making a prefab and instantiating them or load the scene additively.

more ▼

answered Aug 25 '10 at 07:38 AM

StephanK gravatar image

StephanK
6k 39 53 93

(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:

x5070
x3457
x1092
x716
x2

asked: Aug 25 '10 at 02:12 AM

Seen: 1134 times

Last Updated: Aug 25 '10 at 02:12 AM