Skip to content

Get Interface Reference From Enitity Reference

Pavle edited this page Mar 2, 2021 · 2 revisions
STypeID* typeID = TTypeIDHelper<TypeName>::GetTypeID();
ZEntityType** type = action->m_Object.QueryInterfacePtr(typeID);
TypeName* item = reinterpret_cast<TypeName*>(type);

Example:

STypeID* typeID = TTypeIDHelper<IHM5Item>::GetTypeID();
ZEntityType** type = action->m_Object.QueryInterfacePtr(typeID);
IHM5Item* item = reinterpret_cast<IHM5Item*>(type);
Clone this wiki locally