File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Plugins/UnrealJS/Source/V8/Private Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1560,6 +1560,36 @@ class FJavascriptContextImplementation : public FJavascriptContext
1560
1560
}
1561
1561
}
1562
1562
1563
+ for (auto it = Environment->ScriptStructToFunctionTemplateMap .CreateConstIterator (); it; ++it)
1564
+ {
1565
+ const UStruct* StructToExport = it.Key ();
1566
+
1567
+ auto ClassName = FV8Config::Safeify (StructToExport->GetName ());
1568
+
1569
+ TArray<UFunction*> Functions;
1570
+ Environment->BlueprintFunctionLibraryMapping .MultiFind (StructToExport, Functions);
1571
+
1572
+ auto conditional_emit_alias = [&](UFunction* Function) {
1573
+ auto Alias = FV8Config::GetAlias (Function);
1574
+ if (Alias.Len () > 0 )
1575
+ {
1576
+ w.push (ClassName);
1577
+ w.push (" .prototype." );
1578
+ w.push (Alias);
1579
+ w.push (" = " );
1580
+ w.push (ClassName);
1581
+ w.push (" .prototype." );
1582
+ w.push (FV8Config::Safeify (Function->GetName ()));
1583
+ w.push (" ;\n " );
1584
+ }
1585
+ };
1586
+
1587
+ for (auto Function : Functions)
1588
+ {
1589
+ conditional_emit_alias (Function);
1590
+ }
1591
+ }
1592
+
1563
1593
return FFileHelper::SaveStringToFile (*w, *Filename);
1564
1594
#else
1565
1595
return false ;
You can’t perform that action at this time.
0 commit comments