Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MasterTestProjekt
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
MasterTestProjekt
Commits
3bda5499
Commit
3bda5499
authored
Feb 28, 2017
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json parsen
parent
a0e972c5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
DefaultEngine.ini
Config/DefaultEngine.ini
+1
-2
MasterTestProject.Build.cs
Source/MasterTestProject/MasterTestProject.Build.cs
+1
-1
MasterTestProjectGameModeBase.cpp
Source/MasterTestProject/MasterTestProjectGameModeBase.cpp
+23
-0
MasterTestProjectGameModeBase.h
Source/MasterTestProject/MasterTestProjectGameModeBase.h
+4
-2
No files found.
Config/DefaultEngine.ini
View file @
3bda5499
...
@@ -67,7 +67,7 @@ bOffsetPlayerGamepadIds=False
...
@@ -67,7 +67,7 @@ bOffsetPlayerGamepadIds=False
GameInstanceClass
=
/Script/Engine.GameInstance
GameInstanceClass
=
/Script/Engine.GameInstance
GameDefaultMap
=
/Game/MobileStarterContent/Maps/Minimal_Default.Minimal_Default
GameDefaultMap
=
/Game/MobileStarterContent/Maps/Minimal_Default.Minimal_Default
ServerDefaultMap
=
/Engine/Maps/Entry.Entry
ServerDefaultMap
=
/Engine/Maps/Entry.Entry
GlobalDefaultGameMode
=
/Script/MasterTestProject.MasterTestProjectGameMode
GlobalDefaultGameMode
=
/Script/MasterTestProject.MasterTestProjectGameMode
Base
GlobalDefaultServerGameMode
=
None
GlobalDefaultServerGameMode
=
None
[/Script/HardwareTargeting.HardwareTargetingSettings]
[/Script/HardwareTargeting.HardwareTargetingSettings]
...
@@ -76,4 +76,3 @@ AppliedTargetedHardwareClass=Mobile
...
@@ -76,4 +76,3 @@ AppliedTargetedHardwareClass=Mobile
DefaultGraphicsPerformance
=
Scalable
DefaultGraphicsPerformance
=
Scalable
AppliedDefaultGraphicsPerformance
=
Scalable
AppliedDefaultGraphicsPerformance
=
Scalable
Source/MasterTestProject/MasterTestProject.Build.cs
View file @
3bda5499
...
@@ -20,7 +20,7 @@ public class MasterTestProject : ModuleRules
...
@@ -20,7 +20,7 @@ public class MasterTestProject : ModuleRules
public
MasterTestProject
(
TargetInfo
Target
)
public
MasterTestProject
(
TargetInfo
Target
)
{
{
PublicDependencyModuleNames
.
AddRange
(
new
string
[]
{
"Core"
,
"CoreUObject"
,
"Engine"
,
"InputCore"
,
"ImageWrapper"
,
"RawMesh"
,
"ProceduralMeshComponent"
});
PublicDependencyModuleNames
.
AddRange
(
new
string
[]
{
"Core"
,
"CoreUObject"
,
"Engine"
,
"InputCore"
,
"ImageWrapper"
,
"RawMesh"
,
"
Json"
,
"
ProceduralMeshComponent"
});
PrivateDependencyModuleNames
.
AddRange
(
new
string
[]
{
});
PrivateDependencyModuleNames
.
AddRange
(
new
string
[]
{
});
...
...
Source/MasterTestProject/MasterTestProjectGameModeBase.cpp
View file @
3bda5499
// Fill out your copyright notice in the Description page of Project Settings.
// Fill out your copyright notice in the Description page of Project Settings.
#include "MasterTestProject.h"
#include "MasterTestProject.h"
#include "JsonReader.h"
#include "MasterTestProjectGameModeBase.h"
#include "MasterTestProjectGameModeBase.h"
void
AMasterTestProjectGameModeBase
::
InitGame
(
const
FString
&
MapName
,
const
FString
&
Options
,
FString
&
ErrorMessage
)
{
Super
::
InitGame
(
MapName
,
Options
,
ErrorMessage
);
FString
file
=
"D:
\\
Dropbox
\\
Studium
\\
MasterArbeit
\\
3d-tiles
\\
examples
\\
tileset.json"
;
FString
JsonRaw
=
""
;
FFileHelper
::
LoadFileToString
(
JsonRaw
,
*
file
);
UE_LOG
(
GLTF
,
Log
,
TEXT
(
"Loading file %s"
),
*
file
);
//UE_LOG(GLTF, Warning, TEXT("LangFile: \n %s"), *JsonRaw);
TSharedPtr
<
FJsonObject
>
JsonParsed
;
TSharedRef
<
TJsonReader
<
TCHAR
>>
JsonReader
=
TJsonReaderFactory
<
TCHAR
>::
Create
(
JsonRaw
);
if
(
FJsonSerializer
::
Deserialize
(
JsonReader
,
JsonParsed
))
{
FString
ExampleString
=
JsonParsed
->
GetStringField
(
"geometricError"
);
UE_LOG
(
GLTF
,
Warning
,
TEXT
(
"Example:
\n
%s"
),
*
ExampleString
);
}
}
Source/MasterTestProject/MasterTestProjectGameModeBase.h
View file @
3bda5499
...
@@ -13,8 +13,10 @@ UCLASS()
...
@@ -13,8 +13,10 @@ UCLASS()
class
MASTERTESTPROJECT_API
AMasterTestProjectGameModeBase
:
public
AGameModeBase
class
MASTERTESTPROJECT_API
AMasterTestProjectGameModeBase
:
public
AGameModeBase
{
{
GENERATED_BODY
()
GENERATED_BODY
()
public
:
virtual
void
InitGame
(
const
FString
&
MapName
,
const
FString
&
Options
,
FString
&
ErrorMessage
);
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment