-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Yaroslav Sarchuk edited this page Aug 29, 2025
·
2 revisions
This guide will help you create your first .atomic file and generate extension methods for the Atomic Framework.
- JetBrains Rider 2025.1 or later
- Atomic Plugin installed
- Atomic Framework added to your project
- C# project open in Rider
- Right-click on your project or folder in the Solution Explorer
- Select New β Atomic File
- Enter a name (e.g.,
PlayerComponents.atomic) - Click OK
- Create a new file with
.atomicextension - The plugin will automatically recognize it
Here's a minimal example to get started:
namespace: MyGame.Components
className: EntityExtensions
entityType: IEntity
tags:
- Player
values:
- Health: int
| Field | Description | Example |
|---|---|---|
namespace |
C# namespace for generated code | MyGame.Components |
className |
Name of the generated static class | EntityExtensions |
entityType |
The base type for your entities |
IEntity, GameObject
|
When you open an .atomic file, you'll see a notification panel at the top with helpful actions:
- First-time generation: Shows "Generate API" button
- Existing file: Shows "Regenerate API" button
- Quick actions: "Open Generated File" and "Delete Generated File" buttons
- Status info: Displays auto-generation status
- Open your
.atomicfile - Use one of these methods:
- Click the "Generate API" button in the notification panel
- Press Ctrl+Shift+G
- Right-click and select Generate Entity API
- Check the notification for success/errors
- Important: Auto-generation only works after the first manual generation
- If enabled in settings, code regenerates automatically when you save the file
- The notification panel shows when auto-generation is active
The plugin generates extension methods you can use immediately:
using MyGame.Components;
public class GameLogic
{
public void InitializePlayer(Entity entity)
{
// Tag methods
entity.AddPlayerTag();
// Value methods
entity.SetHealth(100);
if (entity.HasPlayerTag())
{
var health = entity.GetHealth();
// ...
}
}
}namespace: Game.Components
className: EntityExtensions
entityType: IEntity
directory: Generated
aggressiveInlining: true
imports:
- System
- UnityEngine
- System.Collections.Generic
- Atomic.Entities
tags:
- Player
- Enemy
- Projectile
- Pickup
values:
- Health: int
- Position: Vector3
- Velocity: Vector3
- Damage: float
- Name: string
- Inventory: List<Item>
For each tag, you get:
bool HasPlayerTag()void AddPlayerTag()void DelPlayerTag()
For each value, you get:
int GetHealth()void SetHealth(int value)void AddHealth()bool HasHealth()void DelHealth()bool TryGetHealth(out int value)
- Learn about Atomic File Syntax
- Explore Advanced Features
- See Generated Code Examples
- Configure Plugin Settings
-
Use IntelliSense: Type
Ctrl+Spacein .atomic files for auto-completion - Organize by Feature: Create multiple .atomic files for different systems
- Version Control: Commit .atomic files, exclude generated .cs files
-
Performance: Enable
aggressiveInliningfor hot paths
// Physics.atomic
values:
Position: Vector3
Rotation: Quaternion
Velocity: Vector3
AngularVelocity: Vector3
// Combat.atomic
values:
Health: int
Armor: int
Damage: int
AttackSpeed: float
// AISystem.atomic
tags:
AIControlled
Patrolling
Attacking
values:
AIState: AIStateEnum
Target: Entity
PatrolPath: Vector3[]
- Check the Troubleshooting Guide
- Read the FAQ
- Report issues on GitHub