Skip to content

Commit 2c9f726

Browse files
committed
Fix C# compile errors
1 parent f7b98a1 commit 2c9f726

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="3DRadSpace_CSharp.csproj" />
3+
</Solution>

3DRadSpace/3DRadSpace_CSharp/Internal/ScriptManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
2929

3030
if (string.IsNullOrEmpty(path) || string.IsNullOrEmpty(classNameStr))
3131
{
32-
SetWarning("Invalid script path or class name");
32+
PrintWarning("Invalid script path or class name");
3333
return -1;
3434
}
3535

@@ -38,7 +38,7 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
3838
if (!result.Success)
3939
{
4040
string errors = string.Join("\n", result.Errors);
41-
SetWarning($"Script compilation failed:\n{errors}");
41+
PrintWarning($"Script compilation failed:\n{errors}");
4242
return -1;
4343
}
4444

@@ -50,14 +50,14 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
5050
}
5151
catch (Exception ex)
5252
{
53-
SetWarning($"Failed to create instance: {ex.Message}");
53+
PrintWarning($"Failed to create instance: {ex.Message}");
5454
result.Unload();
5555
return -1;
5656
}
5757

5858
if (instance == null)
5959
{
60-
SetWarning("Failed to create script instance");
60+
PrintWarning("Failed to create script instance");
6161
result.Unload();
6262
return -1;
6363
}
@@ -82,7 +82,7 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
8282
}
8383
catch (Exception ex)
8484
{
85-
SetWarning($"Exception in LoadScript: {ex.Message}");
85+
PrintWarning($"Exception in LoadScript: {ex.Message}");
8686
return -1;
8787
}
8888
}
@@ -105,7 +105,7 @@ public static byte UpdateScript(int scriptId)
105105
}
106106
catch(Exception ex)
107107
{
108-
SetWarning($"Exception in UpdateScript: {ex.Message}");
108+
PrintWarning($"Exception in UpdateScript: {ex.Message}");
109109
return 0;
110110
}
111111
}

3DRadSpace/Engine3DRadSpace/Logging/Warning.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ namespace Engine3DRadSpace::Logging
2121
inline void E3DRSP_LOGGING_EXPORT PrintWarning(const std::string &warning_text);
2222
inline void E3DRSP_LOGGING_EXPORT DefaultWarningHandler(const Warning &warning);
2323
}
24+

0 commit comments

Comments
 (0)