// For brevity, we show only the relevant part of the typical GameViewMain unit.
// We assume you created in the editor,
// and put in the published section of your view, this component:
// ButtonExitGame: TCastleButton;
uses CastleApplicationProperties;
procedure TViewMain.Start;
begin
inherited;
ButtonExitGame.Exists := ApplicationProperties.TouchDevice;
end;