#pragma warning disable 0618 internal AddressableAssetEntry GetAssetCollectionSubEntry(string subAssetGuid) { if (AssetPath.EndsWith(".asset") && MainAssetType == typeof_AddressableAssetEntryCollection) { List <AddressableAssetEntry> implicitEntries = new List <AddressableAssetEntry>(); GatherAssetEntryCollectionEntries(implicitEntries, null); return(implicitEntries.FirstOrDefault(ie => ie.guid == subAssetGuid)); } return(null); }
private string SubstitutePath(string assetName) { if (assetName.Length > 0 && assetName != AssetPath && AssetPath.EndsWith(assetName, StringComparison.OrdinalIgnoreCase)) { if (assetName.Length == AssetPath.Length) { return(assetName); } if (AssetPath[AssetPath.Length - assetName.Length - 1] == ObjectUtils.DirectorySeparatorChar) { string directoryPath = AssetPath.Substring(0, AssetPath.Length - assetName.Length); return(directoryPath + assetName); } } return(AssetPath); }