Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 55 additions & 10 deletions Runtime/Reporter/DotNetStandardExceptionReporter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BugSplatUnity.Runtime.Client;
using BugSplatUnity.Runtime.Client;
using BugSplatUnity.Runtime.Settings;
using System;
using System.Collections;
Expand Down Expand Up @@ -111,7 +111,16 @@ private IEnumerator Post(string stackTrace, IReportPostOptions options = null, A
var editorLogFileInfo = new FileInfo(editorLogFilePath);
if (editorLogFileInfo.Exists)
{
options.AdditionalAttachments.Add(editorLogFileInfo);
try
{
var tempFile = CopyLogTailToTempFile(editorLogFileInfo, clientSettings.LogFileMaxSizeMB);
options.AdditionalAttachments.Add(tempFile);
tempFiles.Add(tempFile);
}
catch (Exception ex)
{
Debug.LogException(new Exception("Could not copy log tail to temp file", ex));
}
}
else
{
Expand All @@ -123,7 +132,16 @@ private IEnumerator Post(string stackTrace, IReportPostOptions options = null, A
var editorLogFileInfo = new FileInfo(editorLogFilePath);
if (editorLogFileInfo.Exists)
{
options.AdditionalAttachments.Add(editorLogFileInfo);
try
{
var tempFile = CopyLogTailToTempFile(editorLogFileInfo, clientSettings.LogFileMaxSizeMB);
options.AdditionalAttachments.Add(tempFile);
tempFiles.Add(tempFile);
}
catch (Exception ex)
{
Debug.LogException(new Exception("Could not copy log tail to temp file", ex));
}
}
else
{
Expand Down Expand Up @@ -164,31 +182,58 @@ private IEnumerator Post(string stackTrace, IReportPostOptions options = null, A
var playerLogFileInfo = new FileInfo(playerLogFilePath);
if (playerLogFileInfo.Exists)
{
options.AdditionalAttachments.Add(playerLogFileInfo);
try
{
var tempFile = CopyLogTailToTempFile(playerLogFileInfo, clientSettings.LogFileMaxSizeMB);
options.AdditionalAttachments.Add(tempFile);
tempFiles.Add(tempFile);
}
catch (Exception ex)
{
Debug.LogException(new Exception("Could not copy log tail to temp file", ex));
}
}
else
{
Debug.Log($"BugSplat info: Could not find {playerLogFileInfo.FullName}, skipping...");
}
#elif UNITY_STANDALONE_LINUX
var home = Environment.GetEnvironmentVariable("HOME");
var editorLogFilePath = Path.Combine(home, ".config", "unity3d", Application.companyName, Application.productName, "Player.log");
var editorLogFileInfo = new FileInfo(editorLogFilePath);
if (editorLogFileInfo.Exists)
var playerLogFilePath = Path.Combine(home, ".config", "unity3d", Application.companyName, Application.productName, "Player.log");
var playerLogFileInfo = new FileInfo(playerLogFilePath);
if (playerLogFileInfo.Exists)
{
options.AdditionalAttachments.Add(editorLogFileInfo);
try
{
var tempFile = CopyLogTailToTempFile(playerLogFileInfo, clientSettings.LogFileMaxSizeMB);
options.AdditionalAttachments.Add(tempFile);
tempFiles.Add(tempFile);
}
catch (Exception ex)
{
Debug.LogException(new Exception("Could not copy log tail to temp file", ex));
}
}
else
{
Debug.Log($"BugSplat info: Could not find {editorLogFileInfo.FullName}, skipping...");
Debug.Log($"BugSplat info: Could not find {playerLogFileInfo.FullName}, skipping...");
}
#elif UNITY_WSA
var tempState = Application.temporaryCachePath;
var playerLogFilePath = Path.Combine(tempState, "UnityPlayer.log");
var playerLogFileInfo = new FileInfo(playerLogFilePath);
if (playerLogFileInfo.Exists)
{
options.AdditionalAttachments.Add(playerLogFileInfo);
try
{
var tempFile = CopyLogTailToTempFile(playerLogFileInfo, clientSettings.LogFileMaxSizeMB);
options.AdditionalAttachments.Add(tempFile);
tempFiles.Add(tempFile);
}
catch (Exception ex)
{
Debug.LogException(new Exception("Could not copy log tail to temp file", ex));
}
}
else
{
Expand Down
70 changes: 17 additions & 53 deletions Samples~/my-unity-crasher/Materials/Bug.mat
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,42 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Bug
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ValidKeywords:
- _RECEIVE_SHADOWS_OFF
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
- _BaseMap:
m_Texture: {fileID: 2800000, guid: fd8cef68da0b79c45a8c1e4defcc4dac, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: fd8cef68da0b79c45a8c1e4defcc4dac, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
- _Surface: 1
- _Blend: 0
- _Cull: 2
- _ZWrite: 0
- _AlphaClip: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
Loading