Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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