forked from loongly/PureScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngineTest.cs
More file actions
63 lines (48 loc) · 1.39 KB
/
EngineTest.cs
File metadata and controls
63 lines (48 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
using PureScript;
public class EngineTest
{
public static void Main(string[] args)
{
try
{
StartTest();
}catch(Exception e)
{
Debug.LogError(e.ToString());
}
}
static void StartTest()
{
var ptr = ScriptEngine.GetFuncPointer();
MonoBind.InitBind(ptr);
DebugHelper.InitLog(true);
Debug.LogError(" ========223 中午 ==== +-*x&!@$#$()_+<>?{}|ff ~");
TestStaticClass.StartTest(1);
TestCube();
var obj = GameObject.CreatePrimitive(PrimitiveType.Sphere);
//obj.AddComponent<TestDelegate>();
obj.AddComponent<TestLoader>();
obj.AddComponent<TestBehaviourScript>();
//obj.AddComponent<TestException>();
}
static void TestCube()
{
var obj = GameObject.CreatePrimitive(PrimitiveType.Cube);
var t = obj.transform;
t.position = new Vector3(3, 2, 1);
var t2 = obj.transform;
if (t == t2)
{
Debug.LogError("eql transform");
t2.position = new Vector3(-3, 2, 1);
}
var pos = t2.position;
Debug.LogError("==== " + obj.name + "!@$%%%^^*(& === ");
Debug.LogError($"== x:{pos.x} y:{pos.y} z:{pos.z}");
}
}