Control which source file and line number a log entry redirects to in editor

Hi,

I am working on integrating a static code analyzer solution that runs in editor. I already have the diagnose info with file and line number and I would like when it is displayed in console to take me to that particular line of code.

Already tried to mimic the syntax of the existing compiler message but with no results: filename(line:column): message

I am aware of UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal which works but I couldn’t find a way to hook to the log entry click event.

Any help would be greatly appreciated,
Thank you.

Hey, I’ve been sort of struggling with this also for a while, but eventually wrote my own editor window and used OpenFileAtLineExternal as you mentioned.
Curious though how to get it in the console directly.
Hope it helps,
Cheers

Yes, that would be one of the options but still I’d rather have the default console for that.
Thank you