mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 09:37:15 +00:00
style: format all files with prettier
This commit is contained in:
@@ -20,13 +20,13 @@ Production patterns for Unity's Data-Oriented Technology Stack (DOTS) including
|
||||
|
||||
### 1. ECS vs OOP
|
||||
|
||||
| Aspect | Traditional OOP | ECS/DOTS |
|
||||
|--------|-----------------|----------|
|
||||
| Data layout | Object-oriented | Data-oriented |
|
||||
| Memory | Scattered | Contiguous |
|
||||
| Processing | Per-object | Batched |
|
||||
| Scaling | Poor with count | Linear scaling |
|
||||
| Best for | Complex behaviors | Mass simulation |
|
||||
| Aspect | Traditional OOP | ECS/DOTS |
|
||||
| ----------- | ----------------- | --------------- |
|
||||
| Data layout | Object-oriented | Data-oriented |
|
||||
| Memory | Scattered | Contiguous |
|
||||
| Processing | Per-object | Batched |
|
||||
| Scaling | Poor with count | Linear scaling |
|
||||
| Best for | Complex behaviors | Mass simulation |
|
||||
|
||||
### 2. DOTS Components
|
||||
|
||||
@@ -606,6 +606,7 @@ public struct Disabled : IComponentData, IEnableableComponent { }
|
||||
## Best Practices
|
||||
|
||||
### Do's
|
||||
|
||||
- **Use ISystem over SystemBase** - Better performance
|
||||
- **Burst compile everything** - Massive speedup
|
||||
- **Batch structural changes** - Use ECB
|
||||
@@ -613,6 +614,7 @@ public struct Disabled : IComponentData, IEnableableComponent { }
|
||||
- **Use Aspects** - Clean component grouping
|
||||
|
||||
### Don'ts
|
||||
|
||||
- **Don't use managed types** - Breaks Burst
|
||||
- **Don't structural change in jobs** - Use ECB
|
||||
- **Don't over-architect** - Start simple
|
||||
|
||||
Reference in New Issue
Block a user