Unity + Python GAE(Eclipse)
Unity3D 2015. 3. 17. 18:07반응형
<참고>
using UnityEngine; using System.Collections; using System; using System.Net; public class App : MonoBehaviour { // Use this for initialization void Start () { Uri uri = new Uri("http://localhost:8090/" + "/MainPage"); HttpWebRequest request = WebRequest.Create(uri) as HttpWebRequest; request.Method = "GET"; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Debug.Log(response.StatusCode); } // Update is called once per frame void Update () { } }파이썬파일 (helloworld.py)
import webapp2 print("hello world!") class MainPage(webapp2.RequestHandler): def get(self): #self.response.headers['Content-Type'] = 'text/plain' self.response.write("Main Page") application = webapp2.WSGIApplication([ ('/', MainPage), ], debug=True)
반응형
'Unity3D' 카테고리의 다른 글
unity android plugin (0) | 2015.06.17 |
---|---|
한방에 모아보는 Unity Shader 레퍼런스 Properties (0) | 2015.06.15 |
[ Unity ] NGUI 버튼 이벤트 동적 할당 (0) | 2015.03.11 |
NGUI 스크롤 아이템 그리드 (0) | 2015.03.11 |
Get an inactive gameobject? (0) | 2015.03.03 |