OnDisable and OnEnable had been called in TestScene’s Awake:
I had two scene GameEntry.scene and TestScene.scene.
public class Entry : MonoBehaviour
{
public LocalPhysicsMode LocalPhysicsMode = LocalPhysicsMode.Physics3D;
void Start()
{
Debug.Log($"Entry Start LocalPhysicsMode = {LocalPhysicsMode}");
SceneManager.LoadScene("TestScene", new LoadSceneParameters(LoadSceneMode.Additive, LocalPhysicsMode));
}
}
public class TestSceneBehaviour : MonoBehaviour
{
private void Awake()
{
Debug.Log($"test scene awake {Time.frameCount}");
DontDestroyOnLoad(gameObject);
}
private void Start()
{
Debug.Log($"test scene start {Time.frameCount}");
}
private void OnEnable()
{
Debug.Log($"test scene OnEnable {Time.frameCount}");
}
private void OnDisable()
{
Debug.Log($"test scene OnDisable {Time.frameCount}");
}
private void OnDestroy()
{
Debug.Log($"test scene OnDestroy {Time.frameCount}");
}
}
Log:
But when I set LocalPhysicsMode.None, it will be ok:


Thank you for your reply. But when I set the LocalPhysicsMode.None, it will be ok.
– chen_flyI think there are some different code when use different LocalPhysicsMode
– chen_flySounds like a Unity bug.
– ArachnidAnimal