Reputation: 13
How do I compile a .cs
file to a .dll
file without using Visual Studio?
Here is an example file:
using UnityEngine;
namespace Test
{
public class Loader
{
public static GameObject load_object;
public static void Load()
{
load_object = new GameObject();
load_object.AddComponent<GG>();
UnityEngine.Object.DontDestroyOnLoad(load_object);
}
}
}
Upvotes: 0
Views: 2012
Reputation: 5787
If you have .NET Framework
installed, run this command:
C:\Windows\Microsoft.NET\Framework\{version}\csc.exe yourfile.cs
Of course all dependencies must be in place.
You can find more information about this kind of compilation: here
Upvotes: 1