Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefab Requests are returned early #521

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Improved the logs for InitPrefabAsync
  • Loading branch information
Metious committed Jan 1, 2024
commit 2fba50237f1cb5243c54069100f7e3733a978ddf
6 changes: 6 additions & 0 deletions Nautilus/Handlers/PrefabHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ internal static IEnumerator GetPrefabAsync(TaskResult<GameObject> gameObject, Pr

private static IEnumerator InitPrefabAsync(TaskResult<GameObject> gameObject, PrefabInfo info, PrefabFactoryAsync prefabFactory)
{
if (prefabFactory == null)
{
InternalLogger.Error($"PrefabHandler: Prefab Factory for {info.ClassID} is null!");
yield break;
}

yield return prefabFactory(gameObject);

var obj = gameObject.Get();
Expand Down