Page MenuHomeFeedback Tracker

GenericEntity does not know Parent
Assigned, NormalPublic

Description

This is the structure:

The Code is running inside a component of Vault:

auto owner = GetOwner();
Print(owner);
auto parent = owner.GetParent();
Print(parent);

Output:

SCRIPT       : GenericEntity owner = GenericEntity<0x0000021321813C30>
SCRIPT       : IEntity parent = NULL

We can see that the component can get its owner, which is the GenericEntity 'Vault'.
I confirmed this by printing the name of the Entity.

Now with GetParent() we should get a IEntity , which is Bank in this case but we get null.

Is this my fault or is it now working correctly?

Thanks in Advance!

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Create 2 Entities with one as a child.
Put a component into the child.
In the component execute GetOwner().GetParent()

Event Timeline

Natsu created this task.May 20 2022, 8:18 PM
Natsu renamed this task from GenericEntity does not know Parent in some cases to GenericEntity does not know Parent.
Natsu updated the task description. (Show Details)
Natsu edited Steps To Reproduce. (Show Details)May 22 2022, 5:55 PM
Geez changed the task status from New to Assigned.May 23 2022, 1:55 PM
Geez edited projects, added Arma Reforger Modding; removed Arma Reforger.