# Using Microsoft Visual Code to add Assets?

**URL:** <https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [September 4, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736 "2015-09-04T16:53:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shrooblord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shrooblord/32/88712_2.png) [@Shrooblord](https://forums.unrealengine.com/u/Shrooblord)\
**Post date:** [September 4, 2015, 4:53pm UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736/1 "2015-09-04T16:53:46Z")

</div>

Hey forum,

I’ve been wanting to find a way to load XML data so I’ve been looking around and came across some useful file system resources like  
[https://answers.unrealengine.com/questions/120392/how-can-i-load-text-from-file-with-blueprint.html](https://answers.unrealengine.com/questions/120392/how-can-i-load-text-from-file-with-blueprint.html)  
[https://wiki.unrealengine.com/Save\_System](https://wiki.unrealengine.com/Save_System),_Read_%26\_Write\_Any\_Data\_to\_Compressed\_Binary\_Files#Loading  
[FXmlFile | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/API/Runtime/XmlParser/FXmlFile/index.html)

And so I created a simple replica of what I saw there, which is this:  
MyBlueprintFunctionLibrary.h

```auto

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"

UCLASS()
class T_FILE_LOAD_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
		UFUNCTION(BlueprintCallable, Category = "save")
		static bool FileSaveString(FString SaveTextB, FString FileNameB);
		
	UFUNCTION(BlueprintPure, Category = "save")
		static bool FileLoadString(FString FilenameA, FString& SaveTextA);	
}

```

and  
MyBlueprintFunctionLibrary.cpp

```auto

#include "FTL_Overdrive.h"
#include "MyBlueprintFunctionLibrary.h"

bool UMyBlueprintFunctionLibrary::FileSaveString(FString SaveTextB, FString FileNameB)
{
	return FFileHelper::SaveStringToFile(SaveTextB, *(FPaths::GameDir() + FileNameB));
}

bool UMyBlueprintFunctionLibrary::FileLoadString(FString FileNameA, FString& SaveTextA)
{
	return FFileHelper::LoadFileToString(SaveTextA, *(FPaths::GameDir() + FileNameA));
}

```

However, running on Mac OSX, I’ve been using [Microsoft Visual Studio Code](https://code.visualstudio.com/) as opposed to the regular Visual Studio. The problem with Code is that it doesn’t seem to have the same sort of compiler functionality as Visual Studio has. It has ‘build’ though. So I run a build task with the .Build.cs file selected and I see some status icon flicker in the bottom-hand status bar, presumably saying “I’m building now”.

But I don’t know what it’s done at this point. When I open the Unreal Editor, there are no Blueprints to be found by typing in ‘save’ or ‘text’ or ‘file’ that were any different from the ones that came with the Editor. I’ve tried restarting the Editor too.

What is it I’m supposed to do to get my C++ code integrated into the Editor as a Blueprint?

Sorry, total C++ and Unreal coding noob - experienced programmer though so you can throw crazy coding jargon my way without worrying to confuse me. 😛

---

<div class="post-metadata">

**Author:** ![Shrooblord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shrooblord/32/88712_2.png) [@Shrooblord](https://forums.unrealengine.com/u/Shrooblord)\
**Post date:** [September 5, 2015, 8:42am UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736/2 "2015-09-05T08:42:14Z")

</div>

How do you normally build code? What is it you’re building?

Do I need to include some Engine assets to get my code integrated?

---

<div class="post-metadata">

**Author:** ![enlight\_2014](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@enlight\_2014](https://forums.unrealengine.com/u/enlight_2014)\
**Post date:** [September 6, 2015, 7:38am UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736/3 "2015-09-06T07:38:09Z")

</div>

Visual Studio Code doesn’t ship with a C/C++ compiler toolchain. On Mac you’d build your project with XCode, the basics are covered in the [Quick Start](https://docs.unrealengine.com/latest/INT/Programming/QuickStart/index.html)

---

<div class="post-metadata">

**Author:** ![Shrooblord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shrooblord/32/88712_2.png) [@Shrooblord](https://forums.unrealengine.com/u/Shrooblord)\
**Post date:** [September 6, 2015, 10:54pm UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736/4 "2015-09-06T22:54:41Z")

</div>

Thanks. I’ve been trying to compile my code in XCode, but have been [running into some issues](https://answers.unrealengine.com/questions/120392/how-can-i-load-text-from-file-with-blueprint.html#answer-297352).

XCode doesn’t seem to like my class definitions. Is there any chance you could spot what I’ve done wrong?

 ![Screen Shot 2015-09-05 at 11.42.43.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/0/700cc16c6ad19577cbb3ee49d83a88534db41e4e.png)  
 ![Screen Shot 2015-09-05 at 11.42.43.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/3/003c0aa263de534d70e3622d6334d3596592dc44.png)

---

<div class="post-metadata">

**Author:** ![enlight\_2014](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@enlight\_2014](https://forums.unrealengine.com/u/enlight_2014)\
**Post date:** [September 7, 2015, 4:54am UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736/5 "2015-09-07T04:54:15Z")

</div>

1. Your constructor and destructor definitions in the .cpp refer to a MyBlueprintFunctionLibrary, there is no such thing, as per the .h it’s supposed to be **U** MyBlueprintFunctionLibrary. Unless you actually need a constructor/destructor remove them entirely.
2. T\_LOAD\_IT\_API should probably be FTL\_OVERDRIVE\_API as that macro is generated from the project name.

---

<div class="post-metadata">

**Author:** ![Shrooblord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shrooblord/32/88712_2.png) [@Shrooblord](https://forums.unrealengine.com/u/Shrooblord)\
**Post date:** [September 11, 2015, 6:28pm UTC](https://forums.unrealengine.com/t/using-microsoft-visual-code-to-add-assets/40736/6 "2015-09-11T18:28:42Z")

</div>

Thanks enlight. Whereas the screenshots above don’t seem to suggest this, those are both things I already tried. The results are the same.

But I will remove the constructor and destructor; they were only added there because Unreal put them there as it created the C++ code.

Any other ideas on what may be amiss here?
