feat: add component discovery source generator
Introduce an incremental source generator that automatically discovers component types used with the World API. This allows the WorldSerializer to perform serialization and deserialization without relying on reflection, improving performance and stability.
This commit is contained in:
@@ -10,11 +10,13 @@ public class WinCheckSystem : ISystem
|
||||
{
|
||||
public void Run(World world)
|
||||
{
|
||||
ref var state = ref world.GetSingleton<GameState>();
|
||||
|
||||
if (state.Status != GameStatus.Playing)
|
||||
// Check game status before doing any work. Use ReadSingleton
|
||||
// to avoid auto-marking GameState as modified when we bail early.
|
||||
if (world.ReadSingleton<GameState>().Status != GameStatus.Playing)
|
||||
return;
|
||||
|
||||
ref var state = ref world.GetSingleton<GameState>();
|
||||
|
||||
// Build a 3×3 grid of marks using the iterator API.
|
||||
var grid = new Player[3, 3];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user