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

Is it possible to use Unity jslib plugins with Project Tiny?

Discussion in 'Project Tiny' started by mxweas, Sep 19, 2020.

  1. mxweas

    mxweas

    Joined:
    Nov 4, 2015
    Posts:
    15
    Heyo,

    I've written a small webrtc wrapper as a Unity jslib plugin. The package has a few MonoBehaviours that are only used for example code.

    When I try to use it with Project Tiny, the wasm compiler gives me a ton of errors like:
    ConnectionExample.cs(6,32): error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)

    Is it possible to tell Unity to only include C# scripts that are used by my Project Tiny project? I could rip out all of the examples in order to make it compatible, but I think that would also ruin the ability for folks to easily integrate the plugin in non Project Tiny projects.

    Max
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    separate into different assembly definition files, Tiny only includes in the build assemblies referenced by the root assembly or one of the dependencies of the root assembly (root assembly is defined in the build configuration asset)