- Home /
Accseessing project assets from a custom editor
So i am working on a custom level editor for my game, that is a Unity Editor Script and not a runtime level editor.
Its basically just a row of buttons for easily creating the different level elements and a few useful functions like rotating and flipping objects.
My problem is how can i access the prefabs and button icons in my asset folder from a editor script? Preferably something where i can set up more buttons in the inspector, and not have to hard code each button.
Comment
Best Answer
Answer by green_core · Oct 22, 2011 at 05:48 PM
You can access to any assets via AssetDatabase class. There are some methods to load assets: LoadAssetAtPath, LoadAllAssetsAtPath, etc.