0
|
1 using UnityEngine;
|
|
2 using System.Collections;
|
|
3
|
|
4 public class PutAttributeTest : MonoBehaviour {
|
|
5
|
|
6 string key = "hoge";
|
7
|
7 public byte[] value;
|
0
|
8
|
|
9 // Use this for initialization
|
|
10 void Start () {
|
|
11 TreeNode node = new DefaultTreeNode ();
|
|
12 PutAttribute op = new PutAttribute (key, value);
|
|
13
|
|
14 Either<Error, LoggingNode> either = op.edit (node);
|
|
15 if (either.isA ()) {
|
|
16 Debug.Log ("Error発生");
|
|
17 }
|
|
18 LoggingNode newnode = either.b ();
|
|
19 Debug.Log (newnode);
|
7
|
20 byte[] ret = newnode.getAttributes ().get (key);
|
0
|
21 Debug.Log ("insertしたものは" + ret);
|
|
22 }
|
|
23
|
|
24 // Update is called once per frame
|
|
25 void Update () {
|
|
26
|
|
27 }
|
|
28 }
|