You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
Currently the DecodeJson function needs an already pre constructed json object as an input parameter. However this method should be static, take just an input string and return the decoded json object for the user to store. In addition the function should also have two execute node instead of a boolean return node.
This changes would make for cleaner, more concise and less cluttered code, especially in blueprints.
P.S. You create multiple execute nodes for blueprints like this:
// in the .h file
UENUM(BlueprintType)
enum class EMyEnum : uint8
{
BranchA,
BranchB
};
UFUNCTION(BlueprintCallable, Category = "Stuff", Meta = (ExpandEnumAsExecs = "Branches"))
void DoSomeBranch(int32 SomeInput, TEnumAsByte<EMyEnum>& Branches)
// in the .cpp file
void AMyClass::DoSomeBranch(int32 SomeInput, TEnumAsByte<EMyEnum>& Branches)
{
if (SomeInput == 1)
{
Branches = EMyEnum::BranchA;
}
else
{
Branches = EMyEnum::BranchB;
}
}
Even in cpp you could check the enum out param and switch on that for "multiple return" nodes.
The text was updated successfully, but these errors were encountered:
Currently the
DecodeJson
function needs an already pre constructed json object as an input parameter. However this method should be static, take just an input string and return the decoded json object for the user to store. In addition the function should also have two execute node instead of a boolean return node.This changes would make for cleaner, more concise and less cluttered code, especially in blueprints.
P.S. You create multiple execute nodes for blueprints like this:
Even in cpp you could check the enum
out
param and switch on that for "multiple return" nodes.The text was updated successfully, but these errors were encountered: