Пример #1
0
        /// <summary>
        /// Creates tile data from a serialized data created by <see cref="GetData"/>.
        /// </summary>
        /// <param name="rawTileData">The serialized tile data.</param>
        /// <returns>A new tile data object, or null on error.</returns>
        public static NavmeshTileData Create(byte[] rawTileData)
        {
            if (rawTileData == null)
                return null;

            NavmeshTileData result = new NavmeshTileData();

            if (NavmeshTileEx.dtnmBuildTileDataRaw(rawTileData, rawTileData.Length, result))
                return result;

            return null;
        }
Пример #2
0
        /// <summary>
        /// Creates tile data from a serialized data created by <see cref="GetData"/>.
        /// </summary>
        /// <param name="rawTileData">The serialized tile data.</param>
        /// <returns>A new tile data object, or null on error.</returns>
        public static NavmeshTileData Create(byte[] rawTileData)
        {
            if (rawTileData == null)
            {
                return(null);
            }

            NavmeshTileData result = new NavmeshTileData();

            if (NavmeshTileEx.dtnmBuildTileDataRaw(rawTileData, rawTileData.Length, result))
            {
                return(result);
            }

            return(null);
        }