In this tutorial we’re going to create our own Game Feature Plugin in Lyra, and expose it so that it can be selected as an Experience in the Lyra Front End UI. This is the preferred way to build content on top of the systems and frameworks that make up Lyra.
https://dev.epicgames.com/community/learning/tutorials/rdW2/unreal-engine-how-to-create-a-new-game-feature-plugin-and-experience-in-lyra
GameFeature folder is suppose to be in plugin folder, but I cannot create it and its not being created when enabling / creating a plugin. Any suggestions ?
If you’re using Lyra, the folder already exists. Make sure you have Engine and Plugin content set to visible in your Content Browser settings.
I created an extra plugin just to try to familiarize with the process again, but I am unable to disable a plugin. once I disable it and click restart (even after applying save all before restart) the plugin is enabled yet again when I reload and I do not see it in the Uproject file where I can disable out of editor. Thanks for the help !
Game Feature plugins are a bit different than regular plugins. @JGZ
The engine will ALWAYS show you that they exist, unlike other plugins. That being said, it DOES NOT actually load and initialize them unless you explicitly tell it to.
Check your MyPlugin
uasset in the root content folder for your Game Feature plugin. Open it in editor, you will see that it has the option to set the state of the plugin. Here you can set the state you want for the plugin.
For example, here is my XCL
Game Feature plugin’s GameFeatureData
asset. The current state = Active
so it is actually loaded and initialized.
If you want your engine to ignore your plugin by default, such that you must EXPLICITLY load it yourself in code, then set the Initial State
to Registered
. If you want it to be even more ignored, then set it to Installed
.
(FWIW you can edit this in the .uplugin
definition as well).
Perfect, thanks for the response, setting to installed does do exactly what you say and works perfectly.
Is a game feature plugin suppose to remain checked even after unchecking it and restarting though ? it seems as if that is a bug.
Either way I think I’m just being a bit zealous, but trying to seriously learn from the best practices of a functional product as I’m coming from unity game dev, youtubes videos, and website design as hobbies mostly as experience.
thanks again for taking the time to respond !
Hey there!
This behavior is logically intended, as LyraGame.target.cs runs ShouldEnableAllGameFeaturePlugins and magically enables any Game Feature Plugins in the project. However, we’re not happy with how this works in practice, and will be changing it for the Lyra Sample in 5.1, so that you can disable the GFP like a “normal” plugin. For now, the best way to test your project without certain GFP’s is to add "NeverBuild": true
to your GFP’s .uplugin file.
Oh, so this is specific to Lyra and not generally related to Game Feature Plugins? Good to know. Thank you for the clarification.
On fresh install of 5.1 source engine and 5.1 lyra. If I load the editor map all the plugins load, but if i close and re open the editor map then none of the plugins load. but if i detach from player pawn with f8 and toggle visibility in the hiearchy off and on then they all appear. Ive dug through the blueprints and even tried manually toggling in the blueprints, but ultimately its something I cannot fix. Is this suppose to be happening or should I redownload everything again and try to build again ?
How would you change the default pawn to be the shooter pawn? Right now it spawns the main menu pawn no matter what I change the LyraPawnData Pawn Class. Is there some settings elsewhere that I need to change? So far the classes I’ve tried are B_Hero_Default, B_SimpleHeroPawn, and B_Hero_ShooterMannequin all which spawn the chess piece looking character.
EDIT: Found out I need to assign Default Gameplay Experience to my B_MyLyraExperienceDefinition in the World Settings. Now I came across the issue that no input is being read for any pawn except the default chess piece pawn.
I was able to move around again but the skeleton mesh nor the ability to jump works/shown.
Here are all my settings:
Hi!
i cant create the game feature (c++) plugin . when i try i keep getting the following error:
//Failed to compile plugin source code. See output log for more information.
Output Log //
Running F:/Games/UE_5.1/Engine/Build/BatchFiles/Build.bat LyraEditor Development Win64 -Project=“F:/PROYECTOS UNREAL/StarterGame/StarterGame.uproject” -Progress -NoHotReloadFromIDE
Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” LyraEditor Development Win64 -Project=“F:/PROYECTOS UNREAL/StarterGame/StarterGame.uproject” -Progress -NoHotReloadFromIDE
“dotnet” no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
LogSlate: Window ‘Unable to create plugin’ being destroyed
Message dialog closed, result: Ok, title: Unable to create plugin, text: Failed to compile plugin source code. See output log for more information.
I made a video on the subject. You just have to add code before starting the creation of the Game Feature.
Did something change as it seems checking or unchecking the box in the UserFacingExperience makes no difference in the defaultEditor Overview map.
I have tried to disable already existing ones by unchecking the “SHOW IN FRONT END” but does not seem to have any effect. If there is an update for the tutorial please let me know As of right now I cannot get my experience to show up in the loading map.
thanks
enable the plugins 1)game feature 2) modular
I was able to work around this by moving the UserFacingExperience to /Game/System/Playlists.