- Home /
Question by
electricsauce · Nov 09, 2013 at 05:24 AM ·
prefabeditor-scriptingassignmenteditor-classes
Assign prefabs to objects from custom editor
How do I assign a prefab to an object through a custom editor script? The object that is getting the prefabs assigned to it has an array that holds a custom type:
Controller.GetComponent<CustomType>().prefabs[i] = ???
I've tried Assetdatabse.Loadassetatpath, I've tried instantiating the prefab and referencing that but have had no luck so far. Any ideas?
Comment