Skip to content

Instantly share code, notes, and snippets.

View TripleEh's full-sized avatar
💭
Knee sliding into the party.

Gareth Noyce TripleEh

💭
Knee sliding into the party.
View GitHub Profile
### Keybase proof
I hereby claim:
* I am tripleeh on github.
* I am garethnoyce (https://keybase.io/garethnoyce) on keybase.
* I have a public key ASCaSfQKq3R_910N6vs0fVs-rI6ZR2m8HhgTh04e-FgECQo
To claim this, I am signing this object:
FString sFullPath = FPaths::ProjectSavedDir() + _sDevNotesFilename;
if (FPlatformFileManager::Get().GetPlatformFile().FileExists(*sFullPath))
{
UDbg::LOG_INFO("UDevNote::Init: Found Dev Notes Json File");
FString FileString;
FFileHelper::LoadFileToString(FileString, *sFullPath);
TSharedPtr<FJsonObject> RootJson = NULL;
TSharedRef<TJsonReader<>> JsonReader = TJsonReaderFactory<>::Create(FileString);
// Create a root JSon object that'll hold all the sub sections
TSharedRef<FJsonObject> RootJson = MakeShareable(new FJsonObject);
// Output the contents of the DevNotes arrays
{
for (int i = 0; i < m_aNoteContents.Num(); ++i)
{
TSharedRef<FJsonObject> SubJson = MakeShareable(new FJsonObject);
SubJson->SetNumberField(TEXT("X"), m_aNotePositions[i].X);
SubJson->SetNumberField(TEXT("Y"), m_aNotePositions[i].Y);
@TripleEh
TripleEh / gist:4e274ff7336ecade5e286d3321869819
Last active March 2, 2018 17:04
Code snippets for my blog
PublicDependencyModuleNames.AddRange(new string[] { ... "Json", "JsonUtilities" });