Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Linking Unity libraries to QT 4.8.4
Qt 6.11 is out! See what's new in the release blog

Linking Unity libraries to QT 4.8.4

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MM51
    wrote on last edited by
    #1

    Hello,

    First of all, I begin using QT development tools.
    I'm currently working on a QT Project that will be a client for a game i'll develop with Unity 3d. This QT Client will connect to the Unity App thanks to Unity functions. I'm not sure it can be done, it's just a test.
    I started importing the two main DLLs "UnityEngine" and "UnityEditor".

    @
    #include <QApplication>
    #include <QLibrary>
    #include <QtDebug>

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    QLibrary engine("UnityEngine");
    QLibrary editor("UnityEditor");

    qDebug()<<engine.load(); //true
    qDebug()<<editor.load(); //true

    void *test = engine.resolve("Network::Connect"); // test = 0x00
    qDebug()<<test;

    return app.exec();
    }
    @

    The output for the two qDebug is true: my DLLs are correctly loaded.
    Then i want to resolve the Connect function from the Network class of UnityEngine.dll but it doesn't work. I got the 0x0 output.

    So what's wrong with my code? And do i need to get header files of the DLLs to make it work ?

    Thanks in advance.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      immersive_dev
      wrote on last edited by
      #2

      Were you ever able to get this running?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved