Log output method of third-party application based on unity and terminal
By dynamically injecting a log catcher into the Unity project using a log receiving server and the application launcher, the problem of obtaining logs from third-party applications is solved, enabling rapid debugging without modifying the source code.
Patent Information
- Application Number
- CN202410408049.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-04-07
AI Technical Summary
Existing technologies cannot obtain the output logs of third-party applications in Unity projects, making debugging difficult.
The system finds an available port number by receiving logs from the server, starts the local server, and transmits the logs to the program launcher. The program launcher dynamically injects the log catcher into the third-party application. The log catcher parses the port number and sends the log information to the local server for output.
This feature enables the capture of output logs from any third-party application within a Unity project without modifying its source code, facilitating rapid debugging.
Smart Images

Figure CN118331863B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of program development, and particularly relates to a log output method of a third-party application based on Unity and a terminal. BACKGROUND
[0002] Unity is a commonly used 3D rendering engine in the industry, and its application fields can include games, education, industrial design, etc. Since the Unity ecosystem is very powerful, in the actual application process, it is necessary to embed a third-party application in the Unity project. In the process of reusing it, the third-party application needs to be debugged, and the log of the third-party application needs to be tracked in order to quickly locate and troubleshoot problems.
[0003] However, the existing Unity cannot obtain the output log of the third-party application, because the third-party application in the engineering docking is a packaged application of Unity, and the packaged application is binary without source code, which cannot be modified by default. SUMMARY
[0004] The technical problem to be solved by the present application is to provide a log output method of a third-party application based on Unity and a terminal, which can capture the output log of any third-party application in the current Unity project and realize rapid debugging of the program.
[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is:
[0006] A log output method of a third-party application based on Unity, comprising:
[0007] A log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher;
[0008] The program launcher dynamically injects a log capturer into the third-party application after starting the third-party application according to the idle port number;
[0009] The log capturer analyzes the start-up parameters of the third-party application to obtain the idle port number, and sends the captured log information output by the current Unity to the local server for output according to the idle port number.
[0010] In order to solve the above technical problems, another technical scheme adopted by the present application is:
[0011] A log output terminal of a third-party application based on Unity, comprising a memory, a processor and a computer program stored on the memory and running on the processor, and the processor implements the following steps when executing the computer program:
[0012] The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher;
[0013] The program launcher dynamically injects a log catcher into the third-party application after starting the third-party application according to the idle port number;
[0014] The log catcher parses the start parameters of the third-party application to obtain the idle port number, and sends the captured log information output by the current Unity to the local server for output according to the idle port number.
[0015] The log receiving server finds an idle port number, starts a third-party application based on the idle port number, and the log catcher parses the third-party application to obtain the idle port number, so that the log catcher can return the log information output by the current Unity to the log receiving server for output after collecting the log information. The log catcher can capture the output log of any third-party application in the current Unity project without modifying the source code of the third-party application, and realizes rapid debugging of the program. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 A step flowchart of a log output method of a third-party application based on Unity is provided for the embodiment of the application;
[0017] Figure 2 An initialization stage schematic diagram of a log output method of a third-party application based on Unity is provided for the embodiment of the application;
[0018] Figure 3 A log output stage schematic diagram of a log output method of a third-party application based on Unity is provided for the embodiment of the application;
[0019] Figure 4 A structure schematic diagram of a log output terminal of a third-party application based on Unity is provided for the embodiment of the application;
[0020] LABEL EXPLANATION:
[0021] 300. A log output terminal for a Unity-based third-party application; 301. Memory; 302. Processor. Detailed Implementation
[0022] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0023] Please refer to Figure 1 This invention provides a method for logging third-party applications based on Unity, including:
[0024] The log receiving server finds the available port number in the current Unity instance, starts the local server based on the available port number, and transmits the available port number to the program launcher.
[0025] After the program launcher starts the third-party application based on the free port number, it dynamically injects the log capturer into the third-party application.
[0026] The log capturer parses the startup parameters of the third-party application to obtain the idle port number, and sends the captured log information currently output by Unity to the local server for output based on the idle port number.
[0027] As described above, the beneficial effects of this invention are as follows: By finding an available port number through a log receiving server, launching a third-party application using that port number, and then obtaining the available port number through a log capture device after parsing the third-party application, the log capture device can return the log information to the log receiving server for output via the available port number after collecting the log information output by Unity. This invention, through its log capture device, can capture the output logs of any third-party application within the current Unity project without modifying the third-party application's source code, enabling rapid program debugging.
[0028] Further, the log receiving server searches for an available port number in the current Unity environment, starts a local server based on the available port number, and transmits the available port number to the program launcher, including:
[0029] The log receiving server searches for the currently available port number in Unity and stores it in the predefined first port attribute;
[0030] The log receiving server generates a server address based on the first port attribute and starts a local server based on the server address;
[0031] The log receiving server transmits the first port attribute to the program launcher.
[0032] As described above, a local server is started by the log receiving server. This local server listens for messages on a specified port address to obtain log information sent by the log catcher. The received log information is then sent to the Unity controller for output. In other words, the log receiving server associates with both the third-party application and the log catcher using found free port numbers, thereby enabling the transmission of log information.
[0033] Furthermore, after the program launcher starts the third-party application based on the idle port number, dynamically injecting the log catcher into the third-party application includes:
[0034] The program launcher defines the first port attribute storing the free port number as the launch parameter of the third-party application.
[0035] After the program launcher starts the third-party application according to the startup parameters, it dynamically injects the log catcher into the third-party application through a DLL tool.
[0036] As described above, since third-party applications "packaged" by Unity are binary and lack source code, their functionality cannot be modified by default. However, this invention, through dynamic DLL replacement technology, allows DLLs (code) to be injected into the third-party application packaged by Unity during runtime, enabling the addition of functionality without modifying the application's source code to achieve log capture.
[0037] Furthermore, the log capturer parses the startup parameters of the third-party application to obtain the idle port number, and sends the captured log information currently output by Unity to the local server for output based on the idle port number, including:
[0038] The log capture parses the startup parameters of the third-party application to obtain the free port number, and stores the free port number in a predefined second port attribute;
[0039] The log capturer concatenates the server address according to the second port attribute and calls Unity's native log acquisition interface to capture the log information currently output by Unity;
[0040] The log capturer sends the log information to the local server based on the server address for outputting the log information.
[0041] As described above, Unity's native log acquisition interface can obtain all logs output using system APIs. Since a third-party application is running in the current system, the log information captured includes logs issued by the third-party application, thus enabling the collection and output of logs from the third-party application.
[0042] Furthermore, it also includes:
[0043] The log receiving server listens to the server address to see if it receives log information.
[0044] If so, the log receiving server parses the log information to obtain the log content, call stack, and log type, and sends the log content and call stack to the current Unity native log output function according to the log type.
[0045] As described above, when the log receiving server detects log information sent from the log catcher at the server address, it parses the log information to obtain multiple log parameters, and then sends these parameters to Unity's native log output function for output. This method allows the log information to be displayed in the current Unity console, facilitating subsequent debugging of third-party applications based on the log information.
[0046] Please refer to Figure 4 Another embodiment of the present invention provides a log output terminal for a Unity-based third-party application, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it performs the following steps:
[0047] The log receiving server finds the available port number in the current Unity instance, starts the local server based on the available port number, and transmits the available port number to the program launcher.
[0048] After the program launcher starts the third-party application based on the free port number, it dynamically injects the log capturer into the third-party application.
[0049] The log capturer parses the startup parameters of the third-party application to obtain the idle port number, and sends the captured log information currently output by Unity to the local server for output based on the idle port number.
[0050] As described above, the beneficial effects of this invention are as follows: By finding an available port number through a log receiving server, launching a third-party application using that port number, and then obtaining the available port number through a log capture device after parsing the third-party application, the log capture device can return the log information to the log receiving server for output via the available port number after collecting the log information output by Unity. This invention, through its log capture device, can capture the output logs of any third-party application within the current Unity project without modifying the third-party application's source code, enabling rapid program debugging.
[0051] Further, the log receiving server searches for an available port number in the current Unity environment, starts a local server based on the available port number, and transmits the available port number to the program launcher, including:
[0052] The log receiving server searches for the currently available port number in Unity and stores it in the predefined first port attribute;
[0053] The log receiving server generates a server address based on the first port attribute and starts a local server based on the server address;
[0054] The log receiving server transmits the first port attribute to the program launcher.
[0055] As described above, a local server is started by the log receiving server. This local server listens for messages on a specified port address to obtain log information sent by the log catcher. The received log information is then sent to the Unity controller for output. In other words, the log receiving server associates with both the third-party application and the log catcher using found free port numbers, thereby enabling the transmission of log information.
[0056] Furthermore, after the program launcher starts the third-party application based on the idle port number, dynamically injecting the log catcher into the third-party application includes:
[0057] The program launcher defines the first port attribute storing the free port number as the launch parameter of the third-party application.
[0058] After the program launcher starts the third-party application according to the startup parameters, it dynamically injects the log catcher into the third-party application through a DLL tool.
[0059] As described above, since third-party applications "packaged" by Unity are binary and lack source code, their functionality cannot be modified by default. However, this invention, through dynamic DLL replacement technology, allows DLLs (code) to be injected into the third-party application packaged by Unity during runtime, enabling the addition of functionality without modifying the application's source code to achieve log capture.
[0060] Furthermore, the log capturer parses the startup parameters of the third-party application to obtain the idle port number, and sends the captured log information currently output by Unity to the local server for output based on the idle port number, including:
[0061] The log capture parses the startup parameters of the third-party application to obtain the free port number, and stores the free port number in a predefined second port attribute;
[0062] The log capturer concatenates the server address according to the second port attribute and calls Unity's native log acquisition interface to capture the log information currently output by Unity;
[0063] The log capturer sends the log information to the local server based on the server address for outputting the log information.
[0064] As described above, Unity's native log acquisition interface can obtain all logs output using system APIs. Since a third-party application is running in the current system, the log information captured includes logs issued by the third-party application, thus enabling the collection and output of logs from the third-party application.
[0065] Furthermore, it also includes:
[0066] The log receiving server listens to the server address to see if it receives log information.
[0067] If so, the log receiving server parses the log information to obtain the log content, call stack, and log type, and sends the log content and call stack to the current Unity native log output function according to the log type.
[0068] As described above, when the log receiving server detects log information sent from the log catcher at the server address, it parses the log information to obtain multiple log parameters, and then sends these parameters to Unity's native log output function for output. This method allows the log information to be displayed in the current Unity console, facilitating subsequent debugging of third-party applications based on the log information.
[0069] This invention provides a method and terminal for logging third-party applications based on Unity. It can be applied to all Unity development environments and outputs log information for debugging when integrating third-party applications packaged by Unity. The following specific embodiments illustrate this method:
[0070] Please refer to Figures 1 to 3 Embodiment 1 of the present invention is as follows:
[0071] A method for logging in a Unity-based third-party application, comprising:
[0072] S1. The log receiving server finds the available port number in the current Unity environment, starts the local server based on the available port number, and transmits the available port number to the program launcher.
[0073] It should be noted that the log receiving server's script format is C#, and the log receiving server script inherits from Unity3D's MonoBehaviour. In Unity, MonoBehaviour is the base class for all scripts, providing a series of lifecycle functions (such as Start, Update, etc.) and some special functions (such as coroutines). The core function of the log receiving server is to start a local server and send the messages received by the server to the Unity controller for output.
[0074] Specifically, step S1 includes:
[0075] S11. The log receiving server searches for the currently available port number in Unity and stores it in the predefined first port attribute.
[0076] S12. The log receiving server generates a server address based on the first port attribute and starts a local server based on the server address.
[0077] S13. The log receiving server transmits the first port attribute to the program launcher.
[0078] In some embodiments, the method further includes the following steps prior to step S11:
[0079] S10. The log receiving server calls the Unity native interface and sets the current log receiving server to never be destroyed.
[0080] In some embodiments, after step S13, the method further includes:
[0081] S14. The log receiving server starts a listening thread, which is used to execute the following step S4. Since log output usually has a low priority during the application's lifecycle, creating a listening thread to execute S4 ensures that the main thread can better respond to the current user's needs.
[0082] In some embodiments, the program launcher is started before step S1, and the method further includes:
[0083] S0. The program launcher instantiates a GameObject instance and mounts the GameObject instance to the main scene; then it instantiates the log receiving server and mounts the log receiving server to the GameObject instance.
[0084] It should be noted that in Unity, GameObject is the foundation of all entities in the scene, and various components (such as scripts, renderers, colliders, etc.) can be attached to control its behavior and properties.
[0085] S2. After the program launcher starts the third-party application according to the free port number, it dynamically injects the log capturer into the third-party application.
[0086] Specifically, step S2 includes:
[0087] S21. The program launcher defines the first port attribute storing the free port number as the startup parameter of the third-party application.
[0088] It should be noted that the script format of the program launcher is C#. The program launcher is the functional entry point of this invention. Its core function is to launch the third-party application and obtain and output all logs of the third-party application in the current project.
[0089] In some embodiments, the program launcher starts a subprocess, defines the first port attribute storing the free port number as the startup parameter of the third-party application, and then starts the third-party application in the subprocess.
[0090] S22. After the program launcher starts the third-party application according to the startup parameters, it dynamically injects the log catcher into the third-party application through a DLL tool.
[0091] In some embodiments, after the program launcher starts the third-party application according to the startup parameters, it starts a coroutine for performing the step of dynamically injecting the log catcher into the third-party application via a DLL tool.
[0092] It should be noted that the log capturer's script format is C#, and the log receiving server script inherits from Unity3D's MonoBehaviour. The core function of the log capturer is to capture all system logs in the current Unity application and send all system logs to the log receiving server.
[0093] In some embodiments, the DLL tool is SharpMonoInjector. The DLL tool can convert the C# script of the log catcher into a corresponding DLL format script, and then dynamically inject it into a running third-party application as a DLL format script without modifying the code of the third-party application.
[0094] S3. The log capturer parses the startup parameters of the third-party application to obtain the idle port number, and sends the captured log information currently output by Unity to the local server for output based on the idle port number.
[0095] Specifically, step S3 includes:
[0096] S31. The log capture parses the startup parameters of the third-party application to obtain the idle port number, and stores the idle port number in a predefined second port attribute.
[0097] S32. The log capturer concatenates the server address according to the second port attribute and calls Unity's native log acquisition interface to capture the log information currently output by Unity.
[0098] S33. The log capturer sends the log information to the local server according to the server address to output the log information.
[0099] In some embodiments, prior to step S31, the method further includes:
[0100] S30. The log catcher instantiates a GameObject instance and attaches the GameObject instance to the main scene; then it instantiates itself and attaches it to the GameObject instance; and calls the Unity native interface to set the instantiated object to never be destroyed.
[0101] The method also includes:
[0102] S4. The log receiving server listens to the server address to see if log information is received;
[0103] S5. If so, the log receiving server parses the log information to obtain the log content, call stack, and log type, and sends the log content and call stack to the current Unity native log output function according to the log type.
[0104] In some embodiments, steps S0 to S2 are the initialization phase, and steps S3 to S5 are the log output phase.
[0105] Please refer to Figures 1 to 3 Embodiment two of the present invention is as follows:
[0106] A specific application of a logging method for a third-party application based on Unity.
[0107] In the program launcher, create a new C# script and name it LabPlayer; implement a public static function Run in LabPlayer, and implement the following steps a to d in the Run function:
[0108] Step a: Instantiate a GameObject instance and mount the GameObject instance to the main scene.
[0109] Step b: Instantiate the log receiving server and attach it to this GameObject instance.
[0110] Step c: Start a child process to execute the third-party application, and define the port attribute (first port attribute) of the log receiving server as the startup parameter of the third-party application.
[0111] Step d: Start a coroutine and run the StartInject function within it. The StartInject function specifically implements steps e to f:
[0112] Step e: Use the DLL tool to dynamically inject the log catcher component into the subprocess running the third-party application.
[0113] Step f: Call the ServerStart function in the log capturer.
[0114] In the log receiving server, create a new C# script named PlayerDebuggerListener; define a property port (first port property) in PlayerDebuggerListener to store the queried free port number, and implement the MonoBehaviour's Awake function. The Awake function is implemented in steps g to j:
[0115] Step g: Call the Unity native interface and set the current log receiving server to never be destroyed.
[0116] Step h: Find the currently available port number in Unity and store it in the first port attribute.
[0117] Step i: Generate a server address of http: / / 127.0.0.1:{port} / and start a local server based on the server address.
[0118] Step j: Start a listening thread. The listening thread is used to execute the HandleIncomingConnections function of the current instance. The HandleIncomingConnections function specifically implements the following steps k to n:
[0119] Step k: Listen to the server address http: / / 127.0.0.1:{port} / to see if a message is received. If a message is received, execute the following steps; otherwise, continue listening.
[0120] Step 1: Parse the received log information to obtain the log content, call stack, and log type (normal, warning, and exception).
[0121] Step m: Based on the log type (normal, warning, and exception), send the log information to Unity's native log output function.
[0122] Step n: After sleeping for 10 milliseconds, return to step k.
[0123] In the log capture, create a new C# script and name it PlayerDebugger; in PlayerDebugger, define a property port (second port property) to store the free port number of the log receiving server, and implement the public static function ServerStart, the private dynamic function Init, and the private dynamic function HandleLog.
[0124] The public static function ServerStart implements steps o to s:
[0125] Step 0: Instantiate a GameObject instance and mount the GameObject instance to the main scene.
[0126] Step p: Instantiate itself and attach it to the GameObject instance.
[0127] Step r: Call the Unity native interface to set the instantiated object to never be destroyed.
[0128] Step s: Call the Init function of the instantiated object itself.
[0129] The private dynamic function Init implements steps t to u:
[0130] Step t: Parse the startup parameters of the current third-party application to obtain the free port number of the log receiving server and store it in the second port attribute.
[0131] Step 1: Call the Unity native API: Application.logMessageReceived to capture all log information output by Unity and set the HandleLog function as the message capture function.
[0132] The private dynamic function HandleLog receives three parameters: the log content, the call stack that issued the log, and the log type (normal, warning, or exception), and implements steps w through x:
[0133] Step w: Construct the server address http: / / 127.0.0.1:{port} / based on the second port attribute.
[0134] Step x: Send the three received parameters as a POST message body to the log receiving server at http: / / 127.0.0.1:{port} / .
[0135] Please refer to Figure 4 Embodiment 3 of the present invention is as follows:
[0136] A log output terminal 300 for a Unity-based third-party application includes a memory 301, a processor 302, and a computer program stored in the memory 301 and running on the processor 302. When the processor 302 executes the computer program, it implements a log output method for a Unity-based third-party application as described in Embodiments 1 and 2.
[0137] In summary, the log output method and terminal for third-party applications based on Unity provided by this invention finds an available port number through a log receiving server, generates a server address based on the available port number, and starts a local server to listen for messages sent by the log catcher. Simultaneously, the program launcher starts the third-party application using the available port number, allowing the log catcher to parse the third-party application and obtain the available port number. After collecting the log information output by Unity, the log catcher returns the log information to the log receiving server for output using the server address obtained by concatenating the available port number. This invention, through the log catcher and log receiving server, can capture and output the log information of any third-party application within the current Unity project without modifying the third-party application's source code, enabling rapid program debugging.
[0138] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for logging output of a Unity-based third-party application, the method comprising: The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher.
2. The method of claim 1, wherein, The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher.
3. A log output terminal for a Unity-based third-party application, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity, starts a local server according to the idle port number, and transmits the idle port number to a program launcher. The log receiving server finds an idle port number in the current Unity The log capturing device is dynamically injected into the third-party application after the program launcher starts the third-party application according to the idle port number; The log capturing device parses the start parameter of the third-party application to obtain the idle port number, and sends the captured log information output by the current Unity to the local server for output according to the idle port number; The log receiving server finds the idle port number in the current Unity, starts the local server according to the idle port number, and transmits the idle port number to the program launcher, comprising: The log receiving server finds the idle port number in the current Unity and stores it in a predefined first port attribute; The log receiving server generates a server address according to the first port attribute, and starts the local server according to the server address; The log receiving server transmits the first port attribute to the program launcher; The log capturing device is dynamically injected into the third-party application after the program launcher starts the third-party application according to the idle port number; The program launcher defines the first port attribute storing the idle port number as the start parameter of the third-party application; The program launcher dynamically injects the log capturing device into the third-party application through the DLL tool after starting the third-party application according to the start parameter; The log capturing device parses the start parameter of the third-party application to obtain the idle port number, and sends the captured log information output by the current Unity to the local server for output according to the idle port number, comprising: The log capturing device parses the start parameter of the third-party application to obtain the idle port number, and stores the idle port number in a predefined second port attribute; The log capturing device splices the server address according to the second port attribute, and calls the native log acquisition interface of Unity to capture the log information output by the current Unity; The log capturing device sends the log information to the local server for output of the log information according to the server address.
4. The log output terminal for a Unity-based third-party application of claim 3, wherein, Further comprising: The log receiving server listens whether the server address receives log information; If yes, the log receiving server parses the log information to obtain log content, call stack and log type, and sends the log content and the call stack to the native log output function of the current Unity according to the log type.
Citation Information
Patent Citations
Monitoring method and system
CN106713389A
System process log printing and remote multi-terminal log debugging control system
CN108132873A