public static void NewInstance(string dsn, SentryConfig sentryConfig = null, RavenOptionType option = null) { if (m_instance == null) { GameObject obj = new GameObject("RavenObj"); obj.AddComponent <Unity3DRavenCS>(); m_instance = obj.GetComponent <Unity3DRavenCS>(); m_instance.m_dsn = new DSN(dsn); if (!m_instance.m_dsn.isValid) { m_instance.m_valid = false; Debug.Log("Unity3DRavenCS is disabled because the DSN is invalid."); } else { m_instance.m_valid = true; } m_instance.m_option = option == null ? new RavenOptionType() : option; m_instance.m_sentryConfig = sentryConfig == null ? new SentryConfig() : sentryConfig; m_instance.Init(); DontDestroyOnLoad(obj); } }
public HttpClient(DSN dsn, string payload, RavenOptionType option) { m_dsn = dsn; m_payload = payload; m_option = option; }