Created
January 29, 2026 11:41
-
-
Save mikedg1/c6cb882170355c8074df49192f2bb453 to your computer and use it in GitHub Desktop.
Board.fun Project Setup Helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if UNITY_EDITOR | |
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| using UnityEditor.Build; | |
| #endif | |
| public class BoardSetup : MonoBehaviour { | |
| [MenuItem("Board/Project Setup/Run All - Including Optional")] | |
| private static void RunAll() { | |
| SetupBuildTarget(); | |
| OpenPlayerSettingsOtherSettings(); | |
| ConfigureApiLevels(); | |
| ConfigureScriptingBackend(); | |
| ConfigureTargetArchitectures(); | |
| #if UNITY_6000_0_OR_NEWER | |
| ConfigureApplicationEntryPoint(); | |
| #endif | |
| } | |
| [MenuItem("Board/Project Setup/Switch Build Target To Android")] | |
| private static void SetupBuildTarget() { | |
| if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android) { | |
| EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android); | |
| } | |
| } | |
| [MenuItem("Board/Project Setup/Open Player Settings (Other Settings)")] | |
| private static void OpenPlayerSettingsOtherSettings() { | |
| SettingsService.OpenProjectSettings("Project/Player"); | |
| } | |
| [MenuItem("Board/Project Setup/Set API Levels (Android 13 - API 33)")] | |
| private static void ConfigureApiLevels() { | |
| PlayerSettings.Android.minSdkVersion = AndroidSdkVersions.AndroidApiLevel33; | |
| PlayerSettings.Android.targetSdkVersion = AndroidSdkVersions.AndroidApiLevel33; | |
| } | |
| [MenuItem("Board/Project Setup/Set Scripting Backend (IL2CPP)")] | |
| private static void ConfigureScriptingBackend() { | |
| PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP); | |
| } | |
| [MenuItem("Board/Project Setup/Set Target Architectures (ARM64 Only) (Optional)")] | |
| private static void ConfigureTargetArchitectures() { | |
| PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64; | |
| } | |
| #if UNITY_6000_0_OR_NEWER | |
| [MenuItem("Board/Project Setup/Set Application Entry Point (Activity)")] | |
| private static void ConfigureApplicationEntryPoint() { | |
| PlayerSettings.Android.applicationEntry = AndroidApplicationEntry.Activity; | |
| } | |
| #endif | |
| } | |
| #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment