Skip to content

Instantly share code, notes, and snippets.

@suakig
Created May 8, 2015 16:07
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 suakig/914ed86a9ed89ef30af5 to your computer and use it in GitHub Desktop.
Save suakig/914ed86a9ed89ef30af5 to your computer and use it in GitHub Desktop.
TestSingletonFromResources.cs
using UnityEngine;
using System.Collections;
public class TestSingletonFromResources : MonoSingletonFromResources<TestSingletonFromResources>
{
public int data1;
public int data2;
public int data3;
public int data4;
public override void OnInitialize()
{
DontDestroyOnLoad(this.gameObject);
Debug.Log ( "TestSingletonFromResources#OnInitialize" );
}
public override void OnFinalize()
{
Debug.Log ( "TestSingletonFromResources#OnFinalize" );
}
public void TestCall()
{
Debug.Log ("TestSingletonFromResources#TestCall");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment