Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Latest commit

History

History
History
45 lines (35 loc) 路 1.05 KB

File metadata and controls

45 lines (35 loc) 路 1.05 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

Code style guidelines

Guidelines are guidelines, not rules. But we have some rules here too, and they really should be followed.

Rules

Rule 1:

The using UnityEditor statement MUST be wrapper in a #if UNITY_EDITOR region.

#if UNITY_EDITOR
using UnityEditor;
#endif 

Guidelines

Guideline 1:

Explicit types are preferred. This helps remove guessing work, instead of doing this

var fillColorArray= new Color(2, 123, 93);
var chukSize = 48;
var isLifeMeaningfull = false;
var chunks= new List<int>();

please do **this **

int chukSize = 48;
bool isLifeMeaningfull = false;
Color fillColorArray = new Color(2, 123, 93);
List<int> chunks = new List<int>();

Guideline 2:

Some people think round brackets (US: parentheses) are redundant and unnecessary. I think, especially when looking at others code, it helps shown what the arithmetic expression is doing. So instead of this;

int foo = 10 + 3 / 39 + 19 + 23 + 10 * 2;

please do this

int foo = (((((10 + 3) / 39) + 19) + 23) + 10) * 2;
Morty Proxy This is a proxified and sanitized view of the page, visit original site.