Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity web player + Django example

Discussion in 'Scripting' started by htetah, Jun 13, 2015.

  1. htetah

    htetah

    Joined:
    Jun 9, 2015
    Posts:
    1
    Hello.
    Could somebody please post a very basic working example of connecting web player app (using unity`s WWW/WWWForm classes) with a django backend, specifically how the unity WWW post url should look like for localhost(do i need to specify web player default port in url), how do i capture unity WWWForm data in django`s request.POST, how to properly setup urlpatterns (especially slashes), etc.
    I tried following unity documentation on WWW/WWWForm, the examples there are clear, but i fail to port them to my server setup (apache+mod_wsgi+django+mysql, which works ok, except for the unity content).
    There is an example on github, however it`s a bit of an overkill and i`m rather new to both django and unity.

    I managed to get the unity app served, get its output with Application.ExternalCall() and then parsing ang posting it with javascript to django with hidden form. It sort of works, but it`s clearly a wrong design.
    Thanks for any help.
     
  2. niko8666

    niko8666

    Joined:
    Mar 10, 2013
    Posts:
    1