engiGetEntityParentEx

Returns the N-th parent of entity or NULL if index exceeds number of parents.

Syntax

public const string enginedll = @"engine.dll";

[DllImport(enginedll, EntryPoint = "engiGetEntityParentEx")]
public static extern Int32 x86_engiGetEntityParentEx(Int32 entity, Int32 index);

[DllImport(enginedll, EntryPoint = "engiGetEntityParentEx")]
public static extern Int32 x64_engiGetEntityParentEx(Int64 entity, Int64 index);

public static Int32 engiGetEntityParentEx(Int64 entity, Int64 index)
		{
			if (IntPtr.Size == 4)
			{
				var _result = x86_engiGetEntityParentEx((Int32)entity, (Int32)index);
				return _result;
			}
			else
			{
				return x64_engiGetEntityParentEx(entity, index);
			}
		}    

Property entity

Size: 32 bit / 4 byte (value)
...

Property index

Size: 32 bit / 4 byte (value)
...