public int GetGameObjectType(int id) { int type = -1; EntityInfo entity = GetEntityById(id); if (null != entity) { type = entity.EntityType; } return type; }