-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest2.cs
More file actions
51 lines (39 loc) · 984 Bytes
/
test2.cs
File metadata and controls
51 lines (39 loc) · 984 Bytes
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
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System;
//using Rinity;
public class TestScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
[CustomEditor(typeof(TestScript))]
public class TestEditor : Editor
{
public bool init = false;
private void Load()
{
Console.WriteLine("REQ");
var src = "{\"src\" : \"class AA{public void Foo(){}}\"}";
var data = Encoding.UTF8.GetBytes(src);
var w = new WWW("http://localhost:9900/ca/parse_one", data, new Dictionary<string, string>() {
{ "Content-Type", "application/json" }
});
Console.WriteLine("REQ");
while (w.isDone == false) ;
Debug.Log(w.text);
}
public override void OnInspectorGUI()
{
if (GUILayout.Button("A"))
{
Load();
}
}
}