From 63d0aaa6e65775671558941ead47ceb015dcea32 Mon Sep 17 00:00:00 2001 From: walon Date: Sat, 25 May 2024 09:49:22 +0800 Subject: [PATCH] =?UTF-8?q?[opt]=20`Generate/All`=E5=9C=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=B9=8B=E5=89=8D=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=AE=89=E8=A3=85HybridCLR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/Commands/PrebuildCommand.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Editor/Commands/PrebuildCommand.cs b/Editor/Commands/PrebuildCommand.cs index 8fe2a46..d480228 100644 --- a/Editor/Commands/PrebuildCommand.cs +++ b/Editor/Commands/PrebuildCommand.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEditor; +using UnityEditor.Build; namespace HybridCLR.Editor.Commands { @@ -15,6 +16,11 @@ namespace HybridCLR.Editor.Commands [MenuItem("HybridCLR/Generate/All", priority = 200)] public static void GenerateAll() { + var installer = new Installer.InstallerController(); + if (!installer.HasInstalledHybridCLR()) + { + throw new BuildFailedException($"You have not initialized HybridCLR, please install it via menu 'HybridCLR/Installer'"); + } BuildTarget target = EditorUserBuildSettings.activeBuildTarget; CompileDllCommand.CompileDll(target); Il2CppDefGeneratorCommand.GenerateIl2CppDef();