new cpp branch

This commit is contained in:
2020-07-29 13:19:45 +05:00
parent b39c0d1126
commit 1651dbd7e3
10 changed files with 118 additions and 0 deletions
Binary file not shown.
Binary file not shown.
+15
View File
@@ -0,0 +1,15 @@
using UnrealBuildTool;
using System.Collections.Generic;
public class URATarget : TargetRules
{
public URATarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "URA" } );
}
}
+17
View File
@@ -0,0 +1,17 @@
#include "JsonSaver.h"
#include "Misc/FileHelper.h"
#include "Misc/Paths.h"
bool UJsonSaver::SaveJson(FString Savetext)
{
// get path game directory
// name file "DeviceID.txt"
FString path = FPaths::ConvertRelativePathToFull(FPaths::GameDir()) + "..\\stats.json";
return FFileHelper::SaveStringToFile(Savetext, *path);
}
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "JsonSaver.generated.h"
/**
*
*/
UCLASS()
class URA_API UJsonSaver : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "save")
// create a txt file and write to it device id
static bool SaveJson(FString Savetext);
};
+23
View File
@@ -0,0 +1,23 @@
using UnrealBuildTool;
public class URA : ModuleRules
{
public URA(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}
+6
View File
@@ -0,0 +1,6 @@
#include "URA.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, URA, "URA" );
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include "CoreMinimal.h"
+15
View File
@@ -0,0 +1,15 @@
using UnrealBuildTool;
using System.Collections.Generic;
public class URAEditorTarget : TargetRules
{
public URAEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "URA" } );
}
}
+15
View File
@@ -4,6 +4,16 @@
"Category": "",
"Description": "",
"Enterprise": true,
"Modules": [
{
"Name": "URA",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine"
]
}
],
"Plugins": [
{
"Name": "OculusVR",
@@ -142,6 +152,11 @@
{
"Name": "MeshEditor",
"Enabled": true
},
{
"Name": "BlueprintJson",
"Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/f837e4835fbc434a853fe1ead2410b84"
}
],
"TargetPlatforms": [