onParent

inline fun Entity.onParent(parent: Entity? = this.parent, run: Entity.() -> Unit)

Runs code on the first parent of this entity.