mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
d297cf1cad
* chore(i18n): initial integration with NDMF localization system * feat(error): integrate with NDMF error reporting framework Note that as part of this, the pre-build validation system has been disabled for now. It didn't work very well with other NDMF plugins in the first place, so it's probably for the best... * chore: fix u2019 build errors
50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using nadena.dev.modular_avatar.core;
|
|
using nadena.dev.modular_avatar.core.editor;
|
|
using nadena.dev.ndmf;
|
|
using Newtonsoft.Json;
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEngine.SceneManagement;
|
|
using Object = UnityEngine.Object;
|
|
|
|
namespace nadena.dev.modular_avatar.editor.ErrorReporting
|
|
{
|
|
internal class BuildReport
|
|
{
|
|
private const string Path = "Library/ModularAvatarBuildReport.json";
|
|
|
|
internal static void Log(ErrorSeverity severity, string code, params object[] objects)
|
|
{
|
|
ErrorReport.ReportError(Localization.L, severity, code, objects);
|
|
}
|
|
|
|
internal static void LogFatal(string code, params object[] objects)
|
|
{
|
|
ErrorReport.ReportError(Localization.L, ErrorSeverity.Error, code, objects);
|
|
}
|
|
|
|
internal static void LogException(Exception e, string additionalStackTrace = "")
|
|
{
|
|
ErrorReport.ReportException(e, additionalStackTrace);
|
|
}
|
|
|
|
internal static T ReportingObject<T>(UnityEngine.Object obj, Func<T> action)
|
|
{
|
|
return ErrorReport.WithContextObject(obj, action);
|
|
}
|
|
|
|
internal static void ReportingObject(UnityEngine.Object obj, Action action)
|
|
{
|
|
ErrorReport.WithContextObject(obj, action);
|
|
}
|
|
|
|
[Obsolete("Use NDMF's ObjectRegistry instead")]
|
|
public static void RemapPaths(string original, string cloned)
|
|
{
|
|
}
|
|
}
|
|
} |