Prefab linking

How can i link prefab (that not in “resources” folder) to a scripts property via script (ExecuteInEditMode). (how can i emulate drag’n’drop prefab to a property in editor via script)

Hi, in the Editor, I use AssetDatabase.LoadAssetAtPath() to set a reference to an Asset or prefab: Unity - Scripting API: AssetDatabase.LoadAssetAtPath.

You might also need to use EditorUtility.SetDirty( yourGameObject-ContainingTheMonoBehavior-ContainingTheProperty ) to tell Unity that you changed the object and that it needs to be saved during next scene save.