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-r21
Browse files Browse the repository at this point in the history
  • Loading branch information
ufna committed Mar 15, 2018
2 parents bf0f8e0 + d775dd8 commit 51848c8
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 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 20** (UE 4.18)
Current version: **1.1 R 21** (UE 4.18-4.19)

![SCREENSHOT](SCREENSHOT.jpg)

Expand Down
16 changes: 16 additions & 0 deletions Source/VaRestEditorPlugin/Private/VaRest_BreakJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ class FKCHandler_BreakJson : public FNodeHandlingFunctor

FBPTerminal **Target = Context.NetMap.Find(Pin);

#if ENGINE_MINOR_VERSION >= 19
const FName &FieldName = Pin->PinName;
const FName &FieldType = Pin->PinType.PinCategory;
#else
const FString &FieldName = Pin->PinName;
const FString &FieldType = Pin->PinType.PinCategory;
#endif

FBPTerminal* FieldNameTerm = Context.CreateLocalTerminal(ETerminalSpecification::TS_Literal);
FieldNameTerm->Type.PinCategory = CompilerContext.GetSchema()->PC_String;
Expand All @@ -69,8 +74,14 @@ class FKCHandler_BreakJson : public FNodeHandlingFunctor
#else
FieldNameTerm->Source = Pin;
#endif

#if ENGINE_MINOR_VERSION >= 19
FieldNameTerm->Name = FieldName.ToString();
FieldNameTerm->TextLiteral = FText::FromName(FieldName);
#else
FieldNameTerm->Name = FieldName;
FieldNameTerm->TextLiteral = FText::FromString(FieldName);
#endif

FBlueprintCompiledStatement& Statement = Context.AppendStatementForNode(Node);
FName FunctionName;
Expand Down Expand Up @@ -264,7 +275,12 @@ void UVaRest_BreakJson::CreateProjectionPins(UEdGraphPin *Source)

for (TArray<FVaRest_NamedType>::TIterator it(Outputs); it; ++it)
{
#if ENGINE_MINOR_VERSION >= 19
FName Type;
#else
FString Type;
#endif

UObject *Subtype = nullptr;
FString FieldName = (*it).Name;

Expand Down
20 changes: 19 additions & 1 deletion Source/VaRestPlugin/Private/VaRestJsonObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,24 @@ void UVaRestJsonObject::SetObjectArrayField(const FString& FieldName, const TArr
int32 UVaRestJsonObject::DeserializeFromUTF8Bytes(const ANSICHAR* Bytes, int32 Size)
{
FJSONReader Reader;


#if ENGINE_MINOR_VERSION >= 19
// Get destLen
int32 DestinationLength = FUTF8ToTCHAR_Convert::ConvertedLength(Bytes, Size);
TCHAR* DestinationBuffer = new TCHAR[DestinationLength];

// CONVERT to TCHAR string
FUTF8ToTCHAR_Convert::Convert(DestinationBuffer, DestinationLength, Bytes, Size);

int32 i = 0;
while (i < DestinationLength)
{
if (!Reader.Read(DestinationBuffer[i++]))
{
break;
}
}
#else
const ANSICHAR* EndByte = Bytes + Size;
while (Bytes < EndByte)
{
Expand All @@ -564,6 +581,7 @@ int32 UVaRestJsonObject::DeserializeFromUTF8Bytes(const ANSICHAR* Bytes, int32 S
break;
}
}
#endif

SetRootObject(Reader.State.Root);
return Reader.State.Size;
Expand Down
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" : 20,
"VersionName" : "1.1-r20",
"Version" : 21,
"VersionName" : "1.1-r21",
"CreatedBy" : "Vladimir Alyamkin",
"CreatedByURL" : "http://alyamkin.com",
"EngineVersion" : "4.18.0",
"EngineVersion" : "4.19.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 51848c8

Please sign in to comment.