WuhuIslandTesting/Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.5/Editor/Utilities/TrackerExtensions.cs
2025-01-07 02:06:59 +01:00

23 lines
752 B
C#

using System.Text.RegularExpressions;
using UnityEditor.Build.Pipeline.Interfaces;
namespace UnityEditor.Build.Pipeline.Utilities
{
internal static class TrackerExtensions
{
public static string HumanReadable(this string camelCased)
{
return Regex.Replace(camelCased, @"(\B[A-Z]+?(?=[A-Z][^A-Z])|\B[A-Z]+?(?=[^A-Z]))", " $1");
}
public static bool UpdateTaskUnchecked(this IProgressTracker tracker, string taskTitle)
{
return tracker == null || tracker.UpdateTask(taskTitle);
}
public static bool UpdateInfoUnchecked(this IProgressTracker tracker, string taskInfo)
{
return tracker == null || tracker.UpdateInfo(taskInfo);
}
}
}