- Home /
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!
Answer by StephanK · Aug 25, 2010 at 07:38 AM
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.
Answer by boymeetsrobot · Dec 18, 2010 at 12:31 PM
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
Answer by vfxjex · Feb 13, 2016 at 05:08 PM
The Main Problem of Resources folder is the Set that you have created will become a prefab by its own and the file size will increase.
Let us say I have created 15 sets in that level and I want to load it one by one as the level increase... there is no way I have to make each sets as a prefab...
Your answer
![](https://koobas.hobune.stream/wayback/20220613072015im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Setting Scroll View Width GUILayout 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Load Level 2 Answers
Scene object to prefab 1 Answer