[SerializeField] with prefabs?

I have an object which has a prefab made from it. In its script it is using [SerializeField] so I can just drag and drop another object in that field, rather than coding the finding of it. This works with the current object in the scene, but the object that has been dragged into the field is not there on the prefabs. Is this how it is meant to work, or is there an issue with my project.?

Prefabs can’t refer to scene objects, only other prefabs and assets. Scenes are transient in memory, torn down and built back up all the time, so no way that a disk asset (Prefab) could point to it.

Ah ok, I didnt realise that. So If i was to make the object that is being dropped into the field a prefab itself that would work. I will either do that or just code in the finding of the object. Thanks a lot

1 Like