예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        Instance = this;
        client   = FindObjectOfType <Client>();

        sendA.onClick.AddListener(ShareTextA);
        sendB.onClick.AddListener(ShareTextB);
    }
예제 #2
0
    void Awake()
    {
        Instance = this;

        SendBirdClient.SetupUnityDispatcher(gameObject);             // Set SendBird gameobject to DontDestroyOnLoad.
        StartCoroutine(SendBirdClient.StartUnityDispatcher);         // Start a Unity dispatcher.

        SendBirdClient.Init("5311CDB0-4A1F-4DB2-8939-A26EC98290B5"); // SendBird Sample Application ID
        SendBirdClient.Log += (message) =>
        {
            Debug.Log(message);
        };
    }