Unity/Firebase/CloudMessaging
提供: 初心者エンジニアの簡易メモ
DL&Import
FirebaseMessaging.unitypackage
サンプル
public void Start() { Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived; Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived; } public void OnTokenReceived(object sender, Firebase.Messaging.TokenReceivedEventArgs token) { UnityEngine.Debug.Log("Received Registration Token: " + token.Token); } public void OnMessageReceived(object sender, Firebase.Messaging.MessageReceivedEventArgs e) { UnityEngine.Debug.Log("Received a new message from: " + e.Message.From); }
参考
公式fcm https://firebase.google.com/docs/cloud-messaging/unity/client?hl=ja