Structs

A struct is a value type that groups related data together. Structs are similar to classes but with key differences that affect performance and behavior. Unity uses structs extensively — Vector3, Quaternion, Color, and Rect are all structs.

More in C# Essentials

  1. Data Types
  2. Control Flow
  3. Methods
  4. Classes & Objects
  5. Constructors
  6. Properties
  7. Access Modifiers
  8. Inheritance
  9. Operators
  10. Loops
  11. Arrays
  12. Lists & Collections
  13. Interfaces
  14. Abstract Classes
  15. Enums
  16. Structs
  17. Generics
  18. Delegates & Events
  19. Lambda Expressions
  20. LINQ
  21. Async & Await
  22. Int
  23. float
  24. bool
  25. char
  26. If
  27. else
  28. else if
  29. switch
  30. Primitive Data Types

All 157 topics in the Learn Unity Roadmap