示例#1
0
        private bool ValidateParentContext(PreloadedAsset preloadedAsset, HashSet <string> allowedParentContracts)
        {
            foreach (var preloadedAssetSceneContext in preloadedAsset.sceneContexts)
            {
                if (!allowedParentContracts.Overlaps(preloadedAssetSceneContext.ParentContractNames))
                {
                    _logger.LogError(LoggedFeature.Assets,
                                     "Preloaded asset scene context: {0} should have a parent contract in: {1}",
                                     preloadedAssetSceneContext.name,
                                     _enforcedParentContext.name);
                    return(false);
                }
            }

            return(true);
        }
示例#2
0
 public AssetBinding(PreloadedAsset preloadedAsset)
 {
     asset = preloadedAsset.assetReference.Asset;
     type  = preloadedAsset.assetReference.Asset.GetType();
 }