public static IMyCubeGrid GetGrid(this Sandbox.ModAPI.Ingame.MyDetectedEntityInfo entityInfo) { if (!entityInfo.IsGrid()) { return(null); } return(MyAPIGateway.Entities.GetEntityById(entityInfo.EntityId) as IMyCubeGrid); }
public static IMyCubeGrid GetGrid(this Sandbox.ModAPI.Ingame.MyDetectedEntityInfo entityInfo) { if (!entityInfo.IsGrid()) { return(null); } return(MyAPIGateway.Entities.GetEntityById(entityInfo.EntityId) as IMyCubeGrid); }