31 lines
721 B
C#
31 lines
721 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using DynamicExpresso;
|
|
|
|
namespace Ichni.Editor
|
|
{
|
|
public partial class EditorConsole : MonoBehaviour
|
|
{
|
|
public Interpreter functionInterpreter;
|
|
|
|
private void Start()
|
|
{
|
|
SetUpFunctions();
|
|
|
|
//Test
|
|
functionInterpreter.Eval("Log(\"Hello World!\")");
|
|
}
|
|
}
|
|
|
|
public partial class EditorConsole
|
|
{
|
|
private void SetUpFunctions()
|
|
{
|
|
functionInterpreter = new Interpreter();
|
|
|
|
functionInterpreter.SetFunction("Log", (System.Action<object>)Debug.Log);
|
|
}
|
|
}
|
|
} |