Пример #1
0
        /// <summary>
        /// Finds a name available for a new asset. This method will try to create a name based on an existing name and will append
        /// "_" + (number++) on every try. The new location found is added to the known existing locations.
        /// </summary>
        /// <param name="location">The location.</param>
        /// <param name="newLocation">The new location.</param>
        /// <returns><c>true</c> if there is a new location, <c>false</c> otherwise.</returns>
        public bool RegisterLocation(UFile location, out UFile newLocation)
        {
            var result = FindAvailableLocation(location, containsLocation, out newLocation);

            ExistingLocations.Add(newLocation ?? location);
            return(result);
        }
Пример #2
0
 /// <summary>
 /// Finds a name available for a new asset. This method will try to create a name based on an existing name and will append
 /// "_" + (number++) on every try. The new location found is added to the known existing locations.
 /// </summary>
 /// <param name="location">The location.</param>
 /// <param name="newLocation">The new location.</param>
 /// <returns><c>true</c> if there is a new location, <c>false</c> otherwise.</returns>
 public bool RegisterLocation(UFile location, out UFile newLocation)
 {
     newLocation = location;
     if (IsContainingLocation(location))
     {
         newLocation = NamingHelper.ComputeNewName(location, IsContainingLocation);
     }
     ExistingLocations.Add(newLocation);
     return(newLocation != location);
 }