Skip to content

static members marked as SyncedEntryField #18

Description

@Lordfirespeed

When a static member is marked as a synced entry, it still shows up in the synced entry fields enumeration and the resulting error message is not very helpful

Eg error message

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
CSync.Lib.SyncedConfig2`1[T].PopulateEntryContainer () (at /home/runner/work/CSync/CSync/CSync/CSync/Lib/SyncedConfig2.cs:44)
CSync.Lib.ConfigManager.Register[T] (CSync.Lib.SyncedConfig2`1[T] config) (at /home/runner/work/CSync/CSync/CSync/CSync/Lib/ConfigManager.cs:139)
QuotaOverhaul.Config..ctor (BepInEx.Configuration.ConfigFile config) (at ./src/QuotaOverhaul/Config.cs:96)
QuotaOverhaul.Plugin.Awake () (at ./src/QuotaOverhaul/Plugin.cs:28)

Improve the usefulness of the error message

See e.g. https://github.com/LuciusofLegend/QuotaOverhaul/blob/465b8e39dab299950261a72302b79e1945036e31/src/QuotaOverhaul/Config.cs for misuse example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions