If (player.SetActive(True))DontDestroyOnLoad(player)
求
if (player.activeSelf) { DontDestroyOnLoad(player); }