Skip to content

explain_type: single maxMembers pool starves functions for property-heavy classes #39

@Joxx0r

Description

@Joxx0r

Bug Description

explain_type uses a single maxMembers budget for all member kinds (properties, functions, enum values). For classes that declare many properties before their first function, the budget is exhausted by properties and zero functions are returned.

Reproduction

explain_type("ADiscoveryPlayerController", maxMembers: 50, contextLines: 0)

Returns:

  • 50 properties (all UPROPERTY DefaultComponent declarations)
  • 0 functions
  • count: 50 (budget fully used by properties)

ADiscoveryPlayerController has 50+ UPROPERTY declarations before any function definition, so functions never get a slot.

Expected Behavior

Either:

  1. Separate limitsmaxFunctions and maxProperties parameters so users can control the mix
  2. Reserved slots — Guarantee a minimum percentage of slots for each kind (e.g., at least 25% for functions)
  3. Interleaved listing — Alternate between properties and functions instead of listing all properties first

Option 1 (separate limits) would be most flexible and consistent with how maxChildren is already separate.

Impact

For large AngelScript classes (common in Discovery — player controllers, game modes, characters), explain_type returns only component/property declarations and none of the class's actual behavior (functions). This forces a follow-up find_member call for functions, partially negating the round-trip savings of explain_type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions