Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active June 19, 2017 13:36
Show Gist options
  • Save tsubaki/751ea16eef0ec8afcb1e8dfb59a2fa6b to your computer and use it in GitHub Desktop.
Save tsubaki/751ea16eef0ec8afcb1e8dfb59a2fa6b to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu]
public class ClickCount : ScriptableObject
{
[SerializeField] int _count = 0;
public int count { get; set; }
void OnEnable()
{
Init ();
}
void OnValidate()
{
Init ();
}
void Init()
{
count = _count;
}
public void Add()
{
count ++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment