Files
UnrealEngineUWP/Engine/Documentation/Source/Programming/Development/ManagingGameCode/CppClassWizard/CppClassWizard.CHN.udn
Ben Marsh 49831a5631 Include documentation source in repository.
[CL 2489162 by Ben Marsh in Main branch]
2015-03-24 08:35:52 -04:00

59 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
INTSourceChangelist:1812649
Availability:Rocket
Title:C++类向导
Crumbs: %ROOT%, GettingStarted
Description:虚幻引擎4的C++类向导概述。
_C++类向导_ 提供了快速和简单的方法来添加native C++代码类到您的项目,以按您所需来扩展功能。 这会把仅有内容的项目转化为代码项目。 从功能上来说,工作原理非常类似[新项目向导](Engine/Basics/Projects)。 您可以按如下方式使用C++类向导:
[REGION:note]
在继续前请确认您使用的是安装了更新包1的Visual Studio 2012专业版或预览版。
[/REGION]
1. 在主编辑器中,选择 **File > Add Code to Project...** (文件>添加代码到项目...
![](FileCPP.png)
1. **C++类向导** 将会出现, 显示通常所添加的类。 如果您没有看到您正在搜寻的类,那么您需要查看整个类的层次列表。 勾选窗口右上角的![](button_ShowAllClasses.png)(h:25)复选框。
[REGION:imagetable]
| ![](CppClassWizard.png)(w:450) | ![](AllClasses.png)(w:450) |
| :---: | :---: |
| 默认类 | 所有类 |
[/REGION]
选择您想要添加的类并点击 ![](button_Next.png) 按钮。
1. 您会被提示是否要为您的新类输入一个 **名称**。 输入名称后点击![](button_Create.png)按钮。 这样会创建头文件(.h)和源文件(.cpp)文件。
![](NameNewActor.png)(w:600)
[REGION:note]
类名称仅能包含字母,数字字符并且不能包含空格。 如果名称无效,此处会提示您。
[/REGION]
1. 在短暂的计算后,编辑器会询问您是否想要现在就编辑代码。 点击 ![](button_Yes.png)。
![](EditNow.png)
1. 代码将会立即在 _Visual Studio 2012_ 中打开,等待编辑。
![](CodeEditing.png)
关于如何在完成编辑后编译类,请查阅 [编译项目文件。](Programming\Development\CompilingProjects)
## 相关主题
* [](Programming\Development\VisualStudioSetup)
* [](Programming\Development\CodingStandard)
[PUBLISH:Licensee]
* [](Programming\Development\BuildingUnrealEngine)
[/PUBLISH:Licensee]
[PUBLISH:Rocket]
* [](Programming\Development\CompilingProjects)
[/PUBLISH:Rocket]