view src/test/csharp/jp.ac.u-ryukyu.ie.cr/jungle-network/operations/NetworkAppendChildOperationTest.cs @ 17:01a08cf4b2d9

Liq Files
author Kazuma
date Mon, 07 Nov 2016 01:05:24 +0900
parents
children
line wrap: on
line source

using UnityEngine;
using System.Collections;
using MsgPack;

// http://qiita.com/snaka/items/8da9f89deeef17b1923a
// message pack refarence URL.
public class NetworkAppendChildOperationTest : MonoBehaviour {

	// Use this for initialization
	void Start () {
		NetworkAppendChildAtOperation op = new NetworkAppendChildAtOperation(1);
		ObjectPacker pack = new ObjectPacker();
		byte[] value = pack.Pack(op);

		// unpackage
		ObjectPacker unpack = new ObjectPacker();
		NetworkAppendChildAtOperation mOp = unpack.Unpack<NetworkAppendChildAtOperation>(value);
		print(mOp.getPosition()); // add position 1 , get what number?
	}
}