ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 07/01 작업내용
    개발일지/팀GC 2021. 7. 1. 18:21

    연출회의

     

     

    유니티 웹뷰로 카카오 로그인 한 뒤, jwt토큰은 웹뷰에서 앱으로 전달

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    
    public class BestHttp : MonoBehaviour
    {
        UniWebView webView;
        public Text txtJWT;
        // Start is called before the first frame update
        void Start()
        {
            
        }
    
        // Update is called once per frame
        void Update()
        {
            
        }
    
        public void WebViewOpen()
        {
            webView = gameObject.AddComponent<UniWebView>();
            webView.Frame = new Rect(0, 0, Screen.width, Screen.height);
            
            // Load a URL.
            webView.Load("");//호스팅중인 로그인 서버 url
    
            // Show it.
            webView.Show();
    
            UniWebView.ClearCookies();
    
            webView.OnMessageReceived += (view, message) => {
                print("================================================>" + message.RawMessage);
                txtJWT.text = message.Args["access_token"];
                Destroy(view);
            };
        }
    }
    

    '개발일지 > 팀GC' 카테고리의 다른 글

    07/26 작업내용  (0) 2021.07.26
    07/15~16 작업  (0) 2021.07.16
    06/30 작업내용  (0) 2021.06.30
    06/29 작업 내용  (0) 2021.06.29
    06/14 유니티에서 node.js 서버를 통해 DB내용 출력하기  (0) 2021.06.14
Designed by Tistory.