Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Logs on Mac build #53

Open
paulogodinhoaq opened this issue Oct 11, 2020 · 3 comments
Open

No Logs on Mac build #53

paulogodinhoaq opened this issue Oct 11, 2020 · 3 comments

Comments

@paulogodinhoaq
Copy link

paulogodinhoaq commented Oct 11, 2020

Hi, I am using the latest snapshot (2020 January), and builds on Mac are not showing logs.

No log file is being passed as an argument when calling Unity
Starting: /Applications/Unity/Hub/Editor/2019.4.9f1/Unity.app/Contents/MacOS/Unity -batchmode -projectPath ./ -buildTarget Android -executeMethod Method.DeployBuild -quit -logFile

Here is the same build running on a windows machine:
Starting: "C:\Program Files\Unity\Hub\Editor\2019.4.9f1\Editor\Unity.exe" -batchmode -projectPath ./ -buildTarget Android -quit -batchmode -executeMethod Method.DeployBuild -quit -logFile C:\BuildAgent\temp\buildTmp\unityBuildLog-8436327390070719416.txt

I tried to build the plugin with the latest changes but the build directory after building with IntelliJ Idea is missing files and doesn't have the plugin file structure, there are probably more steps to take after the build is done.

If anyone could provide a built plugin with the latest changes to check if the problem persists, that would be amazing.

Cheers.

Edit:
Builds are following through without issue, it is just making it very hard to diagnose errors.

@twomedia
Copy link

We're experiencing this issue as well after updating from Unity 2018 -> 2019.

Seems like something changed in Unity 2019 that has broken this functionality.

@twomedia
Copy link

twomedia commented Nov 25, 2020

Actually, I just found the cause of this. Unity changed the default behaviour for the command line argument -logfile <pathname>.
In Unity 2018, the default behaviour when you don't specify the pathname argument is to print to the console. In Unity 2019, they changed this default behaviour to no longer log to console. IN order to log to console in Unity 2019, you must pass in - for the pathname argument:
-logfile -

You can reference this change in the Unity docs:
https://docs.unity3d.com/Manual/CommandLineArguments.html

Unity 2018 Docs:
"Specify where the Editor or Windows/Linux/OSX standalone log file are written. If the path is ommitted, OSX and Linux will write output to the console. Windows uses the path %LOCALAPPDATA%\Unity\Editor\Editor.log as a default."

Unity 2019 Docs:
"Specify where Unity writes the Editor or Windows/Linux/OSX standalone log file. To output to the console, specify - for the path name. On Windows, specify - option to make the output go to stdout, which is not the console by default."

@twomedia
Copy link

@paulogodinhoaq A workaround for now is to specify the pathname - as a build configuration parameter:
Screen Shot 2020-11-25 at 11 01 30 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants