Files
BITFALL/Assets/Generate/GenTest.cs
CortexCore cd3f090d68 Breakpoint
main branch is breaked
2025-01-19 21:05:25 +08:00

30 lines
924 B
C#

using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace BITKit.Gen
{
public class GenTest : MonoBehaviour
{
[BIT]
private void Execute()
{
var codeBuilder = new StringBuilder();
codeBuilder.AppendLine("namespace BITKit.Gen");
codeBuilder.AppendLine("{");
codeBuilder.AppendLine("\tpublic class GenTest");
codeBuilder.AppendLine("\t{");
codeBuilder.AppendLine("\t\tprivate void Execute()");
codeBuilder.AppendLine("\t\t{");
codeBuilder.AppendLine(("Debug.Log(\"Hello World\")"));
codeBuilder.AppendLine("\t\t}");
codeBuilder.AppendLine("\t}");
codeBuilder.AppendLine("}");
Debug.Log(codeBuilder.ToString());
var assembly = BITSharp.Compile(codeBuilder.ToString());
}
}
}