The materials I study are using the old version of ue4
There are many new versions that are different, and many things need to be explored by yourself,
For example, In the boss version, the default creation of a GameMode is sent back to the automatic creation of the constructor, but the new version does not have it, you need to fill in manually, and I don’t know the meaning of these parameters.
p>
But these are not impressions, you can create your own
Declaration structure Function, and implemented in Cpp, we need to insert something here, that is, we need to add a new Character class in Unreal 4
The details are as follows
First file, select new c++ class
Choose to inherit Character and go to the next step
Enter the name of the custom class and click Create. After the new version is created, click Automatically open the compiler without confirmation
< p>The latest generated at this time, compile and debug
Add a sentence to the BeginPlay() function to verify that the game now uses our own custom Character
Compile, what we want to see should not appear at this time
We also need to set our own class in Gamemode
Add a line of code to the constructor of the Gamemode class. I will not copy the code here. I hope everyone can copy it by hand. You will thank me in the future, hahahaha
Okay, compile and run this time
The rest of the filling action and so on are being written.