private FizzyoFramework() { if (_instance != null) { return; } Debug.Log("[FizzyoFramework] Instantiate."); User = new FizzyoUser(); Device = new FizzyoDevice(); Recogniser = new BreathRecogniser(); Achievements = new FizzyoAchievements(); Analytics = new FizzyoAnalytics(); }
private void InitializeInstance() { if (IsInitialized) { return; } _instance = this; if (Application.isPlaying) { DontDestroyOnLoad(_instance.transform.root); } User = new FizzyoUser(); Device = new FizzyoDevice(); Recogniser = new BreathRecogniser(); Achievements = new FizzyoAchievements(); Analytics = new FizzyoAnalytics(); Session = new FizzyoSession(); }