Code Style

Hi there,

With this thing going on and people happily opening pull requests I thought it might be good to have the community decide on a coding style. In my opinion it is very important to make sure everything looks the same so that when you’re reading someone else’s code, you still know where to look, and what everything means.

My suggestion would be to start with the official Microsoft Naming Guidelines or maybe the Google Style Guide for C#. This doesn’t cover everything though, like making things private by default, adding [SerializeField] when needing to edit it, adding a read-only property if it needs to be accessed outside of the defining class, or a writable property/public method to handle setting of the value.

Either way, I strongly suggest that this is discussed to create a clean project. It is a learning experience after all!

Cheers

3 Likes

@cirocontinisio would be great to get your input on this :slight_smile:

I vote for Googles C# Style but with tabs instead of 2 space. I also vote for [SerializeField] private for editor access when public is not necessary.

1 Like

Hey [mention|Z39308+odIoQMb/Q1rGpDg==] [mention|e3E4HCv5RlHk0GLo4qI1Hg==] I think the same thread is open here

There’s a poll going and a thread, take a look Vote for coding standards