Skip to content

Commit cec6fb8

Browse files
authored
Fix UnityDebugLogger implementation (#143)
## Description of Changes Without explicit reference these result in > error CS0119: 'UnityDebugLogger.Debug(string)' is a method, which is not valid in the given context ## API - [ ] This is an API breaking change to the SDK *If the API is breaking, please state below what will break* ## Requires SpacetimeDB PRs *List any PRs here that are required for this SDK change to work*
1 parent b62a464 commit cec6fb8

File tree

1 file changed

+14
-29
lines changed

1 file changed

+14
-29
lines changed

sdks/csharp/src/UnityDebugLogger.cs

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,31 @@
44
*/
55
#if UNITY_5_3_OR_NEWER
66
using System;
7-
using UnityEngine;
87

98
namespace SpacetimeDB
109
{
1110
internal class UnityDebugLogger : ISpacetimeDBLogger
1211
{
13-
public void Debug(string message)
14-
{
15-
Debug.Log(message);
16-
}
12+
public void Debug(string message) =>
13+
UnityEngine.Debug.Log(message);
1714

18-
public void Trace(string message)
19-
{
20-
Debug.Log(message);
21-
}
15+
public void Trace(string message) =>
16+
UnityEngine.Debug.Log(message);
2217

23-
public void Info(string message)
24-
{
25-
Debug.Log(message);
26-
}
18+
public void Info(string message) =>
19+
UnityEngine.Debug.Log(message);
2720

28-
public void Warn(string message)
29-
{
30-
Debug.LogWarning(message);
31-
}
21+
public void Warn(string message) =>
22+
UnityEngine.Debug.LogWarning(message);
3223

33-
public void Error(string message)
34-
{
35-
Debug.LogError(message);
36-
}
24+
public void Error(string message) =>
25+
UnityEngine.Debug.LogError(message);
3726

38-
public void Exception(string message)
39-
{
40-
Debug.LogError(message);
41-
}
27+
public void Exception(string message) =>
28+
UnityEngine.Debug.LogError(message);
4229

43-
public void Exception(Exception e)
44-
{
45-
Debug.LogException(e);
46-
}
30+
public void Exception(Exception e) =>
31+
UnityEngine.Debug.LogException(e);
4732
}
4833
}
4934
#endif

0 commit comments

Comments
 (0)