Is there any way when altering variables in the Details Panel to show / hide other variables? e.g. changing a Bool or Enum.
Hi! You can enable/disable editing of properties via metadata specifier EditCondition via C++. In this example, property InventoryRule can only be edited if Mode == LAM_Inventory:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Validation")
TEnumAsByte<ELoadingAreaMode> Mode;
UPROPERTY(EditAnywhere, BlueprintReadWrite, SaveGame, Category="Validation",
meta = (EditCondition = "Mode == ELoadingAreaMode::LAM_Inventory"))
FLoadingAreaInventoryRule InventoryRule;
You can read more about metadata specifiers here:
I was hoping for non-manual code but thanks, will have a look.
Will this hide the properties or only make them non editable?
Would like to know this too, I think I found a good video to follow https://www.youtube.com/watch?v=P5HRvqh5qmM
I’m finding this a problem as I’ve not done any C++ coding yet. How do I create the class I tried creating a new C++ file but can’t find UProperty, also how do I attach it to the right Actor?
“EditCondition” only disable/enable properties for editing. Not hiding it.
Here is wonderful article for editor modification. I think “Customize details panel” part, is the way to hide properties:
If you want to avoid C++ coding, then i suggest you to try Editor Utility Widgets:
You can create many interesting things with them. Also there is a thing like “Blutility”. I hope it can help you.)
I’ve just corrupted my project . (
I created a new C++ with Parent as Actor and it asked me to restart, so I did and not get the msg … “The following modules are missing or built with a different engine version … would I like to rebuild them now?”.
When I click Yes “could not be compiled. Try rebuilding from source manually.”
I now can’t get back into my project, how can I fix this?
Right click the .uproject file, choose “regenerate visual lstudio files”. after it is done, open the created .sln file to open visual studio. when it’s opened, right click the project in visual studio and click rebuild. then wait until it is finished.
I will try just after installing Visual Studio Community, having VS Code doesn’t seem to work.
I get this msg when I try …
Running C:/Program Files/Epic Games/UE_5.0/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe -projectfiles -project=“C:/Users/Coffee/Documents/Unreal Projects/TheCube 5.0/TheCube.uproject” -game -rocket -progress -log=“C:\Users\Coffee\Documents\Unreal Projects\TheCube 5.0/Saved/Logs/UnrealVersionSelector-2022.04.12-12.37.03.log”
A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].The .NET Core runtime can be found at:
For a UE4 installation (And I expect the same for UE5) all you have to do is install Visual studio (not code) community. If you search windows for “Visual Studio Installer” and open that, you will see your VS version and a button “modify”. There you can select “Game Development with c++”. Afaik you don’t need anything else. if it still complains, install .NET core separately I guess.
Not corrupt, if you modify code you need to just recompile the code in VS. I do assume you did not attempt to modify the engine itself though, you should code within your own project source, not the engine.
I followed this link https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/DevelopmentSetup/VisualStudioSetup/
I also installed “.NET desktop development” but not sure if that’s what it’s asking for but it still won’t work.
These people solved it with the specified .NET version:
Thank you soooo much, it works so far.
Still not sure about this … do I use “create blueprint class based on” with the C++ class I created, or can I use it in an already existing blueprint (C++ component)?
I’m actually not even sure if I chose the right type of class.
Not sure what that means, use the C++ Class as the Parent? So the C++ Class should be “Actor”?
If you created a new c++ class with AActor as the parent, you can use the new c++ class as a parent for a blueprint class. The image I showed you shows the panel where you can assign a parent class to a blueprint.
This gives you:
AActor > AYourActor (c++) > BP_YourActor (BP).
I get that thanks, I was still wondering what parent class I should use when creating the C++ file because I assumed it would be embedded into the Actor BP I needed it for.