Skip to content

Instantly share code, notes, and snippets.

@anatawa12
Created August 14, 2023 12:02
Show Gist options
  • Save anatawa12/f5c598c1e1b02060ecc9697191281fe7 to your computer and use it in GitHub Desktop.
Save anatawa12/f5c598c1e1b02060ecc9697191281fe7 to your computer and use it in GitHub Desktop.
Force Compilation Unity
{
"name": "com.anatawa12.force-recompilation",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
using UnityEditor;
using UnityEditor.Compilation;
internal class ForceRecompilation
{
[MenuItem("Tools/Force Compilation")]
static void DoForceRecompilation()
{
CompilationPipeline.RequestScriptCompilation();
EditorUtility.DisplayDialog("Force Compilation", "Compilation Requested!", "OK");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment