Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate UE 5.0.2 Externs #4

Open
peteshand opened this issue Jun 23, 2022 · 1 comment
Open

Generate UE 5.0.2 Externs #4

peteshand opened this issue Jun 23, 2022 · 1 comment

Comments

@peteshand
Copy link

peteshand commented Jun 23, 2022

Hey there

I'm trying to run this with UE5.0.2, however I haven't been able to get it to work..
What should trigger extern generation?...

After completing the below steps should it simply be a case of starting a project with the UnrealHxGenerator plugin enabled (along with EXTERN_OUTPUT_DIR and GENERATE_EXTERNS set) and the externs will be generated?

For me after starting the project nothing is generated, so I'm wondering if maybe the hook that triggers extern generation isn't working as expected?

/////////////////////////////////////////////////////////

Unreal.hx Extern Generator

This project takes UHT reflection information and generates Haxe extern definitions from it.
You don't need to use this in order to benefit from the externs; They are for now included in the main
project

Installation (4.11 and above)

This plugin should be installed in your engine Plugins directory. (e.g. Plugins/UnrealHxGenerator)
Once this is achieved, add the plugin to your project, either through the editor or by inserting the following into your .uproject file:

  "Plugins": [{
      "Name": "UnrealHxGenerator",
      "Enabled": true
    }]

Set the EXTERN_OUTPUT_DIR environment variable to the location you wish to output the generated files to, and set the GENERATE_EXTERNS environment variable to 1

For downloaded engines

If you haven't built the engine yourself, you will need to build the plugin using UAT. To do that, do the following:

cd [UE-Install-Dir]
.\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin=[/path/to/UnrealHxGenerator.uplugin] -Package=[TemporaryOutputDirectory]

Once it is built, copy TemporaryOutputDirectory to your [UE-Install-Dir]/Engine/Plugins/UnrealHxGenerator

/////////////////////////////////////////////////////////

What is the next step? start the project?

On a side note I have a fork that addresses some compatibility issues with new engine versions:
development...spacemonster-interactive:development

@peteshand
Copy link
Author

with the project open, if I hit the recompile button I getting:
ERROR: Expecting to find a type to be declared in a module rules named 'UnrealHxGenerator' in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the 'ModuleRules' type defined by Unreal Build Tool. Build failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant