In the generated C# code, SpaceEntity.GetParentEntity() looks like this:
public Csp.Multiplayer.SpaceEntity GetParentEntity()
{
var _result = new Csp.Multiplayer.SpaceEntity(
csp_multiplayer_SpaceEntity_GetParentEntityC_SpaceEntityP(_ptr)
);
return _result;
}
In the C++ code (SpaceEntity.h) GetParentEntity() returns nullptr when the entity has no parent.
The generated code should do a null check when wrapping a NativePointer and return a null managed object.
To Reproduce
In C#, call SpaceEntity.GetParentEntity() in a space on any entity that doesn't have a parent.
Expected behaviour
SpaceEntity.GetParentEntity() should return null.
CSP version (please complete the following information):
Describe the bug
In the generated C# code,
SpaceEntity.GetParentEntity()
looks like this:In the C++ code (SpaceEntity.h)
GetParentEntity()
returnsnullptr
when the entity has no parent.The generated code should do a null check when wrapping a
NativePointer
and return anull
managed object.To Reproduce
In C#, call
SpaceEntity.GetParentEntity()
in a space on any entity that doesn't have a parent.Expected behaviour
SpaceEntity.GetParentEntity()
should returnnull
.CSP version (please complete the following information):
v5.3.1+544
Language:
C#