Been currently banging my head against the wall, and I was just able to get it all to work. Here is my insight. I am giving it to you all in hopes this alleviates similar frustrations. Goal. Get ALS character spawned in a game feature.
- Use GitHub - Sixze/ALS-Refactored: Completely reworked and improved C++ version of Advanced Locomotion System V4. . This is the best version.
- Starting with a Lyra Sample project.
- ALS will remain a plugin.
- Create a new C++ Game feature.
- Copied the shooter core uplugin dependencies. You can add these in editor under edit->plugins-> edit .
- Add ALS as a dependency to .uplugin file. Add ALS as a public dependency module to the build.cs file. I currently use. Core",“LyraGame”,“ModularGameplay”,“CommonGame”,“ALS” .
I threw in the following under private dependency modules for good measure.
“CoreUObject”,
“Engine”,
“Slate”,
“SlateCore”,
“GameplayTags”,
“GameplayTasks”,
“GameplayAbilities”,
“GameplayMessageRuntime”,
“CommonUI”,
“UMG”,
“DataRegistry”,
“AsyncMixin”,
“EnhancedInput”,
“GameSubtitles”,
“DeveloperSettings”,
“AIModule”
- Create/Configure your GameFeatureData
- Create/Configure a new LyraInputConfig Data asset
- Create/Configure your InputMappingContext
- Create/Configure a new LyraPawnData . You can use the ALS character here
- Create/Configure a new LyraExperience Definition.
- Create/Configure LyraAbilitySet, LyraActionSet.
- Hook it up your experience.
- Create a new level. Set the experience in it accordingly.
- In the GameFeatureData file, compare it to ShooterCore and ShooterExplorer. Note now they handle loading with the primary asset manager.
- Don’t recompile your project while the game feature you are working on is active. This will crash the editor.
- In Project settings ->AssetManager–>PrimaryAssetTypes to scan, make sure that your GameFeatureData is loaded. This can be through a directory, but I recommend using the specific assets category. Save and Relaunch the editor. This ensures Unreal will find the new GameFeatureData. Otherwise you will get the default user experience.