Created
July 19, 2015 09:26
-
-
Save iwashihead/fd30263956bf3f5cb915 to your computer and use it in GitHub Desktop.
ScriptacleObjectのサンプルクラス
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class MyDataSet : ScriptableObject | |
{ | |
public List<MyData> list = null; | |
void OnEnable() | |
{ | |
hideFlags = HideFlags.NotEditable; | |
if(list == null) { | |
list = new List<MyData>(); | |
} | |
} | |
public void Add(int id, MyData _data) | |
{ | |
if(list != null) list.Add(_data); | |
} | |
public void Clear() | |
{ | |
if(list != null) list.Clear(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment