Created
October 31, 2016 08:13
-
-
Save kazumalab/4a8292c94d2d4a68ede2b02466ded9d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NetworkSingleton.cs | |
public class NetworkSingleton : MonoBehaviour { | |
public static NetworkSingleton Instance; | |
private string URL = "myfirebaseid.firebaseio.com"; | |
private string APIKEY = "firebasedatabaseKey"; | |
public Firebase firebase; | |
private void Awake () { | |
if( null != Instance ){ | |
Destroy( gameObject ); | |
}else{ | |
Instance = this; | |
} | |
firebase = Firebase.CreateNew (URL, APIKEY); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment