Add API to pass a prepare callback before entity is added to world