Skip to content

Commit

Permalink
fixes compiler warnings in 2023+
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Aug 9, 2023
1 parent aa4e433 commit 5f8e49b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -756,6 +756,9 @@ private async Task<GameObject> GetNode(int nodeId, CancellationToken cancellatio

if (ex is OutOfMemoryException)
{
#if UNITY_2023_1_OR_NEWER
await
#endif
Resources.UnloadUnusedAssets();
}

Expand Down Expand Up @@ -1062,6 +1065,9 @@ protected virtual async Task ConstructScene(GLTFScene scene, bool showSceneObj,

if (ex is OutOfMemoryException)
{
#if UNITY_2023_1_OR_NEWER
await
#endif
Resources.UnloadUnusedAssets();
}

Expand Down
Expand Up @@ -20,7 +20,11 @@ public static void Add(Action callback)
static GLTFRecorderHelper GetInstance()
{
if (instance != null) return instance;
#if UNITY_2023_1_OR_NEWER
instance = FindFirstObjectByType<GLTFRecorderHelper>();
#else
instance = FindObjectOfType<GLTFRecorderHelper>();
#endif
if (instance != null) return instance;

var go = new GameObject
Expand Down

0 comments on commit 5f8e49b

Please sign in to comment.