Scripting Language extensions via plugins

Hi Danatarion,

Try to answer your question with my limited knowledge on this subject: (anyone spots any error please jump in and correct me)

3. If I want to rapidly interate in terms of generating the bindings repeatedly, how can I run UHT without triggering an engine build+link? Right now I am deleting the headers generated and then doing it again but it still takes a long time and links the EXE’s at the end as if i changed a core engine file.

You can run UnrealHeaderTool as commandlien too to generate script binding. e.g. this is the commandline I use:


UnrealHeaderTool.exe e:/devgit/UnrealTournament/UnrealTournament/UnrealTournament.uproject e:\dev\unreal\git\UnrealTournament\UnrealTournament\Intermediate\Build\Win64\UnrealTournamentEditor\Development\UnrealHeaderTool.manifest

2. How exactly does UHT find ScriptGeneratorPlugin?

First, you let UHT know your plugin in UnrealHeaderTool.Target.cs:



public UnrealHeaderToolTarget(TargetInfo Target)
{
	Type = TargetType.Program;
	AdditionalPlugins.Add("ScriptGeneratorPlugin");
	AdditionalPlugins.Add("YourScriptGenerator");
}


and enable it in UnrealHeaderTool config file: (Engine\Programs\UnrealHeaderTool\Config\DefaultEngine.ini)


[Plugins]
+ProgramEnabledPlugins="ScriptGeneratorPlugin"
+ProgramEnabledPlugins="YourScriptGenerator"


Then in your script generator module, you register “ScriptGenerator” module feature:


void FYourScriptGeneratorPlugin::StartupModule()
 {		 {
	IModularFeatures::Get().RegisterModularFeature(TEXT("ScriptGenerator"), this);
 }	

Now UHT know your script generator plugin is enabled and ready to be use as “ScriptGenerator”

1. Do ScriptGenerator plugins HAVE to be part of the entire Source/Engine structure in order for UHT to load them?

I haven’t try that but I see no reason it wont work.