Skip to content

Instantly share code, notes, and snippets.

@baba-s
Created March 21, 2024 23:37
Show Gist options
  • Save baba-s/89e215a6bbd86c2ccebbbefcff830ef0 to your computer and use it in GitHub Desktop.
Save baba-s/89e215a6bbd86c2ccebbbefcff830ef0 to your computer and use it in GitHub Desktop.
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public static class Example
{
static Example()
{
BuildPlayerWindow.RegisterBuildPlayerHandler( OnBuildPlayer );
}
private static void OnBuildPlayer( BuildPlayerOptions buildPlayerOptions )
{
Debug.Log( "ビルド前に行いたい処理をここに書く" );
BuildPlayerWindow.DefaultBuildMethods.BuildPlayer( buildPlayerOptions );
Debug.Log( "ビルド後に行いたい処理をここに書く" );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment