Skip to content

Instantly share code, notes, and snippets.

@snlehton
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snlehton/03f25d981805a3b7d781 to your computer and use it in GitHub Desktop.
Save snlehton/03f25d981805a3b7d781 to your computer and use it in GitHub Desktop.
SOExample behaviour
using UnityEngine;
using System.Collections;
public class SOExampleBehaviour : MonoBehaviour
{
public SOExample test;
public void OnEnable()
{
// instantiate if needed
if (test == null)
test = ScriptableObject.CreateInstance<SOExample>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment