reckfellENGINE

C#: required rules and project style

What generators and persistence require, and what the team can choose.

On this page

Rules that affect behavior

RuleReason
partial on a ReckfellObject-derived classGenerators add API code; missing partial produces RF0001
Attached class/file names match, including caseGenerators associate the script with its path
Export only supported instance membersStatic/readonly/unsupported members do not become stored state
Signal delegates end in EventHandlerGenerators create the event; see the signals guide
Stable exported names and pathsSerialized data and level dependencies use them

Renaming an exported member does not migrate stored values. Before a bulk rename, inspect affected .rscene/.rprefab/.rdata files and old-data loading. Do not edit generated MethodName/PropertyName: change the source member and rebuild.

Readable project conventions

These examples use PascalCase for types, methods and properties, _camelCase for private fields and camelCase for locals. This is a convention rather than a separate engine architecture. Do not rename required callbacks such as _Ready to follow ordinary-method conventions.

Name quantities by their meaning: delta is callback time, Damage is damage, Ammo is a count. Place refusal checks before mutation; TryFire consumes no ammo when settings are invalid.

ExportedWeapon.cs
C#
using Reckfell;

public partial class ExportedWeapon : Entity
{
    [Signal] public delegate void FiredEventHandler(int damage);
    [Export] public ShotSettings? Settings { get; set; }
    [Export(PropertyHint.Range, "0,99,1")] private int _ammo = 5;
    public int Ammo => _ammo;
    public int TransientValue { get; set; } = 3;

    public bool TryFire()
    {
        if (_ammo <= 0 || !ReckfellObject.IsInstanceValid(Settings) ||
            !Settings!.TryGetDamage(out int damage)) return false;
        _ammo--;
        EmitSignal(SignalName.Fired, damage);
        return true;
    }
}

This component uses generated SignalName.Fired, separates per-instance state from Resource settings and returns bool for expected refusal. The export example provides the complete setup.

Do not add Entity, partial or GlobalClass to ordinary helpers such as InventoryLedger and VariantCounter just for uniformity. Establish formatting, using order and namespaces once for the project; this page does not override a team's existing conventions.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.