Version: 1.6
语言 : 中文
Windows
Windows Player settings

Integrating Tuanjie into Windows applications

You can use the Tuanjie Used as a Library feature to integrate the Tuanjie Runtime Library in Windows applications.

This feature enables you to include Tuanjie-powered features in your application, such as:

  • 3D/2D Real-Time Rendering
  • AR Experience
  • 3D model interaction
  • 2D mini-games

The Tuanjie Runtime Library exposes controls to manage when and how to load, activate, and unload content within the application.

On Windows, you can embed a Tuanjie build into your application in the following ways:

  • Launch Tuanjie as an external build from your application and specify a window in which Tuanjie will initialize and render with the -parentHWND command line argument. This is the easier option.

  • Embed Tuanjie within your existing operating system process. To do this, call into UnityPlayer.dll, which any Win32 application can load directly. The entry point signature is:

    extern "C" UNITY_API int UnityMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd);

Use lpCmdLine to pass any command line arguments to Tuanjie, for example, to control resolution, job threads or parent HWND. This enables you to run Tuanjie within your process. For other valid Tuanjie player command line arguments you can use, see Unity Standalone Player command line arguments.

Additional resources:

Windows
Windows Player settings