Open friuns2 opened 2 years ago
CScript.Run("using UnityEngine; class Test{ void Main(){GUILayout.Button(\"test\")}}");
ah looks like it cannot handle params
public static bool Button(string text, params GUILayoutOption[] options)
Sorry for inconvenience. SlowSharp does not support full C# syntax.
seems like there are missing implementation of params
as you said.
https://github.com/Ourpalm/ILRuntime
what about take a look of this project. it's actively maintained til now.
Thanks i know about it, but it cant compile c# code at runtime. I'm very happy with this project so far works flowlesly :)
@friuns2
you can execute .cs
file using ILRuntime.
https://stackoverflow.com/questions/32769630/how-to-compile-a-c-sharp-file-with-roslyn-programmatically
.cs
-> roslyn -> .dll
-> ILRuntime.
or you may want to take a look this asset https://assetstore.unity.com/packages/tools/cs-script-for-unity-23510 (can execute 100% of C# syntax. the only problem is JIT based scripting engine won't work on iOS or WebAssembly)
I'm building for android and it need il2cpp for 64bit
.cs
-> roslyn -> .dll
-> ILRuntime.
That could work but have to copy all dlls to project resources
also in ILRuntime is no easy way to override class, have to create Adaptor, but your CScript.Override works without any additional code
Hi i'm working on modding tool using slowsharp https://github.com/friuns2/LuaMod/tree/SharpMod
if i type GUILayout.Button("test"); it throws exception, can you help?