In Unity3D, there may be such a need: you want to instantiate a prefab, and the prefab is not in the scene. At this time, you need to create a Resources folder under Assets, and then drag the prefab that needs to be instantiated into this folder. And finally instantiate it like this in the code:
1
|
Instantiate(Resources.Load(
"PrefabName"
), position, rotation)
|