Search Unity

Can a Debug.Log message open the file explorer automatically?

Discussion in 'General Discussion' started by awsapps, Sep 25, 2021.

  1. awsapps

    awsapps

    Joined:
    Jun 15, 2021
    Posts:
    74
    Is there a way to open a certain folder just by clicking to a file path in the console that have been logged with Debug.Log?

    For example in linux notation:

    Debug.Log("~/home/user/.config/unity3d/MyCompany/MyGame/Unity/123456asdf/Editor/Analytics/ArchivedEvents)
     
  2. NocturnalWisp

    NocturnalWisp

    Joined:
    Oct 2, 2019
    Posts:
    62
    I found this thread that could shed some light: c# - Is there a way to use hyperlink in Unity's console? - Stack Overflow

    Unfortunately it seems not. Even the comment that Dale posted at the bottom doesn't seem to work. I imagine that if you really wanted this, you would have to write a custom editor that you can log things to and supports links to folders.

    I don't imagine a custom editor like this would be to complicated, but it seems a little unnecessary. But that all depends on what you are trying to do.
     
    awsapps likes this.