Search Unity

VSTU for Mac & Symlinked Script Files

Discussion in 'External Tools' started by mleesago, Jan 4, 2019.

  1. mleesago


    Jan 18, 2017
    When using Visual Studio Mac as code editor for Unity and opening scripts that have been symlinked to be exposed to Unity project, intellisense does not recognize the script file to be part of the solution. So initially opening the symlinked script (by double clicking on the script file inside Unity Editor) using Visual Studio, you will see that intellisense does not work but if you search for the same file inside Visual Studio code editor and open that, which pretty much uses the same window as the file you initially opened, you will notice that now intellisense recognizes the script file as being part of the solution and everything works fine. Suspecting that it might have to do with how VSTU for Mac and its bridge code is being used to open scripts that have been symlinked.

    Attached an example project that illustrates this problem. If you open the project (on MacOS) and click "Link/Link Master" then it will expose "Code/master" folder to Unity via symlink, and target path being "Assets/Code". Then if you open "Master.cs" script file with Visual Studio, you will see that you can't use intellisense to navigate to the parent class that it inherited from. But if you search for the same script file, either from search bar located top right corner or using solution navigator to find the file, and then opening it will let intellisense pick up the script file and it works like normal again.

    Our team is aware that using symlink is generally not good but we need this for our project. So it would be good if intellisense can work for any symlinked script files without having to open them again inside Visual Studio code editor.

    Attached Files:

    Last edited: Jan 22, 2019