view Test/junge-main/jungle/core/nodeeditor/PutAttributeTest.cs @ 38:e954d456665c

library is made by rake
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 22 Feb 2017 16:58:10 +0900
parents 1466993c104c
children
line wrap: on
line source

// using UnityEngine;
using System.Collections;
using JungleDB;

public class PutAttributeTest : MonoBehaviour {

	string key = "hoge";
	public byte[] value;

	// Use this for initialization
	void Start () {
		TreeNode node = new DefaultTreeNode ();
		PutAttribute op = new PutAttribute (key, value);

		Either<Error, LoggingNode> either = op.edit (node);
		if (either.isA ()) {
			Debug.Log ("Error発生");
		}
		LoggingNode newnode = either.b ();
		Debug.Log (newnode);
		object ret = newnode.getAttributes ().get (key);
		Debug.Log ("insertしたものは" + ret);
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}