Dev Guide
WebsiteGitHubGitBook
  • 📝Dev Intro
    • Using GitHub
    • Using Unity
    • Licensing
    • File Naming & Organization
      • File Naming
      • File Organization
        • Object Type
  • 📡Networking
    • Introduction to Game Networking
    • FishNet Networking
      • Server
      • Client
      • Server RPC
      • ObserversRPC
      • Network Message
  • 🖊️Guidelines
    • The C# Style Guide
      • Nomenclature
        • Namespaces
        • Classes & Interfaces
        • Methods
        • Fields
        • Parameters
        • Delegates
        • Events
        • Misc
      • Declarations
        • One declaration per source file
        • General class structure
        • Access Level Modifiers
        • Spacing
        • Brace Style
        • Switch Statements
        • Language
        • Common Patterns and Structure
          • Applying attributes on all network related methods.
    • Code Design Definitions
      • Actor
      • System
      • View
      • Events
        • Event Bus
        • Action
      • System Locator
      • Tweening
    • Asset Criteria
      • External Criteria
        • Animations
        • Fonts
        • Models
        • Textures
        • Graphics
        • Audio
      • Importing Criteria
        • 3D Models
        • 3D Animations
        • Textures
        • Graphics
        • Audio
      • Internal Criteria
        • 3D Models
        • 3D Animations
        • Textures
        • Graphics
        • Audio
    • SS3D's coder good practices
    • Code design patterns
  • 📖Guides
    • Application Settings
    • Running the Project
      • Configure your firewall and antivirus
      • Building the game
      • Joining a server
      • Hosting a server
      • Setting up a dedicated server
    • Debugging SS3D
    • Maintainer Guide
      • Pull request review process
    • Testing SS3D
      • Assets audit tests
      • Edit mode tests
      • Play mode tests
        • Inventory test
        • Health tests
    • Working with animations
  • 🛣️Roadmap
    • Releases
Powered by GitBook
On this page
  • Inspiration
  • Automation

Was this helpful?

Edit on GitHub
Export as PDF
  1. Guidelines

The C# Style Guide

This style guide is based on this other C# style guide and expands upon it.

You can use whatever file editor you want, but Visual Studio is probably the most popular and recommended choice. It's free, has many features, and integrates well with Unity and Git.

If you're a student, we recommend getting a copy of JetBrain's Rider which adds a lot of code hints and shortcuts that will significantly improve your code quality.

Our overarching goals are clarity, readability and simplicity. Also, this guide is written to keep Unity in mind.

Inspiration

This style guide is based on C# and Unity conventions, and discussions within the development team.

Automation

We recently added an EditorConfig file to automate the code review process, it is a file you can add to Visual Studio or Rider and it will apply the formatting and style we use to your analyzers, telling you when something is out of order.

PreviousGuidelinesNextNomenclature

Last updated 2 years ago

Was this helpful?

🖊️