Search Unity

Feedback Request - add "links" to Debug.Log

Discussion in 'Editor & General Support' started by joshcamas, Jul 15, 2019.

  1. joshcamas


    Jun 16, 2017

    I've implemented IronPython into Unity, and I've also implemented special error logging and such. It would be super amazing if I could also add support for opening python files + line by clicking an error. How I imagine it is adding a "link":

    Code (CSharp):
    1. Debug.Log("Hello, <link=0>click me!</link>",null,(id) => { Debug.Log("You clicked " + id + "!!");});
    Obviously this is just one way to do it out of a million ways - but essentially this example attaches a delegate to when the user pressed a link, and it passes in a index / id, allowing multiple "links" per log.

    I feel like this could be super powerful, since of course you can do *anything* with this - in my case I'd open my code editor, but you could attach any sort of logic at all
    Last edited: Jul 15, 2019
    DrummerB likes this.