This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ReadFromDatabase() | |
{ | |
FirebaseDatabase database = FirebaseDatabase.DefaultInstance; | |
DatabaseReference myRef = database.GetReference("message"); | |
ValueEventListener valueEventListener = new ValueEventListener(); | |
myRef.AddValueEventListener(valueEventListener); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using AndroidUtils; | |
namespace FirebaseUnityWrapper.Database.Event | |
{ | |
public interface IValueEventListener | |
{ | |
void onCancelled(DatabaseError error); | |
void onDataChange(DataSnapshot snapshot); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
using AndroidUtils; | |
namespace FirebaseUnityWrapper.Database.Event | |
{ | |
public class ValueEventListenerWrapper : AndroidJavaProxy | |
{ | |
protected readonly IValueEventListener mListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FirebaseUnityWrapper.Auth; | |
using FirebaseUnityWrapper.Database; | |
using FirebaseUnityWrapper.Database.Event; | |
using FirebaseUnityWrapper.Storage; | |
using FirebaseUnityWrapper.Storage.StorageTask; | |
using GMSTasks; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Material newMat = Resources.Load("Materials/Material/NewYear", typeof(Material)) as Material; | |
ball.GetComponent<MeshRenderer>().material = newMat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string GetSource(string key) | |
{ | |
string source = ""; | |
if (agc != null) source = agc.GetSource(key); | |
return source; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HMSRemoteConfigManager.LoadLastFetched(); | |
HMSRemoteConfigManager.LoadLastFetched().getValueAsString("shape")} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debug.Log($"Value: {HMSRemoteConfigManager.GetValueAsBoolean("Key")}"); | |
Debug.Log($"Value: {HMSRemoteConfigManager.GetValueAsByteArray("Key")}"); | |
Debug.Log($"Value: {HMSRemoteConfigManager.GetValueAsDouble("Key")}"); | |
Debug.Log($"Value: {HMSRemoteConfigManager.GetValueAsLong("Key")}"); | |
Debug.Log($"Value: {HMSRemoteConfigManager.GetValueAsString("Key")}"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Fetch() | |
{ | |
ITask<ConfigValues> x = agc.Fetch(); | |
x.AddOnSuccessListener((configValues) => | |
{ | |
OnFecthSuccess?.Invoke(configValues); | |
}); | |
x.AddOnFailureListener((exception) => | |
{ | |
OnFecthFailure?.Invoke(exception); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HuaweiMobileServices.RemoteConfig; | |
using HuaweiMobileServices.Utils; | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class RemoteConfigDemo : MonoBehaviour | |
{ |
NewerOlder