private void Awake() { if (!m_initialized) { GameObject.DontDestroyOnLoad(gameObject); if (!Application.isEditor) { // Initialize the Fuel SDK listener // reference for later use by the launch // methods. m_listener = new FuelListener(this); FuelSDK.setListener(m_listener); } m_initialized = true; } else { GameObject.Destroy(gameObject); } }
private void Awake() { if (!m_initialized) { GameObject.DontDestroyOnLoad (gameObject); if (!Application.isEditor) { // Initialize the Fuel SDK listener // reference for later use by the launch // methods. m_listener = new FuelListener (this); FuelSDK.setListener (m_listener); } m_initialized = true; } else { GameObject.Destroy (gameObject); } }