Skip to content

Commit d9c0322

Browse files
authored
Update CONTRIBUTING.md
1 parent 48234f7 commit d9c0322

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

.github/CONTRIBUTING.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
## Contributing:
2+
<p>
13
All code contributions are subject to the following requirements:
24

3-
All C# code must be up to Microsoft's [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions).
4-
In the past Unity used conventions like using `m_variableName` and such practices can still be found in legacy code. However going forward Microsoft's conventions are now the standard.
5+
All C# code must be up to Microsoft's [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions). In the past Unity used conventions like using m_variableName and such practices can still be found in legacy code. However going forward Microsoft's conventions are now the standard.
56

67
In addition to the C# coding standards there is a prefered comment and region structure to follow.
78

8-
* Encapsulate all properties in a #region labeled: `Properties:`
9-
* Encapsulate all Monobehaviour Initializers, Updates, Gizmos and IEnumerators in a #region labeled: `Initialization & Updates`.
10-
* Emcapsulate Methods in a #region labeled: `Methods:` within this region you can have sub regions labeled to your liking.
9+
* Encapsulate all properties in a #region labeled: Properties:
10+
* Encapsulate all Monobehaviour Initializers, Updates, Gizmos and IEnumerators in a #region labeled: Initialization & Updates.
11+
* Encapsulate Methods in a #region labeled: Methods: within this region you can have sub regions labeled to your liking.
12+
* Triple slash summary comments must be used on all public methods and properties that are not obviously named. These summary comments corralate to the descriptions in the documentation.
1113

12-
Triple slash summary comments must be used on all public methods and properties that are not obviously named.
13-
These summary comments corralate to the descriptions in the documentation.
1414
```csharp
1515
///<summary>
1616
/// your summary...
@@ -20,21 +20,19 @@ YourMethod()
2020
//your code.
2121
}
2222
```
23-
2423
Sometimes when there is a private field/method that isn't very well named it is a good idea to add a summary comment there as well.
2524

2625
Additionally over any public property field that will be displayed in Unity's inspector window include:
27-
```csharp
26+
27+
```csharp
2828
[ToolTip("Your tooltip text")]
29-
```
29+
```
3030

3131
Sometimes with very obviouslty named fields that are self explanitory it isn't necessary to add a tooltip attribute, but in most cases it is prefered.
3232

33-
In some cases it is prefered to be more strict than Microsoft's conventions such as `var` is rarely if ever used, instead a known type should be used.
34-
Additionally when checking if statements `== true/false` is always used instead of `if(variableName)` These two practices are done to reduce ambiguity.
35-
36-
After putting in a pull request it is helpful (but not necessary) to also document them by putting in a pull request to [The documentation repo](https://github.com/Kitbashery/kitbashery.github.io/tree/main/docs) and update the docs.
37-
Doing so however does not mean your additions/changes will be accepted so it may be best to add docs after your changes have been merged or let an official developer document the changes.
33+
In some cases it is prefered to be more strict than Microsoft's conventions such as var is rarely if ever used, instead a known type should be used. Additionally when checking if statements == true/false is always used instead of if(variableName) These two practices are done to reduce ambiguity.
3834

35+
After putting in a pull request it is helpful (but not necessary) to also document them by putting in a pull request to The documentation repo and update the docs. Doing so however does not mean your additions/changes will be accepted so it may be best to add docs after your changes have been merged or let an official developer document the changes.
3936

4037
Code that deviates to far from these guidelines may not be merged untill it is revised and/or fits within the scope of the project.
38+
</p>

0 commit comments

Comments
 (0)