代码拉取完成,页面将自动刷新
同步操作将从 Bono/UniHacker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
using System;
using System.Diagnostics;
using System.IO;
using Avalonia;
using Avalonia.Media;
using Avalonia.ReactiveUI;
namespace UniHacker
{
internal class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args)
{
//Test();
Language.Init();
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace()
.With(new FontManagerOptions
{
DefaultFamilyName = "avares://MyAssembly/MyAssets#MyCustomFont"
})
.UseReactiveUI();
static void Test()
{
#if DEBUG
//var patchInfo1 = UnityPatchInfos.FindPatchInfo("2022.1.16", ArchitectureType.Linux);
//var patchInfo2 = UnityPatchInfos.FindPatchInfo("2022.1.14", ArchitectureType.Linux);
var versionName = PlatformUtils.TryGetVersionOfUnity("D:/Unity");
var stopwatch = new Stopwatch();
stopwatch.Start();
Debug.WriteLine($"Start Search Pattern.");
var filePath = "D:/Unity";
//var version = "2021.3.20";
var architecture = MachineArchitecture.GetArchitectureType(filePath);
var patchInfo = UnityPatchInfos.FindPatchInfo(versionName, architecture);
var fileBytes = File.ReadAllBytes(filePath);
var darkIndexes = BoyerMooreSearcher.FindPattern(patchInfo.DarkPattern, fileBytes);
var lightIndexes = BoyerMooreSearcher.FindPattern(patchInfo.LightPattern, fileBytes);
stopwatch.Stop();
Debug.WriteLine($"Search Pattern Finish. {stopwatch.ElapsedMilliseconds}");
if (darkIndexes.Count == patchInfo.DarkPattern.Count)
Console.Beep();
if (lightIndexes.Count == patchInfo.LightPattern.Count)
Console.Beep();
throw new Exception();
#endif
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。