C# reference: reading and editing
Find declarations, read overloads, arguments and defaults, and edit descriptions in the right place.
Find the exact declaration
Search using the C# name and type: Rect2.Intersects, Entity.GetEntity<T>() or new Vector3(1, 2, 3). Portal search also covers task, argument and return descriptions. Portal search and the page filter, “Search within this type,” serve different purposes: the page filter matches names and declarations, not all description text.
An inherited method may be documented on a base-type page. For example, Button.QueueFree resolves to Entity.QueueFree. This does not mean Button lacks the method. Check the “Inherits” row on the type page and follow the base-type link.
Expand a method name, then choose the required overload. The # link beside a particular declaration includes that overload anchor. Keep the complete link when sharing an example. Switching language does not translate C# names.
Read a declaration
The declaration from Rect2.Intersects:
public bool Intersects(Rect2 b, bool includeBorders = false);This describes the API; it is not a complete method body to paste into your script.
| Part | Meaning |
|---|---|
public | Accessible to your C# code. |
bool before the name | Returns true or false; read the result conditions below the declaration. |
Intersects | The method name with exact casing. |
Rect2 b | A required Rect2 argument. Its actual name is b, not an invented other. |
bool includeBorders = false | Optional argument: omission uses false. A named call uses includeBorders: true. |
Area { get; } | A read-only property; you cannot assign a new value. |
Position { get; set; } | A property you can read and change. |
static in another declaration | Call the member through its type name. Without static, it usually operates on an instance. |
? on a reference type | A nullability annotation, not an automatic runtime value check. |
A dash in the default-value column means no default was declared, not that you should pass null. Argument count and order belong to the selected overload. A constructor creates a value with new; void means no return value.
Check behavior, not just the name
For rectangles sharing a side, ordinary Intersects() returns false and Intersects(..., includeBorders: true) returns true. Point containment through HasPoint() has its own boundary rules. The name Expand alone does not guarantee that HasPoint afterward includes the original point.
This complete example checks both situations:
using Reckfell;
public static class RectangleExamples
{
public static bool Validate()
{
var bounds = new Rect2(0, 0, 2, 2);
var neighbor = new Rect2(2, 0, 2, 2);
bool excludesEnd = !bounds.HasPoint(bounds.End);
bool touches = bounds.Intersects(neighbor, includeBorders: true);
bool overlaps = bounds.Intersects(neighbor);
var cells = new Rect2I(0, 0, 2, 2);
var cell = new Vector2I(2, 1);
bool expandStillExcludes = !cells.Expand(cell).HasPoint(cell);
Rect2I withCell = cells.Merge(new Rect2I(cell, Vector2I.One));
return excludesEnd && touches && !overlaps
&& expandStillExcludes && withCell.HasPoint(cell)
&& withCell.Size == new Vector2I(3, 2);
}
}Add RectangleExamples.cs to a C# project. Calling RectangleExamples.Validate() returns true when the shown rules hold. The example was executed against installed SDK 1.0.0. It tests struct methods, not rendering or Control mouse hit testing.
Before using a method, read its restrictions, coordinate system and units. Check whether it changes an object or returns a copy. For example, Rect2.Grow returns a new value; discarding it does not enlarge the original variable. Validate numeric finiteness separately for NaN and infinities. Resources and Entities also have lifetime and valid-call timing requirements: a matching return type alone does not establish GPU readiness or tree membership.
What the SDK note confirms
“Declarations checked against C# SDK” means types, declarations, overloads and argument defaults come from the installed SDK version shown. It does not attest every descriptive sentence, example, platform or image quality. Translation, compilation and link checks do not replace behavior checks either.
If a documented call does not compile, first check your SDK version, namespace, selected overload and exact casing. Do not replace a C# name with a translation or an automatic snake_case-to-PascalCase guess.
Where to edit descriptions
This section is for maintainers of the engine sources or a local portal checkout.
| What you edit | Where its source text lives |
|---|---|
| Native class documentation built into the editor | XML in Source/doc/classes/ or Source/modules/<module>/doc_classes/. Native XML uses its own tags and links, such as [method translate] and [param offset]. |
| Managed C# implementation XML comments | /// comments in the corresponding C# source: <summary>, <param name="...">, <returns> and <see cref="...">. This differs from native XML BBCode. |
| Reviewed RU/EN prose on this portal | content/reference/overrides.json in the portal checkout. Overrides use the exact declaration XML ID. |
| A portal manual | Files under content/manual-edits/ru/ and en/, registered in content/manual-edits.json. |
Portal declarations come from the SDK contract, not prose translation. Editing a description does not require changing the engine core. Do not disguise an API issue with an invented declaration in generated JSON. If the SDK really changed, first regenerate its installed-SDK contract using scripts/sdk-reference; the tool accepts an SDK API directory and output JSON path.
Descriptions use separate keys:
| Key | Purpose |
|---|---|
A type XML ID, such as T:Reckfell.Rect2 | Introduction; the brief description uses the brief RU/EN field. |
| The exact member XML ID | A particular property, method or overload description. |
XML ID + #param:<name> | One argument description. |
XML ID + #returns | Return-value explanation. |
An existing argument override:
{
"M:Reckfell.Rect2.Intersects(Reckfell.Rect2,System.Boolean)#param:includeBorders": {
"ru": "false по умолчанию; true учитывает касание сторон и углов. Не меняет правила HasPoint().",
"en": "Defaults to false; true includes side and corner contact. Does not change HasPoint() boundary rules."
}
}Take XML IDs from the SDK contract, not a method name alone. Do not translate argument names inside keys. Keep executable code identical in both locales and translate the surrounding explanation.
Publish a local portal edit
From the portal checkout root, with Python configured, a current .runtime/qa/sdk-contracts.json contract and the installed SDK:
python scripts/build_reference.py
python scripts/refine_manual.py
python scripts/validate_docs.pyOrder matters: reference generation is followed by authored-manual restoration and link normalization, then validation. make rst is not this portal publication process. Do not use content/docs/ as the sole edit source: regeneration overwrites it.
Captured imported descriptions are separate from generated pages. Editing native XML alone does not rewrite previously captured translations or overrides. Do not run --refresh-prose over the generated C# reference: this mode captures descriptions after a fresh source import.
These commands update content on disk. The search service indexes it at startup; after validation, refresh the running documentation service using your installation procedure. Check both locales, the specific overload link and task search. Record technical-review status only after checking the implementation and the necessary example behavior; state what remains untested.