Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Finish v1.1-r25
Browse files Browse the repository at this point in the history
  • Loading branch information
ufna committed Nov 12, 2018
2 parents 7bb2ccd + f96f8d1 commit 9d10e6a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Key features:

Check the [Wiki](https://hiazma.atlassian.net/wiki/display/VAR) for plugin usage examples and installation notes.

Current version: **1.1 R 24** (UE 4.20)
Current version: **1.1 R 25** (UE 4.21)

![SCREENSHOT](SCREENSHOT.jpg)

Expand Down
12 changes: 8 additions & 4 deletions Source/VaRestEditorPlugin/Private/VaRest_BreakJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void UVaRest_BreakJson::AllocateDefaultPins()
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

UClass *Class = Cast<UClass>(StaticLoadObject(UClass::StaticClass(), NULL, TEXT("class'VaRestPlugin.VaRestJsonObject'")));
UEdGraphPin* Pin = CreatePin(EGPD_Input, K2Schema->PC_Object, TEXT(""), Class, false, false, TEXT("Target"));
UEdGraphPin* Pin = CreatePin(EGPD_Input, K2Schema->PC_Object, TEXT(""), Class, TEXT("Target"));

#if ENGINE_MINOR_VERSION >= 17
K2Schema->SetPinAutogeneratedDefaultValueBasedOnType(Pin);
Expand Down Expand Up @@ -299,7 +299,9 @@ void UVaRest_BreakJson::CreateProjectionPins(UEdGraphPin *Source)
break;
}

UEdGraphPin *OutputPin = CreatePin(EGPD_Output, Type, TEXT(""), Subtype, (*it).bIsArray, false, (*it).Name);
UEdGraphNode::FCreatePinParams OutputPinParams;
OutputPinParams.ContainerType = (*it).bIsArray ? EPinContainerType::Array : EPinContainerType::None;
UEdGraphPin *OutputPin = CreatePin(EGPD_Output, Type, TEXT(""), Subtype, FName(*(*it).Name), OutputPinParams);
}
}

Expand Down Expand Up @@ -488,7 +490,7 @@ void UVaRest_MakeJson::AllocateDefaultPins()
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

UClass *Class = Cast<UClass>(StaticLoadObject(UClass::StaticClass(), NULL, TEXT("class'VaRestPlugin.VaRestJsonObject'")));
UEdGraphPin* Pin = CreatePin(EGPD_Output, K2Schema->PC_Object, TEXT(""), Class, false, false, TEXT("Target"));
UEdGraphPin* Pin = CreatePin(EGPD_Output, K2Schema->PC_Object, TEXT(""), Class, TEXT("Target"));

#if ENGINE_MINOR_VERSION >= 17
K2Schema->SetPinAutogeneratedDefaultValueBasedOnType(Pin);
Expand Down Expand Up @@ -586,7 +588,9 @@ void UVaRest_MakeJson::CreateProjectionPins(UEdGraphPin *Source)
break;
}

UEdGraphPin *InputPin = CreatePin(EGPD_Input, Type, TEXT(""), Subtype, (*it).bIsArray, false, (*it).Name);
UEdGraphNode::FCreatePinParams InputPinParams;
InputPinParams.ContainerType = (*it).bIsArray ? EPinContainerType::Array : EPinContainerType::None;
UEdGraphPin *InputPin = CreatePin(EGPD_Input, Type, TEXT(""), Subtype, FName(*(*it).Name), InputPinParams);
InputPin->SetSavePinIfOrphaned(false);
}
}
Expand Down
17 changes: 10 additions & 7 deletions Source/VaRestPlugin/Private/VaRestRequestJSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ void UVaRestRequestJSON::OnProcessRequestComplete(FHttpRequestPtr Request, FHttp
return;
}

#if !(PLATFORM_IOS || PLATFORM_ANDROID)
#if PLATFORM_DESKTOP
// Log response state
UE_LOG(LogVaRest, Log, TEXT("Response (%d): %sJSON(%s%s%s)JSON"), ResponseCode, LINE_TERMINATOR, LINE_TERMINATOR, *Response->GetContentAsString(), LINE_TERMINATOR);
#endif
Expand Down Expand Up @@ -504,17 +504,20 @@ void UVaRestRequestJSON::OnProcessRequestComplete(FHttpRequestPtr Request, FHttp
}
}

// Broadcast the result event
OnRequestComplete.Broadcast(this);
OnStaticRequestComplete.Broadcast(this);
// Broadcast the result events on next tick
AsyncTask(ENamedThreads::GameThread, [this]()
{
OnRequestComplete.Broadcast(this);
OnStaticRequestComplete.Broadcast(this);
});

// Finish the latent action
if (ContinueAction)
{
FVaRestLatentAction<UVaRestJsonObject*> *K = ContinueAction;
ContinueAction = nullptr;
FVaRestLatentAction<UVaRestJsonObject*> *K = ContinueAction;
ContinueAction = nullptr;

K->Call(ResponseJsonObj);
K->Call(ResponseJsonObj);
}
}

Expand Down
12 changes: 6 additions & 6 deletions Source/VaRestPlugin/VaRestPlugin.Build.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2014 Vladimir Alyamkin. All Rights Reserved.
// Copyright 2014-2018 Vladimir Alyamkin. All Rights Reserved.

using System.IO;

Expand All @@ -8,9 +8,9 @@ public class VaRestPlugin : ModuleRules
{
public VaRestPlugin(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PrivateIncludePaths.AddRange(
PrivateIncludePaths.AddRange(
new string[] {
"VaRestPlugin/Private",
// ... add other private include paths required here ...
Expand All @@ -22,10 +22,10 @@ public VaRestPlugin(ReadOnlyTargetRules Target) : base(Target)
"Core",
"CoreUObject",
"Engine",
"HTTP",
"Json"
"HTTP",
"Json"
// ... add other public dependencies that you statically link with here ...
});
}
}
}
}
6 changes: 3 additions & 3 deletions VaRestPlugin.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"FileVersion" : 3,

"FriendlyName" : "VaRest",
"Version" : 24,
"VersionName" : "1.1-r24",
"Version" : 25,
"VersionName" : "1.1-r25",
"CreatedBy" : "Vladimir Alyamkin",
"CreatedByURL" : "http://alyamkin.com",
"EngineVersion" : "4.20.0",
"EngineVersion" : "4.21.0",
"Description" : "Plugin that makes REST (JSON) server communication easy to use",
"Category" : "Network",
"MarketplaceURL" : "com.epicgames.launcher://ue/marketplace/content/e47be161e7a24e928560290abd5dcc4f",
Expand Down

0 comments on commit 9d10e6a

Please sign in to comment.