Running scripts from editor

Hello, I’ve received a scripts hath creates list of prefabs from pictures, and store them in AssetDatabse. However, this script only runs from editor (it has the line: if UNITY_EDITOR endif.

How can I run this script

Where can I locate the prefabs that was created?

How can I access those prefabs from other scripts within the same project?

Thank you

Unity provides option for both calling objects at the beginning as well as runtime, means from script as well as from the Inspector(Editor). Since script is a component and prefabs are GameObjects you can reference it anywhere within your project.

For Script you can run it by :

Gameobject myScript;
myScript = GetComponent (other_Script_Name);

As for prefabs you can simply find it by :

GameObject go = (GameObject)Instantiate(Resources.Load("MyPrefab"));

Or

GameObject go = Instantiate(Resources.Load("MyPrefab")) as GameObject;