static void Init() { if (Instance == null) { Instance = new GameObject("IonicComms").AddComponent <IonicComms>(); DontDestroyOnLoad(Instance.gameObject); } }
void Awake() { if (Instance == null) { Instance = this; } else if (this != Instance) { Destroy(this); } }
// IonicComms.SendMessageToIonic( "Anshul testing" ); void Awake() { if (Instance == null) { Instance = this; gameObject.name = "IonicComms"; DontDestroyOnLoad(gameObject); } else if (this != Instance) { Destroy(this); } }