Mercurial > hg > Database > jungle-sharp
view Test/junge-main/jungle/core/nodeeditor/PutAttributeTest.cs @ 20:1f99e150f336
fix folder and add Object Mapper.
author | Kazuma Takeda |
---|---|
date | Thu, 15 Dec 2016 22:52:48 +0900 |
parents | |
children | 1466993c104c |
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); byte[] ret = newnode.getAttributes ().get (key); Debug.Log ("insertしたものは" + ret); } // Update is called once per frame void Update () { } }