Beispiel #1
0
 static void RegisterDependencies(AssetImportContext importContext, ref ConversionDependencies dependencies)
 {
     using (var assets = dependencies.AssetDependencyTracker.GetAllDependencies(Allocator.Temp))
     {
         var goids = new GlobalObjectId[assets.Length];
         GlobalObjectId.GetGlobalObjectIdsSlow(assets.ToArray(), goids);
         for (int i = 0; i < assets.Length; i++)
         {
             var guid = goids[i].assetGUID;
             if (GUIDHelper.IsBuiltin(in guid))
             {
                 // AssetImportContext does not support dependencies on inbuilt assets
                 continue;
             }
             if (guid.Empty())
             {
                 continue;
             }
             importContext.DependsOnArtifact(guid);
         }
     }
 }