コード例 #1
0
 /// <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);
 }
コード例 #2
0
        /// <summary>
        /// Empty the NetGuidCache
        /// </summary>
        public void Cleanup()
        {
            NetFieldExportGroupIndexToGroup.Clear();
            NetFieldExportGroupMap.Clear();
            NetGuidToPathName.Clear();
            ObjectLookup.Clear();
            NetFieldExportGroupMapPathFixed.Clear();

            _archTypeToExportGroup.Clear();
            _cleanedPaths.Clear();
            _cleanedClassNetCache.Clear();
        }
コード例 #3
0
        public NetFieldExportGroup GetNetFieldExportGroup(string pathName)
        {
            if (String.IsNullOrEmpty(pathName))
            {
                return(null);
            }

            if (NetFieldExportGroupMap.TryGetValue(pathName, out NetFieldExportGroup netFieldExportGroup))
            {
                return(netFieldExportGroup);
            }

            return(null);
        }
コード例 #4
0
        /// <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();
        }
コード例 #5
0
        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();
        }
コード例 #6
0
        /// <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));
        }
コード例 #7
0
        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);