new cpp branch
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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" } );
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
};
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
#include "URA.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, URA, "URA" );
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
@@ -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" } );
|
||||
}
|
||||
}
|
||||
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user