reckfellENGINE

RF0003: Two script classes use one path

Two classes with the same short name match one file. Different namespaces do not make that file path unique.

On this page

RF0003 is an enabled-by-default build error: different engine-derived classes compete for the same script file path. Different C# namespaces do not create different resource paths.

Reproduce

Save the complete invalid example as Item.cs:

C#
using Reckfell;

namespace TeamA { public partial class Item : Entity { } }
namespace TeamB { public partial class Item : Entity { } }

Fix the script paths

Move the classes into distinct files. Their short names can remain identical when namespaces and resource paths are distinct. Save this as TeamA/Item.cs:

C#
using Reckfell;

namespace TeamA;
public partial class Item : Entity
{
    [Export] public int Value { get; set; } = 11;
}

Save the second as TeamB/Item.cs:

C#
using Reckfell;

namespace TeamB;
public partial class Item : Entity
{
    [Export] public int Value { get; set; } = 22;
}

Update level or prefab script references to the intended path. The native check loads both scripts from those separate paths: the first returns Value=11, the second Value=22.

This rule does not ban all helper types in one C# file. The path generator associates a top-level engine class with a matching filename; two different classes matching Item.cs cannot both own its path. Changing only the namespace leaves that collision. Adding partial fixes RF0001, not this path conflict.

The same class name declared twice in the same namespace can instead produce ordinary C# duplicate-type/member errors. Resolve those compiler errors as well. Do not suppress RF0003 or disable the path generator: that does not establish a unique loadable script.

The installed analyzer rejected the invalid file and the engine loaded both corrected script paths with different exported values. Automatic reference migration, generic script types, IDE moves and exported builds were not tested.

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.