Skip to content

Commit da36bf6

Browse files
committed
Sample Project
1 parent 2888441 commit da36bf6

19 files changed

+44
-0
lines changed

Project/Assets/Resources.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project/Assets/Resources/Test.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var str = "Hello";
2+
3+
str += " World";
4+
5+
log(str);
6+
7+
log(add(2, 3));

Project/Assets/Resources/Test.txt.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project/Assets/Scripts.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project/Assets/Scripts/Test.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using UnityEngine;
2+
using System;
3+
using System.Collections;
4+
using Jint;
5+
6+
public class Test : MonoBehaviour
7+
{
8+
void Start()
9+
{
10+
JintEngine e = new JintEngine();
11+
12+
e.SetFunction("log",
13+
new Jint.Delegates.Action<object>((a) => Debug.Log(a)));
14+
15+
e.SetFunction("add",
16+
new Jint.Delegates.Func<double, double, double>((a,b) => a + b));
17+
18+
TextAsset script = (TextAsset)Resources.Load("Test");
19+
20+
e.Run(script.text);
21+
}
22+
}

Project/Assets/Scripts/Test.cs.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project/Assets/main.unity

12.7 KB
Binary file not shown.

Project/Assets/main.unity.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
4.03 KB
Binary file not shown.
4.18 KB
Binary file not shown.
Binary file not shown.
4.06 KB
Binary file not shown.
5.27 KB
Binary file not shown.
8.98 KB
Binary file not shown.
4.02 KB
Binary file not shown.
11.2 KB
Binary file not shown.
4.58 KB
Binary file not shown.
5.27 KB
Binary file not shown.
4.02 KB
Binary file not shown.

0 commit comments

Comments
 (0)