EditorAutoLevelLoadTest.cpp 875 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "EditorDefs.h"
  9. #include "EditorAutoLevelLoadTest.h"
  10. CEditorAutoLevelLoadTest& CEditorAutoLevelLoadTest::Instance()
  11. {
  12. static CEditorAutoLevelLoadTest levelLoadTest;
  13. return levelLoadTest;
  14. }
  15. CEditorAutoLevelLoadTest::CEditorAutoLevelLoadTest()
  16. {
  17. GetIEditor()->RegisterNotifyListener(this);
  18. }
  19. CEditorAutoLevelLoadTest::~CEditorAutoLevelLoadTest()
  20. {
  21. GetIEditor()->UnregisterNotifyListener(this);
  22. }
  23. void CEditorAutoLevelLoadTest::OnEditorNotifyEvent(EEditorNotifyEvent event)
  24. {
  25. switch (event)
  26. {
  27. case eNotify_OnEndSceneOpen:
  28. CLogFile::WriteLine("[LevelLoadFinished]");
  29. exit(0);
  30. break;
  31. }
  32. }