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.

How can I do networking with external APIs in Tiny?

Discussion in 'Project Tiny' started by james_kim, Mar 27, 2020.

  1. james_kim

    james_kim

    Joined:
    Oct 27, 2016
    Posts:
    1
    Hello,
    I am a beginner of Unity Tiny and I don't know much about C#.
    I've built a sample code.(WASM)
    And I'm trying to implement a small project based on that.
    The problem is that I have to bring data into Tiny through external networking.
    Is there a way to send and receive external data through Http Request, XmlHttpRequest, or Websocket within Tiny?
    I couldn't find it in the sample code.
    Can I use the networking api included in UnityEngine in Tiny Unity C# or should I implement such features myself?

    Please help me if you are kind enough to explain or share about it.(If possible, with the code)
     
  2. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
    I asked this in the DOTS forum and got a response saying that they're planning on developing a garbage free web request API for dots but there's not even a rough ETA for it and they recommended using either UnityWebRequests or HttpWebRequests which aren't allowed in tiny.

    My guess is we won't see this for another year so I would suggest either develop a hybrid project and ditch the tiny runtime or stick with the tiny runtime and ditch the networking.
     
    exoainteractive likes this.
  3. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    What is the status of this? Is there any way to do http web requests without going into javascript?
     
  4. leon-sunday

    leon-sunday

    Joined:
    May 19, 2020
    Posts:
    12
    Well The latest doc from them says that http is not supported
     
    NopTanakhon and GilCat like this.