Using Rider for Unreal Engine Development

Jul 12, 2024

Using Rider for Unreal Engine Development

General Info

  • You can follow the tutorial with any ADE, though Rider has great Unreal integration.
  • Preference for Rider due to the enhanced workflow
  • Visual Studio is also recommended as a versatile IDE

Initial Setup in Rider

  • Speeding Up Workflow:
    • Create C++ templates for Unreal classes
    • Use a batch file for clean builds

Part 1: Optimizing Build and Templates

  • Settings Adjustments:
    • Enable new UI for a cleaner look: File > Settings > Appearance Behavior > New UI > Check Enable New UI
    • Show Menu in a separate toolbar
  • Include Path:
    • Add root folder to the public include path for cleaner include statements
  • Folder Structure:
    • Prefer not to separate public and private folders for simplicity
    • Keep header and implementation files together
  • Creating a New Class:
    • Modify templates to generate cleaner Unreal classes
    • Automatically include required headers using Rider
  • Useful Rider Tips:
    • Double-press Shift to search for multiple items
    • Ctrl + Click to navigate to type definitions
    • Alt + O to toggle between header and implementation files
    • Alt + Enter to generate function definitions and apply coding styles
    • Shift + B to build the solution

Part 2: Debugging Approaches

  • Using Rider Debug Tools:
    • BluePrint Debugger:
      • Add breakpoints and inspect variables
    • Debugging C++ Code:
      • Attach Rider to the Unreal Engine process
      • Utilize typical debug controls (e.g., step over, step into)
      • Manage breakpoints from the breakpoint menu
  • Logging Functions:
    • Use logging for non-intrusive debugging
    • Functions for console and viewport logs
    • Live templates for auto-generating logs in Rider
  • Macros for Enhanced Debugging:
    • Create macros for debug messages and geometry drawing in a custom header file (fabmacros.h)
    • Example of print macro: #define PRINT(fmt, ...) if(GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Blue, FString::Printf(TEXT(fmt), ##__VA_ARGS__))
    • Example of drawing debug spheres and lines using macros

Final Remarks

  • Use provided GitHub link for resources
  • Encouragement to start using Rider and provided tools for game development
  • Thanks for watching the tutorial