30 lines
924 B
C#
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());
|
|
}
|
|
}
|
|
}
|