Skip to content

Instantly share code, notes, and snippets.

@HassakuTb
Created April 19, 2016 05:54
Show Gist options
  • Save HassakuTb/5c18dae429bd55e473962934a367bd8e to your computer and use it in GitHub Desktop.
Save HassakuTb/5c18dae429bd55e473962934a367bd8e to your computer and use it in GitHub Desktop.
using UnityEngine;
public abstract class ScriptableObjectInstancePresenter<T> : MonoBehaviour where T : ScriptableObject{
public T m_model;
protected T model { get; set; }
protected void Awake() {
model = ScriptableObject.Instantiate<T>(m_model);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment