reckfellENGINE

RF0002: Containing class needs partial

The nested script is partial, but its containing class prevents generating the nested declaration.

On this page

RF0002 is an enabled-by-default build error: a class containing an engine-derived nested class lacks partial. Marking only the inner Entity subclass is insufficient; generated integration must also reopen the enclosing class.

Reproduce

Save as Host.cs:

C#
using Reckfell;

public class Host
{
    public partial class InnerEntity : Entity
    {
        [Export] public int Value { get; set; } = 7;
    }
}

Fix

Add partial to Host; keep it on InnerEntity as well:

C#
using Reckfell;

public partial class Host
{
    public partial class InnerEntity : Entity
    {
        [Export] public int Value { get; set; } = 7;
    }
}

For several enclosing classes, inspect every containing class named by the diagnostic. Do not add partial to a namespace: namespaces are not classes. If the inner class itself lacks partial, fix RF0001 too.

What this fix permits

The native check constructs Host.InnerEntity from C#, adds it to the Entity tree, reads Value through Get and changes it through Set. This confirms the corrected nested binding, not a standalone script path for the inner type.

For a script you intend to attach to an Entity by file path, prefer a top-level class in a matching filename. Fixing this diagnostic does not automatically make every nested helper independently attachable in the editor.

Do not suppress the diagnostic: the container is part of the declaration that generated code must extend. A related C# partial-declaration error can be a cascade; fix the RF0002 declaration before investigating remaining errors.

The installed analyzer rejected the invalid example; corrected nested property get/set ran in the engine. IDE actions, all combinations of nested structs/records/generics and exported builds are outside this check.

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.