Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using Unity as a library in native iOS/Android apps

Discussion in '2019.3 Beta' started by PavelLU, May 27, 2019.

  1. Emesent

    Emesent

    Joined:
    Nov 20, 2020
    Posts:
    3
    Is Unity as a library able to render in just a part of the screen yet? Or is it still full screen?
     
    zivmahluf likes this.
  2. Emesent

    Emesent

    Joined:
    Nov 20, 2020
    Posts:
    3
    Can It render android ui elements over the top of the unity full screen?
     
  3. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    374
    Yes, thats possible
     
    Emesent likes this.
  4. WayneVenter

    WayneVenter

    Joined:
    May 8, 2019
    Posts:
    56
    I've been scanning the forum and can't find any reference to a use case where I want Unity to feed back data to the main application. We have an external device controlled by the main Android application and want to read data from the Unity "library" instance to update the external device. In short, we want to broadcast/callback/send data from the Unity library back to the Android app without closing or exiting the Unity library, is this possible?
     
    ROBYER1 likes this.
  5. Emesent

    Emesent

    Joined:
    Nov 20, 2020
    Posts:
    3
    Yes. If I remember correctly you can send message back and forth.
     
  6. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Is there any guide on how to use this with Flutter? I am aware of the Flutter for Unity plugin already on github which has over 113 issues and we can't get it working. It would be very nice to be able to use this with Unity as a library
     
  7. WayneVenter

    WayneVenter

    Joined:
    May 8, 2019
    Posts:
    56
    I have UnitySendMessage working fine form sending data from a Java class/function to Unity C# script, the problem is performance, I need to move a byte[] from Java to Unity, is there a way to pass a pointer to the memory address in Java to C# and update the array or texture2D in Unity?
     
  8. paavann

    paavann

    Joined:
    Nov 21, 2018
    Posts:
    35
    This is for Android only. right?
    What is the solution for iOS?
     
  9. fangye

    fangye

    Joined:
    Mar 18, 2017
    Posts:
    5
    If I want the Unity exported Library to be a floating window for the Android project, not an in-app floating window, but a global floating window, i.e. switching to another APP and Unity floating window still works, can I do that? I'm currently trying it out, but it can only be used as an in-app suspension window at best, and when you cut to the desktop Unity won't run and the screen will freeze.
     
  10. hafizsaadcb

    hafizsaadcb

    Joined:
    Jan 15, 2024
    Posts:
    3

    The launcher module

    Is it possible to incorporate a new activity as the main entry point for my app within this module? Subsequently, upon a specific action, preferably a button click, navigate to the main activity of the unityLibrary module.
    I've integrated an Android library into my Unity project as a .aar file. After exporting my Unity project as an Android project, I now aim to introduce a new activity within the Android-exported Unity app. This new activity should open the Unity activity/interface upon some action.
    @PavelLU
     
  11. farahzehranaqvi

    farahzehranaqvi

    Joined:
    Dec 22, 2020
    Posts:
    2
    Can I use Unity as a Library in my VR application? I want to do something like this: load a scene and in this scene download another scene in the form of Unity library and then launch that scene in VR for any headset like Oculus Quest. Appreciate if anyone could help clarify that