mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Add compile listener to create github annotations
This commit is contained in:
parent
b20286a361
commit
1d274c7d6d
32
dist/default-build-script/Assets/Editor/UnityBuilderAction/Reporting/CompileListener.cs
vendored
Normal file
32
dist/default-build-script/Assets/Editor/UnityBuilderAction/Reporting/CompileListener.cs
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace UnityBuilderAction.Reporting
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
static class CompileListener
|
||||
{
|
||||
static CompileListener()
|
||||
{
|
||||
if (Application.isBatchMode)
|
||||
{
|
||||
Application.logMessageReceived += Application_logMessageReceived;
|
||||
}
|
||||
}
|
||||
|
||||
private static void Application_logMessageReceived(string condition, string stackTrace, LogType type)
|
||||
{
|
||||
string prefix = "";
|
||||
switch (type)
|
||||
{
|
||||
case LogType.Error:
|
||||
prefix = "error";
|
||||
break;
|
||||
case LogType.Warning:
|
||||
prefix = "warning";
|
||||
break;
|
||||
}
|
||||
Debug.Log($"::{prefix} ::{condition}\n{stackTrace}");
|
||||
}
|
||||
}
|
||||
}
|
11
dist/default-build-script/Assets/Editor/UnityBuilderAction/Reporting/CompileListener.cs.meta
vendored
Normal file
11
dist/default-build-script/Assets/Editor/UnityBuilderAction/Reporting/CompileListener.cs.meta
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fad44373fb7b61a4bb584e2675795aca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user