Fix shader graph assets loading to wait for async task

#3802
This commit is contained in:
Wojtek Figat
2025-11-18 16:11:31 +01:00
parent de9e282bad
commit 2ca435a414
5 changed files with 16 additions and 14 deletions

View File

@@ -50,8 +50,8 @@ MaterialLayer* MaterialGenerator::GetLayer(const Guid& id, Node* caller)
}
// Load asset
Asset* asset = Assets.LoadAsync<MaterialBase>(id);
if (asset == nullptr || asset->WaitForLoaded(10 * 1000))
Asset* asset = Assets.Load<MaterialBase>(id);
if (asset == nullptr)
{
OnError(caller, nullptr, TEXT("Failed to load material asset."));
return nullptr;