diff --git a/Content/Blueprints/Zone/zone.uasset b/Content/Blueprints/Zone/zone.uasset new file mode 100644 index 00000000..854e8d93 Binary files /dev/null and b/Content/Blueprints/Zone/zone.uasset differ diff --git a/Content/Level/Index.umap b/Content/Level/Index.umap index 92266aad..97a3473b 100644 Binary files a/Content/Level/Index.umap and b/Content/Level/Index.umap differ diff --git a/Source/URA.Target.cs b/Source/URA.Target.cs new file mode 100644 index 00000000..34e051ad --- /dev/null +++ b/Source/URA.Target.cs @@ -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" } ); + } +} diff --git a/Source/URA/Private/JsonSaver.cpp b/Source/URA/Private/JsonSaver.cpp new file mode 100644 index 00000000..969eb1fa --- /dev/null +++ b/Source/URA/Private/JsonSaver.cpp @@ -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); +} diff --git a/Source/URA/Public/JsonSaver.h b/Source/URA/Public/JsonSaver.h new file mode 100644 index 00000000..d16bdac1 --- /dev/null +++ b/Source/URA/Public/JsonSaver.h @@ -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); + +}; diff --git a/Source/URA/URA.Build.cs b/Source/URA/URA.Build.cs new file mode 100644 index 00000000..224c57fb --- /dev/null +++ b/Source/URA/URA.Build.cs @@ -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 + } +} diff --git a/Source/URA/URA.cpp b/Source/URA/URA.cpp new file mode 100644 index 00000000..ffbaaf15 --- /dev/null +++ b/Source/URA/URA.cpp @@ -0,0 +1,6 @@ + + +#include "URA.h" +#include "Modules/ModuleManager.h" + +IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, URA, "URA" ); diff --git a/Source/URA/URA.h b/Source/URA/URA.h new file mode 100644 index 00000000..1c29de34 --- /dev/null +++ b/Source/URA/URA.h @@ -0,0 +1,6 @@ + + +#pragma once + +#include "CoreMinimal.h" + diff --git a/Source/URAEditor.Target.cs b/Source/URAEditor.Target.cs new file mode 100644 index 00000000..567511de --- /dev/null +++ b/Source/URAEditor.Target.cs @@ -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" } ); + } +} diff --git a/URA.uproject b/URA.uproject index b3f3fb33..5060c913 100644 --- a/URA.uproject +++ b/URA.uproject @@ -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": [