Search Feedback

4
votes

Remove Java style formatting from C# template and documentation and enforce well-readable code

Docs & Tutorials

-

-

When a new script is created in Unity, it has this java style formatting:

void Start () {

}

Also, all documentation sample code has this formatting.
This formatting may be convinient for coders with a Java background, but for beginners as well as full time coders it's ugly and error prone.
Reading such code is more difficult than well-formatted code where one braces takes one line.

It first I thought it was just me who was annoyed by it, but during my 5 years of development with Unity, I've talked to several other full time coders now, and they all prefer clean formatting, and they all changed the code template.

However, for beginners at Unity, it should be made as easy as possible, and good coding should be encouraged.

Along with this, even Unity devs and documentation people should follow the C# formatting rules.

Even in the documentation samples, private variables don't have a preceding underline. In my understanding as a full time coder, I think this is a must.

Else, such dirty formatting will bite one in the behind some time and make you spend more time later on.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(9110)

2D

(224)

Ads

(40)

AI & Navigation

(68)

Analytics

(96)

Animation

(309)

Asset Store

(229)

Assets

(493)

Audio

(158)

Cloud Build

(95)

Collaborate

(32)

Docs & Tutorials

(198)

Editor

(2102)

Everyplay

(13)

Game Performance Reporting

(13)

General

(819)

Graphics

(768)

GUI

(365)

Input

(146)

Licensing

(75)

Networking

(158)

Physics

(343)

Platforms

(405)

Profiling & Optimization

(69)

Runtime

(162)

Scripting

(1022)

Terrain

(150)

WebGL

(131)