S&box Wiki

Revision Difference

Setting_up_Rider#549493

<cat>Code.Intro</cat> <title>Setting up Rider</title> # Get Rider You got two options to choose from [Buy Rider](https://www.jetbrains.com/rider/buy/#personal?billing=monthly) or start an [30 Day Evaluation](https://www.jetbrains.com/rider/download/) You got two options to choose from: [buy Rider](https://www.jetbrains.com/rider/buy/#personal?billing=monthly) or start a [30-day evaluation](https://www.jetbrains.com/rider/download/) period. # Solution In this case, we'll create a Gamemode, see here for [detailed instructions](https://wiki.facepunch.com/sbox/Your_First_Project) To get the `.sln` file, you need to start the game, then your `s&box.sln` should be in the root directory. <note> You will have to do this every time you add an addon to your game before you are able to edit. </note> ## Opening the Solution <upload src="b3cb9/8db0558d4dbedc2.png" size="35667" name="image.png" /> ## Finding the Solution Go into the GameFiles of S&box and select `s&box.sln` <upload src="b3cb9/8db0559e3b326a9.png" size="54931" name="image.png" /> ## Structure The Gamemode is under `Games` The S&box API and UI is under `Core` The Tools is under `Tools` <upload src="b3cb9/8db055aac1caa87.png" size="16133" name="image.png" /> # Debugging ## Starting the Game Start your previously created `game` Inside the GameFiles run `sbox-dev.exe` Inside Steam it is called `Game Editor` <upload src="b3cb9/8db055c9cedcae1.png" size="11414" name="image.png" /> (1) If your `game` isn't selected yet, do so (2) Start it. ## Attaching to the Procces In Rider click `Run -> Attach to process...` or see here <upload src="b3cb9/8db055d0967036b.png" size="19895" name="image.png" /> ### Selecting the S&Box process 1 View the available list of all debuggers 2 Narrow it down to .NET 3 Filter by sbox only 4 Attach - Done! <upload src="b3cb9/8db055d78a35bad.png" size="34944" name="image.png" /> ### Start debugging! <upload src="a9bbd/8d95f3d737dfa75.png" size="56749" name="image.png" /> # Troubleshooting * If you are getting errors on everything, make sure you have the [.NET 7 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) installed. * If you are getting random errors from stuff that should be code generated, [ensure you have Roslyn Analyzers enabled](https://www.jetbrains.com/help/rider/Settings_Roslyn_Analyzers.html).