Linking Unity libraries to QT 4.8.4



  • 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.



  • Were you ever able to get this running?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.