Runtime C# Scripting in Unity UI - The Roslyn Compiler in Unity

Опубликовано: 30 Сентябрь 2024
на канале: World of Zero
8,092
120

Lets integrate the .NET Roslyn compiler into a Unity game so we can run basic scripts at runtime. This will allow us to write new C# code into a Unity UI object like a `Text Box` and then execute it. The goal here is exposing our script processor to something we can interact with outside of the Unity Editor.

We'll be exploring this inside of a compiled Unity game running on Windows (compatibility of this solution on other platforms may not be as easy).

This project uses the Roslyn Scripting API (`Microsoft.CodeAnalysis.CSharp.Scripting`). There are more examples of that here: https://github.com/dotnet/roslyn/wiki...

Join the World of Zero Discord Server:   / discord