Skip to content

Instantly share code, notes, and snippets.

@iwashihead
Created July 19, 2015 09:25
Show Gist options
  • Save iwashihead/3b0711172bed4f691d10 to your computer and use it in GitHub Desktop.
Save iwashihead/3b0711172bed4f691d10 to your computer and use it in GitHub Desktop.
ScriptacleObjectのサンプルデータクラス
using System;
using UnityEngine;
[System.SerializableAttribute]
public class MyData : ICloneable{
public enum Type{
NONE,
LEFT,
RIGHT
}
public int id;
public string name;
public Texture2D image;
public Color color;
public int type;
public object Clone ()
{
MyData copy = new MyData();
copy.id = id;
copy.name = name;
copy.color = color;
copy.type = type;
return copy;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment