Skip to content

InvalidCastException when accessing Value property #31

@marc-antoine-girard

Description

@marc-antoine-girard

Description

When set to ReferenceMode.Unity and unityReference variable is null, accessing Value throws an InvalidCastException.

Stacktrace

InvalidCastException: Specified cast is not valid.
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
TNRD.SerializableInterface`1[TInterface].get_Value () (at Assets/Unity3D-SerializableInterface/Runtime/SerializableInterface.cs:25)
TNRD.SerializableInterface`1[TInterface].IsNull () (at Assets/Unity3D-SerializableInterface/Runtime/SerializableInterface.cs:59)
CodeExample.Update () (at Assets/CodeExample.cs:24)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions