You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
581 B
C#
24 lines
581 B
C#
2 months ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using OneSignalSDK;
|
||
|
using OneSignalSDK.Debug.Models;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class OSNInitializer : MonoBehaviour
|
||
|
{
|
||
|
// Start is called before the first frame update
|
||
|
void Start()
|
||
|
{
|
||
|
string ons_id = "";
|
||
|
#if UNITY_ANDROID
|
||
|
ons_id = GameConstants.OSN_Android;
|
||
|
#elif UNITY_IOS
|
||
|
ons_id = GameConstants.OSN_iOS;
|
||
|
#endif
|
||
|
Debug.Log($"Initializing with appId <b>{ons_id}</b>");
|
||
|
OneSignal.Debug.LogLevel = LogLevel.Debug;
|
||
|
OneSignal.Initialize(ons_id);
|
||
|
}
|
||
|
|
||
|
}
|