MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / LoadSceneAsync

Method LoadSceneAsync

Source/Engine/Level/Level.cpp:1692–1712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1690}
1691
1692bool Level::LoadSceneAsync(const Guid& id)
1693{
1694 if (!id.IsValid())
1695 {
1696 Log::ArgumentException();
1697 return true;
1698 }
1699
1700 // Preload scene asset
1701 const auto sceneAsset = Content::LoadAsync<JsonAsset>(id);
1702 if (sceneAsset == nullptr)
1703 {
1704 LOG(Error, "Cannot load scene asset.");
1705 return true;
1706 }
1707
1708 ScopeLock lock(_sceneActionsLocker);
1709 _sceneActions.Enqueue(New<LoadSceneAction>(id, sceneAsset, true));
1710
1711 return false;
1712}
1713
1714bool Level::UnloadScene(Scene* scene)
1715{

Callers 3

EndInitMethod · 0.45
OnEnterMethod · 0.45
OpenSceneMethod · 0.45

Calls 3

ArgumentExceptionClass · 0.85
IsValidMethod · 0.45
EnqueueMethod · 0.45

Tested by

no test coverage detected