internal AssetInfo(string error) { _patchAsset = null; AssetType = null; AssetPath = string.Empty; Error = error; }
private static AssetInfo ConvertLocationToAssetInfo(string location, System.Type assetType) { DebugCheckLocation(location); string assetPath = _locationServices.ConvertLocationToAssetPath(location); PatchAsset patchAsset = _bundleServices.TryGetPatchAsset(assetPath); if (patchAsset != null) { AssetInfo assetInfo = new AssetInfo(patchAsset, assetType); return(assetInfo); } else { string error; if (string.IsNullOrEmpty(location)) { error = $"The location is null or empty !"; } else { error = $"The location is invalid : {location}"; } YooLogger.Error(error); AssetInfo assetInfo = new AssetInfo(error); return(assetInfo); } }
internal AssetInfo(PatchAsset patchAsset) { if (patchAsset == null) { throw new System.Exception("Should never get here !"); } _patchAsset = patchAsset; AssetType = null; AssetPath = patchAsset.AssetPath; Error = string.Empty; }