/// <summary> /// Get the <see cref="NetFieldExportGroup"/> by the path. /// </summary> /// <param name="path"></param> /// <returns><see cref="NetFieldExportGroup"/></returns> public NetFieldExportGroup GetNetFieldExportGroup(string path) { if (path == null || !NetFieldExportGroupMap.TryGetValue(path, out var group)) { return(null); } return(group); }
/// <summary> /// Empty the NetGuidCache /// </summary> public void Cleanup() { NetFieldExportGroupIndexToGroup.Clear(); NetFieldExportGroupMap.Clear(); NetGuidToPathName.Clear(); ObjectLookup.Clear(); NetFieldExportGroupMapPathFixed.Clear(); _archTypeToExportGroup.Clear(); _cleanedPaths.Clear(); _cleanedClassNetCache.Clear(); }
public NetFieldExportGroup GetNetFieldExportGroup(string pathName) { if (String.IsNullOrEmpty(pathName)) { return(null); } if (NetFieldExportGroupMap.TryGetValue(pathName, out NetFieldExportGroup netFieldExportGroup)) { return(netFieldExportGroup); } return(null); }
/// <summary> /// Empty the NetGuidCache /// </summary> public void Cleanup() { NetFieldExportGroupIndexToGroup.Clear(); NetFieldExportGroupMap.Clear(); NetGuidToPathName.Clear(); //ObjectLookup.Clear(); NetFieldExportGroupMapPathFixed.Clear(); _networkGameplayTagNodeIndex = null; _archTypeToExportGroup.Clear(); _cleanedPaths.Clear(); _cleanedClassNetCache.Clear(); _failedPaths.Clear(); }
public void ClearCache() { NetFieldExportGroupMap.Clear(); NetFieldExportGroupIndexToGroup.Clear(); NetGuidToPathName.Clear(); NetFieldExportGroupMapPathFixed.Clear(); NetworkGameplayTagNodeIndex = null; _archTypeToExportGroup.Clear(); _cleanedClassNetCache.Clear(); _partialPathNames.Clear(); _cleanedPaths.Clear(); _failedPaths.Clear(); _pathToExportGroup.Clear(); }
/// <summary> /// Tries to find the ClassNetCache for the given group path. /// </summary> /// <param name="group"></param> /// <returns>true if ClassNetCache was found, false otherwise</returns> public bool TryGetClassNetCache(string group, out NetFieldExportGroup netFieldExportGroup) { if (group == null) { netFieldExportGroup = null; return(false); } if (!_cleanedClassNetCache.TryGetValue(group, out var classNetCachePath)) { classNetCachePath = $"{group.RemoveAllPathPrefixes()}_ClassNetCache"; _cleanedClassNetCache[group] = classNetCachePath; } return(NetFieldExportGroupMap.TryGetValue(classNetCachePath, out netFieldExportGroup)); }
public NetFieldExportGroup GetNetFieldExportGroupForClassNetCache(string group, bool fullPath = false) { if (!_cleanedClassNetCache.TryGetValue(group, out var classNetCachePath)) { if (fullPath) { classNetCachePath = $"{group}_ClassNetCache"; } else { classNetCachePath = $"{RemoveAllPathPrefixes(group)}_ClassNetCache"; } _cleanedClassNetCache[group] = classNetCachePath; } if (!NetFieldExportGroupMap.ContainsKey(classNetCachePath)) { return(default);