Log after Unity is packaged

You can use the Log Viewer plug-in to view the logs after packaging. After publishing, draw a circle with the left mouse button counterclockwise to call up the log window, which is very convenient.

But there is a problem. The output log cannot locate the specific number of lines of code. The number of lines of code displayed in the Editor mode will become garbled codes similar to hash values ​​after publishing. The bugs that appear are difficult to deal with.

Solution: plus Unity's own log system

1. Check the following options, and you can see the log on the screen. The log text file of the new version of unity is in C:\Users\admin\AppData\LocalLow\DefaultCompany\under your own project, and the old version of unity is being typed out Under the data folder of the package:

2. In the Stack Trace under Player Settings—>Other Settings, check Full.

None: Only display logs, not traces;

ScriptOnly: Display logs, and display script call relationship, do not display stack information;

Full: it displays the log, and displays the script call relationship and stack information;

PS: This option is to control the existence or non-existence of the log text file on the C drive

Close the Development Console window method:

Debug.developerConsoleVisible = false;

final effect

Guess you like

Origin blog.csdn.net/qq_17144655/article/details/126839376