Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Develop Javascript plugins

Discussion in 'Project Tiny' started by K1kk0z90_Unity, Dec 6, 2018.

  1. K1kk0z90_Unity

    K1kk0z90_Unity

    Joined:
    Jun 2, 2013
    Posts:
    83
    Hello,
    I'm very excited to see this initial preview of the Tiny Project! :)

    I'm trying to understand if Tiny is suited also to make HTML5 games for mobile browsers, in addition to playable ads and social app games. The main requirement for this would be to be able to write Javascript plugins to integrate external APIs, such as the leaderboards of a specific portal.
    Is it currently possible? If not, is it on the roadmap?

    Thank you in advance for your answer and keep up the good work! :)
     
  2. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    32
    As I understand, they are moving to C# and will eliminate TypeScript soon. So, you won't need JavaScript plugins, just write C# plugins as usual.

    From the blog:
     
  3. K1kk0z90_Unity

    K1kk0z90_Unity

    Joined:
    Jun 2, 2013
    Posts:
    83
    Thank you for your answer. Anyway I will still need to wrap Javascript code into a C# plugin. Will it be possible?
     
  4. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    32
    K1kk0z90_Unity likes this.
  5. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    54
    Hi K1kk0z90,

    We're moving to C# is as the primary programming language for Tiny, but once we're done you'll still be able to interop with the target platform language using PInvoke (e.g. JavaScript for Web targets).

    To answer your original question: yes, Tiny is suited to make HTML5 games for mobile browsers. If you need external JavaScript libraries, you can bundle them with your game using a post-process build hook: https://docs.unity3d.com/Packages/c...Unity.Tiny.TinyPostprocessBuildAttribute.html

    Thanks for your feedback, we'll work on our documentation and samples to explain this workflow in more details.
    -Etienne.
     
    Laicasaane and K1kk0z90_Unity like this.