Skip to content

Instantly share code, notes, and snippets.

@iwashihead
Created July 19, 2015 09:26
Show Gist options
  • Save iwashihead/fd30263956bf3f5cb915 to your computer and use it in GitHub Desktop.
Save iwashihead/fd30263956bf3f5cb915 to your computer and use it in GitHub Desktop.
ScriptacleObjectのサンプルクラス
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