Advertisement
Tarodev

What C# naming conventions should be used in Unity 1

Jan 27th, 2020
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. // The Unity way
  2. public class BadHero {
  3.     public int health { get; set; }
  4.     public BadHero(int health) {
  5.         this.health = health;
  6.     }
  7. }
  8.  
  9. // The C# convention
  10. public class GoodHero {
  11.     public int Health { get; set; }
  12.     public GoodHero(int health) {
  13.         Health = health;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement