PO/Library/Artifacts/d7/d72e3387423bdc82bf9a1bdc8fd...

178 lines
8.8 KiB
Plaintext
Raw Normal View History

2022-01-12 10:06:03 +03:00
<0F># 2019.4.19f1<00><><EFBFBD><EFBFBD> <00><>f<EFBFBD><66>!<21>5<>9<EFBFBD>4Q<0E><>B<00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00> E<00> <00><00>#<00>.<00>,<00>5a<00> <00><00>#<00>.<00>,<00><00><00>r<00> <00><00># <00>.<00>,
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00><00><00>J<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>\<00><00><><EFBFBD><EFBFBD><EFBFBD><00>H<00>r<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00>w<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>#!<00>.<00>,"<00><00><><00><><EFBFBD><EFBFBD>#@1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$<00><00><00>%.<00>j<00>&<00><00><><00><><EFBFBD><EFBFBD>'<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(<00><00><00><00>)<00>j<00><><EFBFBD><EFBFBD><EFBFBD>*<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD>+<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>,@<00><00><00>-Q<00>j<00>.y<00>
<00> /<00><00>#0<00>.<00>,1<00> <00><>2@<00><00><> 3@<00><00>#4<00>.<00>,5<00>H<00><><00><><EFBFBD><EFBFBD>6<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>7@<00><00><00>8Q<00>j<00>9H<00><><00><><EFBFBD><EFBFBD>:<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>;@<00><00><00><Q<00>j<00>=H<00><><00><><EFBFBD><EFBFBD>><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>?@<00><00><00>@Q<00>j<00>AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants<00><><EFBFBD>G<EFBFBD><47>܏Z56<35>:!@i<>J*<00><00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00>E<00> <00><00><00>.<00><00>(a<00> <00><00><00>.<00><00><00><00>r<00> <00><00> <00>.<00>
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00><00><00>=<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><01><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><01>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00><00>.<00><00>y<00>Q <00><00><00>.<00> <00><00><00>X!H<00>i<00><><EFBFBD><EFBFBD>"<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>#@<00><00><00>$Q<00>j<00>%H<00>u<00><><EFBFBD><EFBFBD>&<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>'@<00><00><00>(Q<00>j<00>)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespace\<00>y<EFBFBD>`<00><00>y<EFBFBD>
PlasticApp0using System;
using System.IO;
using System.Linq;
using UnityEngine;
using Codice.Client.BaseCommands;
using Codice.Client.Common;
using Codice.Client.Common.FsNodeReaders;
using Codice.Client.Common.Threading;
using Codice.CM.Common;
using Codice.CM.ConfigureHelper;
using Codice.LogWrapper;
using Codice.Utils;
using PlasticGui;
using PlasticPipe.Certificates;
using Unity.PlasticSCM.Editor.Configuration;
using Unity.PlasticSCM.Editor.UI;
using MacUI;
namespace Unity.PlasticSCM.Editor
{
internal static class PlasticApp
{
internal static void InitializeIfNeeded()
{
if (mIsInitialized)
return;
ConfigureLogging();
RegisterExceptionHandlers();
InitLocalization();
ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());
ServicePointConfigurator.ConfigureServicePoint();
CertificateUi.RegisterHandler(new ChannelCertificateUiImpl());
SetupFsWatcher();
EditionManager.Get().DisableCapability(
EnumEditionCapabilities.Extensions);
ClientHandlers.Register();
PlasticGuiConfig.SetConfigFile(
PlasticGuiConfig.UNITY_GUI_CONFIG_FILE);
mIsInitialized = true;
}
internal static void Dispose()
{
UnRegisterExceptionHandlers();
}
static void InitLocalization()
{
string language = null;
try
{
language = ClientConfig.Get().GetLanguage();
}
catch
{
language = string.Empty;
}
Localization.Init(language);
PlasticLocalization.SetLanguage(language);
}
static void ConfigureLogging()
{
try
{
string log4netpath = ToolConfig.GetUnityPlasticLogConfigFile();
if (!File.Exists(log4netpath))
WriteLogConfiguration.For(log4netpath);
XmlConfigurator.Configure(new FileInfo(log4netpath));
}
catch
{
//it failed configuring the logging info; nothing to do.
}
}
static void RegisterExceptionHandlers()
{
AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;
Application.logMessageReceivedThreaded += HandleLog;
}
static void UnRegisterExceptionHandlers()
{
AppDomain.CurrentDomain.UnhandledException -= HandleUnhandledException;
Application.logMessageReceivedThreaded -= HandleLog;
}
static void HandleUnhandledException(object sender, UnhandledExceptionEventArgs args)
{
Exception ex = (Exception)args.ExceptionObject;
if (IsExitGUIException(ex) ||
!IsPlasticStackTrace(ex.StackTrace))
return;
GUIActionRunner.RunGUIAction(delegate {
ExceptionsHandler.HandleException("HandleUnhandledException", ex);
});
}
static void HandleLog(string logString, string stackTrace, LogType type)
{
if (type != LogType.Exception)
return;
if (!IsPlasticStackTrace(stackTrace))
return;
GUIActionRunner.RunGUIAction(delegate {
mLog.ErrorFormat("[HandleLog] Unexpected error: {0}", logString);
mLog.DebugFormat("Stack trace: {0}", stackTrace);
string message = logString;
if (ExceptionsHandler.DumpStackTrace())
message += Environment.NewLine + stackTrace;
GuiMessage.ShowError(message);
});
}
static void SetupFsWatcher()
{
if (!PlatformIdentifier.IsMac())
return;
WorkspaceWatcherFsNodeReadersCache.Get().SetMacFsWatcherBuilder(
new MacFsWatcherBuilder());
}
static bool IsPlasticStackTrace(string stackTrace)
{
if (stackTrace == null)
return false;
string[] namespaces = new[] {
"Codice.",
"GluonGui.",
"PlasticGui."
};
return namespaces.Any(stackTrace.Contains);
}
static bool IsExitGUIException(Exception ex)
{
return ex is ExitGUIException;
}
static bool mIsInitialized;
static readonly ILog mLog = LogManager.GetLogger("PlasticApp");
}
}
PlasticAppUnity.PlasticSCM.Editor