So i started again, completely from scratch, to rule out that it was anything weird that i had done. Here are my 19 steps to sadness. Please tell me where i went wrong!?
19 excuciatingly detailed steps to sadness:
-
create lyra starter game
-
double click .uproject
-
click update with the popup that says project is out of date
-
edit-> plugins
-
add → game feature with c++ → name “Test” → create
-
close visual studio i guess
-
save and close the “Test” plugin game feature data that popped up
-
tools → new c++ class
-
all classes → ControllerComponent
-
leave default name MyControllerComponent, select Test plugin for the location, create class
-
reload all when vs asks.
-
wait for the auto build to fail in unreal (why does it even bother? this stuff never works)
-
close unreal so that we can build in visual studio without it complaining
-
right click LyraStarterGame and build i guess just to demonstrate that it will not build
-
notice the build error " Cannot open include file: ‘Components/ControllerComponent.h’: No such file or directory "
-
edit the TestRuntime.Build.cs build file for our Test plugin, add “ModularGameplay” to PublicDependencyModuleNames, save file
-
edit the Test.uplugin file and add
“Plugins”: [
{
“Name”: “ModularGameplay”,
“Enabled”: true
}
],directly after the Modules section
-
right click LyraStarterGame and build again - it now builds without error
-
go look at your “MyControllerComponent.h” header file and cry because intellisense is broken