---
title: "[UE4]退出游戏的API（C++）"
author: "aigo"
date: "2016-04-18T00:32:01Z"
tags: []
categories: ["开源软件"]
slug: "ue4-api-c"
draft: false
lastmod: "2016-04-17T21:47:59Z"
id: 2291979
url: "https://aigo.iteye.com/blog/2291979"
---

官方文档：

**UKismetSystemLibrary::QuitGame**

[https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Kismet/UKismetSystemLibrary/QuitGame/index.html](https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Kismet/UKismetSystemLibrary/QuitGame/index.html)

 

示例：

```
#include "KismetSystemLibrary.h"

void ASomeActor::SomeActorFunction()
{
	UKismetSystemLibrary::QuitGame(this, nullptr, EQuitPreference::Quit);
}
```