# Scripting Language extensions via plugins

**URL:** <https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code, GitHub, Engine-Source-GitHub\
**Created:** [April 30, 2014, 11:55am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542 "2014-04-30T11:55:21Z")\
**Posts on this page:** 20\
**Page:** 9

<div class="post-metadata">

**Author:** ![iggyvolz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iggyvolz](https://forums.unrealengine.com/u/iggyvolz)\
**Post date:** [November 29, 2014, 6:57pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/164 "2014-11-29T18:57:18Z")

</div>

> [@;174522](#):
>
> Can anyone please post a basic tutorial of how to use this thing ? this is very vague…

Yes, please.

The instructions are basically: “Copy the Lua source code into a folder (which I think I did right), and then this code goes at some place and does some stuff because some thing.”

---

<div class="post-metadata">

**Author:** ![MackeyK24](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MackeyK24](https://forums.unrealengine.com/u/MackeyK24)\
**Post date:** [December 21, 2014, 4:59am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/165 "2014-12-21T04:59:26Z")

</div>

Im sorry for the real newbie question… But how do you actually use the ScriptPLugin

I see all kinda post about how cool the script plugin is…

BUT… im so new … i dont see ANYWHERE that explains how to actually use the script plugin. Is it just me?

First off… Am i supposed to make a copy of the how scriptplugin and change it to be my own, kinda how blankplugin works…

or does it expose some kind of API that i code from or what?

I have made many mods to the CryMono for CryEngine3… We normally mod the engine code directly… Cool deal… there is a main  
init function in the c++ engine that i mono\_init up stuff… Then it basically mirrors all the “LUA” scriptcontext calls with monoscriptcontext  
equivalent calls if this is a mono script and not lua script… Works great in CryEngine/CryMono.

After coming to Ue4… i did not want to go mod the engine directly (Like MonoUnrealEngine had to for its 4.4 preview).

I was hoping the ScriptPlugin provides some kind of API to expose all the blueprint stuff so i can then make mono\_add\_internal wrappers for.

I realize Others are try to do the same (mektek and muchdifferent)… BUT they are taking too long to get something out… anything… and  
i need to be working on it now… cant wait any longer… i must attempt it myself… But cant find ANY docs on actually using the ScriptPlugin  
to implement my own scripting language.

Please Help… Anyone… Any Explanations !!!

> [@;25369](#):
>
> Hey guys, I wanted to share with you what I’ve been working on recently: as some of you have [already noticed](https://forums.unrealengine.com/showthread.php?3886-Support-for-scrpting-integration-via-plugin-with-lua-experimental-plug-in-is-coming), I did a few check-ins into the master branch with plugins that should make life easier for anyone who wants to add their own scripting language integration to the engine. There’s even experimental Lua support as an example how to use/extend those plugins.
> 
> The main goal behind this is to provide a common entry point for anyone who wants to add scripting support to UE4 without having to modify the engine itself. It also shows how to use UE4 reflection system to automatically generate C++ glue code.
> 
> The basic principles how it all works are quite simple:
> 
> There’s 3 plugins:
> 
> - \*\*ScriptGeneratorPlugin \*\*(SGP) - this is used to extend UnrealHeaderTool (UHT) functionality and generate scripting language C++ glue code using classes already generated by UHT.
> 
> - \*\*ScriptPlugin \*\*(SP) - this is the main Engine-side plugin. This is where the glue generated by SGP is going to be compiled. Cool thing about this is that you don’t really need to include any generated code there, it’s automatically picked up by UBT! All you need to do there is to link it with the scripting language library you want to use and provide functions you might have used in SGP-generated code + maybe some additional script-specific code with helper functions etc.  
> It also defines:
> 
> - \*UScriptComponent \*- contains the main entry point of execution for the scripts. More about that later.
> 
> - \*UScriptAsset \*- this where the script source/byte code goes and is read/compiled from
> 
> - \*\*ScriptEditorPlugin \*\*(SEP) - editor-side plugin, it’s very simple and it’s main purpose is to provide editor factories for importing scripts into UScriptAssets.
> 
> When writing this, I used Lua as proof-of-concept integration. If you want to test how it works, the only thing you need to do is to download Lua source code and copy the entire lua-5.2.3 folder (except luac.c) into Engine/Plugins/Script/ScriptPlugin/Source/ScriptPlugin, then re-generate projects and compile the engine. UBT should automatically pick this up and enable Lua integration. Note that I’m not a Lua expert and I used it because it was free/cross-platform/open and quite easy to get started with. I bet there’s people with more Lua knowledge in the community who can point out all the mistakes I did, please do!
> 
> So the idea behind UScriptComponent is that you can add it any actor and assign a UScriptAsset to it in the editor. It then initializes scripting in UScriptComponent::OnRegister(), ‘ticks’ scripts in UScriptComponent::Tick() and calls destroys script objects inside UScriptComponent::OnUnregister(). It assumes there’s pre-defined functions declared in script: Tick() and Destroy() which are called in UScriptComponent::Tick() and ::OnUnregister() respectively. For Lua integration the global scope script is called when the script is loaded in OnRegister. At that point the script context class determines if Tick() is actually defined and if not it’s not going to bother calling it. Here’s an example how Lua script would look like (sorry it’s so brief but I didn’t have time yet to come up with more elaborate examples):
> 
> ```auto
> 
> print("Lua in UE4!")
> TickCounter = 0
> Mesh = UE.LoadObject(StaticMesh.Class(), "/Engine/EngineMeshes/ParticleCube.ParticleCube");
> function Tick()
> TickCounter = TickCounter + 1
> end
> 
> function Destroy()
> print("Destroy Lua script")
> StaticMesh.Destroy(Mesh);
> end
> 
> ```
> 
> In the default case where Lua is not enabled, SGP uses a generic script generator which exports simple wrapper functions around public class members.
> 
> We’re probably going to be polishing this in the next two weeks a little bit, we’re also working on simplifying UHT a lot so stay tuned for more updates. I’ll probably do a blog post about this in the near future too.

---

<div class="post-metadata">

**Author:** ![damody](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damody](https://forums.unrealengine.com/u/damody)\
**Post date:** [December 28, 2014, 5:50pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/166 "2014-12-28T17:50:35Z")

</div>

hello ,

I want to use lua for my project.  
It’s didn’t have any step by step tutorial, so I try it in ue4.6 by myself

I trace the c++ code what happened ?  
Then I found in your Class “ScriptFactory” & “ReimportScriptFactory” have problem  
They didn’t have implement “virtual bool FactoryCanImport(const FString& Filename);”

So your factory will can’t import the file

I hope you fix it and write a tutorial in last version.

---

<div class="post-metadata">

**Author:** ![damody](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damody](https://forums.unrealengine.com/u/damody)\
**Post date:** [December 28, 2014, 6:41pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/167 "2014-12-28T18:41:18Z")

</div>

OK I just found the method to proof lua can run in ue4.6.

first go “ScriptFactory.h”  
add

```auto

virtual bool FactoryCanImport(const FString& Filename);

```

and “ScriptFactory.cpp”  
add

```auto

bool UScriptFactory::FactoryCanImport(const FString& Filename)
{
	if (FPaths::GetExtension(Filename) == TEXT("lua"))
	{
		return true;
	}
	return false;
}

```

then write “mytest.lua”

```auto

print("Lua in UE4!")
TickCounter = 0

function Tick1()
	TickCounter = TickCounter + 1
	return TickCounter
end

```

import like  
 ![2014-12-29 03 27 38.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/b/89b3cd55479fab0e589c4e2a2aaff27a6fe5c898.png)  
choose Script Component like  
 ![2014-12-29 03 30 10.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/4/6147d596f50c03852edecab06f99efe2c30753aa.png)  
and your Content Browser like  
 ![2014-12-29 03 31 06.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/5/b55d15cd289f61a894c2852cfe9b4cb22610b3ff.png)  
Create a “Actor” Blueprint like  
 ![2014-12-29 03 32 19.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/1/d17286ffdd1d6258464abfadc5619a942eba8eda.png)  
in this blueprint add Component choose mytest like  
 ![2014-12-29 03 33 34.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/9/7930892848936c8f6e0e48aa2e55aa1d94ca1d90.png)  
and the detail will have Mytest=\>TickCounter like

 ![2014-12-29 03 34 52.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/d/0d541726f18f7f8472ef0af1e6b5e48f49f141a8.png)  
go to graph make this blueprint  
you must type function name  
 ![2014-12-29 03 32 19.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/f/acfdf9658bced2aea9743219b84c7b0c368f4b14.png)  
add the blueprint into your scene like  
 ![2014-12-29 03 33 34.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/1/76181c7879f76f4e3c4e26ba6657eaec09c5fd95.png)

then play but sometime it will crash

final result like

 ![2014-12-29 03 40 52.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/b/db0ace509e925c1845e3b0951b00826491ebf5a1.png)

---

<div class="post-metadata">

**Author:** ![midix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@midix](https://forums.unrealengine.com/u/midix)\
**Post date:** [December 28, 2014, 7:50pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/168 "2014-12-28T19:50:38Z")

</div>

Hi all.

Is there any way to use blueprints themselves as dynamic scripts? I mean, to be able to save blueprints as files and hot-reload them the same way as scripts while my game is running standalone (not in the editor)? This would make it unnecessary to use some 3rd party scripting languages, libraries and editors - just compile a single blueprint, replace the file in your game or even on the server and it gets picked up and reloaded. Is it possible, and if not, is it doable or maybe even planned for the future?

---

<div class="post-metadata">

**Author:** ![damody](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damody](https://forums.unrealengine.com/u/damody)\
**Post date:** [December 31, 2014, 10:42pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/169 "2014-12-31T22:42:33Z")

</div>

Hi ,

I watch the code.  
I hope you can maintain this plugin, and give us some example with picture.

I know the “ScriptGeneratorPlugin” is very epic design.  
It can auto generate function, porting from c++ to script(like lua).

but in html5 I have problem

first I use emscripten to build static library lua.bc for html5  
then I modify ScriptPlugin.Build.cs to add rules for lua.bc like

```auto

else if (Target.Platform == UnrealTargetPlatform.HTML5)
                {
                    var LuaPath = Path.Combine("..", "Plugins", "ScriptPlugin", "Source", "Lua");
                    var LuaLibDirectory = Path.Combine(LuaPath, "Lib", "HTML5");
                    var LuaLibPath = Path.Combine(LuaLibDirectory, "lua.bc");
                    if (File.Exists(LuaLibPath))
                    {
                        Definitions.Add("WITH_LUA=1");
                        // Path to Lua include files
                        var IncludePath = Path.GetFullPath(Path.Combine(LuaPath, "Include"));
                        PrivateIncludePaths.Add(IncludePath);
                        // Lib file
                        PublicLibraryPaths.Add(LuaLibDirectory);
                        PublicAdditionalLibraries.Add(LuaLibPath);
                        Log.TraceVerbose("LUA Integration enabled: {0}", IncludePath);
                    }
                    else
                    {
                        Log.TraceVerbose("LUA Integration NOT enabled");
                    }
                }

```

then I compile ok. it gererate js and html file but get runtime error  
ok I find the answer  
I just forget compile some source file.

I upload lua.bc for anyone need html5 for lua use.  
just rename lua.bc.txt to lua.bc.  
I test in html5 it’s fine.

---

<div class="post-metadata">

**Author:** ![damody](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damody](https://forums.unrealengine.com/u/damody)\
**Post date:** [January 16, 2015, 8:53am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/170 "2015-01-16T08:53:22Z")

</div>

I found the problem of ScriptGeneratorPlugin  
the cpp parser is not implement complete  
so many function can’t call

I combined Zerobrane to debug lua  
it’s fine, but many class lack most function

it’s big problem for ScriptGeneratorPlugin  
it’s mean most function you can’t use in lua

it’s ignore function if not ufunction

---

<div class="post-metadata">

**Author:** ![TechLord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techlord/32/1040563_2.png) [@TechLord](https://forums.unrealengine.com/u/TechLord)\
**Post date:** [March 22, 2015, 7:53pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/172 "2015-03-22T19:53:29Z")

</div>

Seeking Tutorial on how to use this feature from Blueprints (without using C++). Any direction will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [March 23, 2015, 10:58am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/173 "2015-03-23T10:58:24Z")

</div>

> [@damody;206512](#):
>
> I found the problem of ScriptGeneratorPlugin  
> the cpp parser is not implement complete  
> so many function can’t call
> 
> I combined Zerobrane to debug lua  
> it’s fine, but many class lack most function
> 
> it’s big problem for ScriptGeneratorPlugin  
> it’s mean most function you can’t use in lua

Hi damody,

Yes, there’s still work to be done regarding structs etc, so you are right that not all functions can be exported.

> [@damody;206512](#):
>
> it’s ignore function if not ufunction

Do you mean it will ignore functions that are not UFUNCTIONS? If so, then yes and it will probably never change.

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [March 23, 2015, 11:01am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/174 "2015-03-23T11:01:02Z")

</div>

> [@TechLord;254112](#):
>
> Seeking Tutorial on how to use this feature from Blueprints (without using C++). Any direction will be greatly appreciated.

Hi TechLord,

Currently you will always need source for the engine as pre-built binaries are not integrated with Lua (you need Lua source code in the ScriptPlugin folder and then re-build everything to make it work). After that you can use it from blueprints as the way the plugin works is it creates blueprint classes from Lua scripts with the ability to execute Lua code instead of UE script (a.k.a. blueprints).

---

<div class="post-metadata">

**Author:** ![TechLord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techlord/32/1040563_2.png) [@TechLord](https://forums.unrealengine.com/u/TechLord)\
**Post date:** [March 23, 2015, 1:35pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/175 "2015-03-23T13:35:39Z")

</div>

> [@;254635](#):
>
> Hi TechLord,
> 
> Currently you will always need source for the engine as pre-built binaries are not integrated with Lua (you need Lua source code in the ScriptPlugin folder and then re-build everything to make it work). After that you can use it from blueprints as the way the plugin works is it creates blueprint classes from Lua scripts with the ability to execute Lua code instead of UE script (a.k.a. blueprints).

Hello , Thank you for taking time to clarify this feature.

---

<div class="post-metadata">

**Author:** ![kylawl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kylawl](https://forums.unrealengine.com/u/kylawl)\
**Post date:** [March 23, 2015, 11:38pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/176 "2015-03-23T23:38:26Z")

</div>

Hi Robert,

Win64\UnrealHeaderTool-ScriptGeneratorPlugin.dll is the only plugin dll that gets included in the GitHub/Dependencies releases.

Is there a reason why this one dll always get’s in, and can it not? It we always have to delete it before dropping a new build into our P4 depot.

Thanks,

Kyle

---

<div class="post-metadata">

**Author:** ![PeteX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PeteX](https://forums.unrealengine.com/u/PeteX)\
**Post date:** [May 3, 2015, 12:00pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/177 "2015-05-03T12:00:23Z")

</div>

Hi Robert,

> [@;254635](#):
>
> Currently you will always need source for the engine as pre-built binaries are not integrated with Lua (you need Lua source code in the ScriptPlugin folder and then re-build everything to make it work).

I was wondering: would it would be possible to get the Lua code into the pre-built binaries? At the moment it’s a bit frustrating that there’s nothing between blueprints and C++. If I write in blueprints, it starts out very nice, but becomes difficult to maintain when it gets beyond a certain size. C++ is as good as it ever was, but it doesn’t offer the productivity of a scripting language. What I want is something in the middle and Lua would provide that.

---

<div class="post-metadata">

**Author:** ![Nate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nate](https://forums.unrealengine.com/u/Nate)\
**Post date:** [May 26, 2015, 4:31am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/178 "2015-05-26T04:31:04Z")

</div>

Scriptplugin compile and work in 4.7 branch, but I always got this error when comping ScriptPlugin in 4.8 branch

> [@](#):
>
> Error 1 error LNK2019: unresolved external symbol “void \_\_cdecl LuaRegisterExportedClasses(struct lua\_State \*)” (?LuaRegisterExportedClasses@@YAXPEAUlua\_State@@@Z) referenced in function “public: virtual bool \_\_cdecl FLuaContext::Initialize(class FString const &,class UObject \*)” (?Initialize@FLuaContext@@UEAA\_NAEBVFString@@PEAVUObject@@@Z)

It seems “GeneratedScriptLibraries.inl” never got generated by ScriptGeneratorPlugin. I noticed that now in 4.8, you have to enable ScriptPlugin first (FScriptGeneratorPlugin::SupportsTarget) to make ScriptGenerator happy, but even I do so, it still failed with same error.

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [May 26, 2015, 9:22am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/179 "2015-05-26T09:22:20Z")

</div>

Hi , in addition to enabling the plugin, you now also need to change this:

```auto

#if 0
#include "GeneratedScriptLibraries.inl"
#endif 

```

to this:

```auto

#if 1
#include "GeneratedScriptLibraries.inl"
#endif 

```

in ScriptPlugin.cpp. Sorry for the inconvenience, I’ll try to find some time to make it more automatic.

---

<div class="post-metadata">

**Author:** ![Nate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nate](https://forums.unrealengine.com/u/Nate)\
**Post date:** [May 26, 2015, 12:24pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/180 "2015-05-26T12:24:29Z")

</div>

Thanks Robert! I do the modification and do a full rebuild, but still get the same error. How do you debug “ScriptGeneratorPlugin” when you develop it?

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [May 26, 2015, 12:39pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/181 "2015-05-26T12:39:57Z")

</div>

Build UnrealHeaderTool in debug configuration (it needs to be just ‘debug’, not ‘debug editor’ or anything else). You can just switch you active configuration to debug to do this and build UnrealHeaderTool. Do this after you build your target project and then go to Engine\Programs\UnrealHeaderTool\Saved\Logs\UnrealHeaderTool.log and copy the command line that’s in the log (note you only need the .uproject path and .manifest path) to UnrealHeaderTool’s command line in Visual Studio project properties (Configuration Properties -\> Debugging -\> Command Arguments). The set UnrealHeaderTool as your startup project and launch it in Visual Studio. You will now be able to debug UHT as well as the plugin (if it’s loaded).

---

<div class="post-metadata">

**Author:** ![Nate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nate](https://forums.unrealengine.com/u/Nate)\
**Post date:** [May 26, 2015, 5:59pm UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/182 "2015-05-26T17:59:29Z")

</div>

Hi Robert, thanks for the debug tip! With the help of the good old debugger, it turns out there’s just one more change needed for a success ScriptPlugin 4.8 branch build:

In ScriptGeneratorPlugin.uplugin, change the “Category” from “Examples” to “UnrealHeaderTool.Code Generator.Generic”, otherwise the CodeGenerator from UHT wont be happy

---

<div class="post-metadata">

**Author:** ![robert.manuszewski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robert.manuszewski](https://forums.unrealengine.com/u/robert.manuszewski)\
**Post date:** [May 27, 2015, 10:26am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/183 "2015-05-27T10:26:48Z")

</div>

Nice find! It’s a bug then! I’ll make sure it gets fixed for official

---

<div class="post-metadata">

**Author:** ![Nate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nate](https://forums.unrealengine.com/u/Nate)\
**Post date:** [May 29, 2015, 4:35am UTC](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542/184 "2015-05-29T04:35:18Z")

</div>

@, now with latest “Fixing UHT not finding ScriptGeneratorPlugin” commit, ScriptPlugin builds fine. But when I tried to enable Paper2D binding by adding “+ScriptSupportedModules=Paper2D”, there’s error:

```auto

1>e:\dev\unreal\src\47x\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\../../../2D/Paper2D/Source/Paper2D/Public/MaterialExpressionSpriteTextureSampler.h(6): fatal error C1083: Cannot open include file: 'MaterialExpressionSpriteTextureSampler.generated.h': No such file or directory
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: e:\dev\unreal\src\47x\Engine\Plugins\ScriptPlugin\Binaries\Win64\UE4Editor-ScriptPlugin.pdb

```

In Visual Stduio project, verify “MaterialExpressionSpriteTextureSampler.generated.h” is generated in “e:\dev\unreal\src\48x\Engine\Plugins\2D\Paper2D\Intermediate\Build\Win64\UE4Editor\Inc\Paper2D\MaterialExpressionSpriteTextureSampler.generated.h”

[Previous page](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542.md?page=8)

[Next page](https://forums.unrealengine.com/t/scripting-language-extensions-via-plugins/3542.md?page=10)
