Skip to content

Instantly share code, notes, and snippets.

@benjaminjackman
Last active August 11, 2024 13:24
Show Gist options
  • Select an option

  • Save benjaminjackman/9d2284dff3e5098a2df0 to your computer and use it in GitHub Desktop.

Select an option

Save benjaminjackman/9d2284dff3e5098a2df0 to your computer and use it in GitHub Desktop.

Revisions

  1. benjaminjackman revised this gist Mar 2, 2016. 2 changed files with 12 additions and 9 deletions.
    19 changes: 11 additions & 8 deletions README
    Original file line number Diff line number Diff line change
    @@ -1,27 +1,30 @@
    #Simple instructions for using Unity3d with project rider on Ubuntu

    #1. Download and install latest .deb for Unity3d from:
    # http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/
    http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/

    #2. Download and install the Project Rider EAP (not sure if publicly available but you can
    # sign up for early access here:
    # https://www.jetbrains.com/rider/
    #2. Download and install the Project Rider EAP (not sure if publicly available but you
    can sign up for early access here: https://www.jetbrains.com/rider/

    #3. Open Unity3dthe .deb installs the executable at /opt/Unity/Editor/Unity
    #3. Open the Unity3d (.deb installs the executable at /opt/Unity/Editor/Unity )

    #4. Create a Project in Unity

    #5. Start rider and open the .sln file for the project you made in Unity3d

    #6. Rider should have made a script on your system on the first start to start itself called `rider`
    #6. Rider should have made a script on your system on the first start to start itself called `rider`,
    it needs to be in your PATH for this to work

    #7. Save the rider-for-unity.sh script below. It will act as a bridge between Unity3d and rider that reformats the commandline arguments so that
    rider can understand them (you need to save it and make it executable)
    #7. Save the rider-for-unity.sh script below. It will act as a bridge between Unity3d and rider
    that reformats the commandline arguments so that rider can understand them
    (you need to save it and make it executable)

    #8. In Unity3d, under Edit > Preferences > External tools
    a. Select the rider-for-unity script as the External Script Editory
    b. Set

    "$(File)" $(Line)

    as the External Script Editor Args

    #Scripts should now open in unity
    2 changes: 1 addition & 1 deletion rider-for-unity.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    #Select this script and add
    #"$(FILE)" $(LINE)
    #as the argument in unity preferences
    #as the argument in unity preferences for the external script editor

    #For some reason everything get's passed as one big blob of an argument
    #so this will separate it into a FILEname and LINE number
  2. benjaminjackman renamed this gist Mar 2, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. benjaminjackman created this gist Mar 2, 2016.
    12 changes: 12 additions & 0 deletions rider-for-unity.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/bin/bash

    #Select this script and add
    #"$(FILE)" $(LINE)
    #as the argument in unity preferences

    #For some reason everything get's passed as one big blob of an argument
    #so this will separate it into a FILEname and LINE number
    FILE=$(echo $* | sed 's/"\(.*\)" .*/\1/')
    LINE=$(echo $* | sed 's/".*" \(.*\)/\1/')

    rider -l $LINE $FILE
    27 changes: 27 additions & 0 deletions txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    #Simple instructions for using Unity3d with project rider on Ubuntu

    #1. Download and install latest .deb for Unity3d from:
    # http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/

    #2. Download and install the Project Rider EAP (not sure if publicly available but you can
    # sign up for early access here:
    # https://www.jetbrains.com/rider/

    #3. Open Unity3dthe .deb installs the executable at /opt/Unity/Editor/Unity

    #4. Create a Project in Unity

    #5. Start rider and open the .sln file for the project you made in Unity3d

    #6. Rider should have made a script on your system on the first start to start itself called `rider`

    #7. Save the rider-for-unity.sh script below. It will act as a bridge between Unity3d and rider that reformats the commandline arguments so that
    rider can understand them (you need to save it and make it executable)

    #8. In Unity3d, under Edit > Preferences > External tools
    a. Select the rider-for-unity script as the External Script Editory
    b. Set
    "$(File)" $(Line)
    as the External Script Editor Args

    #Scripts should now open in unity