Unity's higher version prefab to lower version
Untiy2019 version prefab:
Copy the prefab made by the Unity2019 version to the lower version project, and find that it cannot be dragged to the editing panel, as shown below:
Write a script to regenerate the prefab:
public class PrefabsToLow : MonoBehaviour
{
void Start()
{
GameObject prefab = Instantiate(UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Prefabs/Prop particle01.prefab", typeof(GameObject)) as GameObject);
UnityEditor.PrefabUtility.CreatePrefab("Assets/Prefabs/CubeClone.prefab", prefab);
}
}
Then you can drag it to the edit panel, as shown below:
Extended update, batch generation:
public class PrefabsToLow : MonoBehaviour
{
void Start()
{
for (int n = 0; n < 10; n++)
{
GameObject prefab = Instantiate(UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Prefabs/Cube"+ n +".prefab", typeof(GameObject)) as GameObject);
UnityEditor.PrefabUtility.CreatePrefab("Assets/Prefabs/CubeClone.prefab", prefab);
MonoBehaviour.DestroyImmediate(prefab);
}
}
}