Search Unity

Loading Unity Content in UWP on HoloLens at Runtime

Discussion in 'VR' started by BenLighthouseReeves, Apr 19, 2017.

  1. BenLighthouseReeves

    BenLighthouseReeves

    Joined:
    Apr 11, 2017
    Posts:
    5
    [Cross posted from Scripting forum]

    I'm building a Unity UWP app which will host an unknown number of child applications. The host application would contact a server and load child applications at runtime. Users interact with the host and can discover new content there.

    Currently, I don't understand how to load self-contained external modules with scripted functionality. By comparison, in a Flex/Flash application, you might load an external SWF. In the browser, you could point to another .js file. I'm trying to understand how to do this with Unity/UWP.

    Here's the closest answer I've found so far:

    http://answers.unity3d.com/questions/442769/how-do-i-load-code-dynamically-from-outside-source.html

    I don't know how to create assemblies for this purpose nor how to communicate with them once they load. Is there a best practice for what I'm trying to do or documentation on how this can be done, that I may have missed?

    Note: Loading scripts from asset bundles is not supported on Windows Store Apps and Windows Phone.

    I appreciate any leads you might be able to share. Thanks in advance,
    Ben
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
  3. BenLighthouseReeves

    BenLighthouseReeves

    Joined:
    Apr 11, 2017
    Posts:
    5
    I think the purpose of shared experiences is for multiple HoloLens users to experience the same application content simultaneously, via network communications.

    What I am proposing is to load new content, from the network, that includes new scripted behaviors.

    Based on my current investigation, it seems that MoonSharp based solutions are popular. I would prefer to have a Unity native solution, meaning C# language able to directly access the unity APIs.

    Examples of MoonSharp based solutions:
    http://fungusdocs.snozbot.com/fungus_lua.html
    http://berserk-games.com/knowledgebase/scripting/
     
  4. Sarah_H

    Sarah_H

    Joined:
    Apr 29, 2016
    Posts:
    1
    Did you have any luck with this? I'm trying to accomplish something similar with dynamically loading scripts from a server at runtime on Hololens. I'm not sure if it's even possible though