Esempio n. 1
0
 public static void OnPostprocessBuild(BuildTarget buildTarget, string path)
 {
     if (Headless.IsBuildingHeadless())
     {
         HeadlessBuilder.Postprocess(Directory.GetParent(path).ToString());
     }
 }
Esempio n. 2
0
 private static void PlayModeStateChanged(PlayModeStateChange state)
 {
     if (state != PlayModeStateChange.ExitingEditMode)
     {
         if (File.Exists(Application.dataPath + "/~HeadlessDebug.txt"))
         {
             File.Delete(Application.dataPath + "/~HeadlessDebug.txt");
             if (File.Exists(Application.dataPath + "/~HeadlessDebug.txt.meta"))
             {
                 File.Delete(Application.dataPath + "/~HeadlessDebug.txt.meta");
             }
             HeadlessBuilder.RestoreBuild();
             EditorSceneManager.LoadScene(EditorSceneManager.GetActiveScene().path);
         }
     }
 }
Esempio n. 3
0
    public void OnProcessShader(
        Shader shader, ShaderSnippetData snippet, IList <ShaderCompilerData> shaderCompilerData)
    {
        // In development, don't strip debug variants
        if (!Headless.IsBuildingHeadless() || !HeadlessBuilder.ShouldStripShaders())
        {
            return;
        }

        int shaderCount = shaderCompilerData.Count;

        for (int i = 0; i < shaderCompilerData.Count; ++i)
        {
            shaderCompilerData.RemoveAt(i);
            --i;
        }

        HeadlessBuilder.shaderCount += shaderCount;
    }
Esempio n. 4
0
 public static void DebugScene()
 {
     HeadlessBuilder.DebugBuild();
 }
Esempio n. 5
0
 static void SelectBuildHeadlessAll()
 {
     HeadlessBuilder.ManualBuildQueue();
 }
Esempio n. 6
0
 static void SelectBuildHeadless()
 {
     HeadlessBuilder.ManualBuild();
 }