This site article is Li Himi original, reproduced must be clearly noted:
reprinted from "Black Rice gamedev Block" original link: http://www.himigame.com/unreal-engine-game/2164.html
First of all, Himi here to explain why the opening ... The main reasons are two points:
-
Considering the need to write some dry goods, right? But because the official documentation is really detailed enough, for the basic knowledge mentioned I really do not want to repeat, So I hope you will have to follow the documentation of the new children's shoes first!!! Very important!!!!!!!!!!!
-
On the other hand, I would like to take UE4 to write a small project practiced hand, and then write some of the official documents do not have the problems and focus of the project. But Himi recently in the study of react Native, may not be able to continue to study UE4 in the near future, so this chapter is more appropriate to the beginning. After returning to the formal return to continue to study UE4, then formally began the tutorial series.
We can be advanced group to Exchange learning, this group of administrators are more than 2 years of Unreal Engine development veteran!
"Unreal Engine" 191452043
650) this.width=650; "class=" Alignnone size-medium wp-image-2165 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/1-300x217.png "alt=" 1 "width=" "height=" 217 "style=" margin:0px;padding:1px;border:1px solid RGB ( 97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit; Font-family:inherit;height:auto; "/>
Refer to the explanation of the official documents first:
Unreal Engine 4 provides programmers with two sets of toolsets that can be used together to speed up the development workflow. New game classes, Slate and canvas user interface elements, and editor features can be written in the C + + language, and all changes can be reflected in the Unreal Editor after compiling with one of the visual Studio or Xcode. The Blueprint Visual Scripting System is a powerful tool that allows classes to be created in the editor by connecting function blocks and property references.
C + + classes can be used as base classes for blueprint classes, and in this way programmers can set up the underlying game classes, which are then processed by the level designer for subclasses and iterations.
OK, say something more popular:
Blueprints work in conjunction with C + +, and you can create the required C + + classes or blueprint classes in your project, regardless of the way you create them.
For the blueprint: it is more inclined to quickly build the project before the test water to see the effect.
In Himi's understanding, blueprints are dominated, and C + + is auxiliary. Blueprint quickly build shelves, C + + to refactor, organize, add!
Simply take a look at the following picture, which is easier to understand:
1.png (Tomorrow's Supplement)
As shown, you don't want to make your project as late as it is. (Laugh and Cry)
Well, here's a Himi simple example:
One: First you create a C + + project, then follow the official document to create a movable actor.
Links: https://docs.unrealengine.com/latest/CHN/Programming/Tutorials/PlayerInput/index.html
II: Create a blueprint class in the project and select our first step to create a good C + + Actor (mypawn), such as:
650) this.width=650; "class=" Alignnone size-medium wp-image-2166 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/2-208x300.png "alt=" 2 "width=" 208 "height=" style= "margin:0px;padding:1px;border:1px solid RGB ( 97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit; Font-family:inherit;height:auto,/> 650) this.width=650; " class= "Alignnone size-medium wp-image-2167" src= "http://www.himigame.com/wp-content/uploads/2016/04/3-300x290.png "alt=" 3 "width=" "height=" 290 "style=" margin:0px;padding:1px;border:1px solid rgb (97,146,140); Font-style:inherit ; Font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-family:inherit;height: auto; "/>
Himi This blueprint named: "Bp_mypawn"
Three: double-click Open to Edit Bp_mypawn Blueprint, edit its event graph such as:
650) this.width=650; "class=" Alignnone size-medium wp-image-2169 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/4-300x230.png "alt=" 4 "width=" "height=" "style=" margin:0px;padding:1px;border:1px solid RGB ( 97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit; Font-family:inherit;height:auto; "/>
This actor has been mainly added to the event of keyboard Q and E:
Key Q: Create a timeline to cycle through the print word
Key e: Use the formula of (A+B) *c to randomly print out a value
Four: put the C + + actor in the first step with our new Blueprint actor, all in the world.
V: Open the level Blueprint and edit the event Graph, such as:
650) this.width=650; "class=" Alignnone size-medium wp-image-2176 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/7-300x166.png "alt=" 7 "width=" "height=" 166 "style=" margin:0px;padding:1px;border:1px solid RGB ( 97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit; Font-family:inherit;height:auto; "/>
Here the main add key 1, and the C + + actor and the Blueprint actor to switch control.
VI: is as follows:
650) this.width=650; "class=" Alignnone size-medium wp-image-2171 "src=" http://www.himigame.com/wp-content/uploads/ 2016/04/jdfw-300x215.gif "alt=" JDFW "width=" "height=" 215 "style=" margin:0px;padding:1px;border:1px solid RGB ( 97,146,140); font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit; Font-family:inherit;height:auto; "/>
Press keyboard 2 to control the Blueprint actor, then the Q and E keys have event triggers.
Press keyboard 1, cut back to the actor view of C + +, press Q and E without any event triggering.
through this small example, completed the C + + blueprint with the implementation of the process of inheritance relationship! Of course, as to how to better cooperate with the use, I will give you to play your imagination, hope this article for new children's shoes to dispel the C + + and blueprint. (PS. Many of the blueprints of the operation or what can not understand the place, then please go to a good first to the official document, then to see: So easy! )
Himi in UE4 is also a new, I hope everyone "add group 191452043" much discussion common progress!
This article is from the "Li Himi" blog, please be sure to keep this source http://xiaominghimi.blog.51cto.com/2614927/1766948
"UNREAL ENGINE game development" begins with the UE4 Blueprint (Blueprint) and C + + (new children's shoes must SEE)