#Blueprints not able to access new cpp methods

1 messages ยท Page 1 of 1 (latest)

hidden moon
#

Example of how the methods look in BPs, as mentioned - no issues to make use of the new methods while PIE which makes me even more confused. But the "Custom" which is newer can't compile when cooking.

#

Scripts used for cooking:

function BuildServerAndClientFunction {
    # Build Server
    Write-Output "Starting server build..."
    & cd "path-to\UnrealEngine-5.3.2-release\Engine\Build\BatchFiles"
    & "./RunUAT.bat" -ScriptsForProject="path-to-project.uproject" Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded  -project="/path-to-project.uproject" BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook  -project="/path-to-project.uproject" -unrealexe="path-to\UnrealEngine-5.3.2-release\Engine\Binaries\Win64\UnrealEditor-Win64-DebugGame-Cmd.exe" -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory="path-to/Out/Server" -manifests -server -noclient -serverconfig=Development -nocompile -nocompileuat

    # Check if server build was successful
    if ($LASTEXITCODE -eq 0) {
        Write-Output "Server build completed successfully. Starting client build..."
    } else {
        Write-Output "Server build failed. Client build will not start."
        return
    }

    # Build Client
    & cd "path-to\\UnrealEngine-5.3.2-release\Engine\Build\BatchFiles"
    & "./RunUAT.bat" -ScriptsForProject=path-to-project.uproject" Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -project="path-to-project.uproject" BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook  -project="path-to-project.uproject" -target=ProjectClient  -unrealexe="path-to\UnrealEngine-5.3.2-release\Engine\Binaries\Win64\UnrealEditor-Win64-DebugGame-Cmd.exe" -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory="path-to/Out/Client" -manifests -client -clientconfig=Development -nocompile -nocompileua

    # Check if client build was successful
    if ($LASTEXITCODE -eq 0) {
        Write-Output "Client build completed successfully."
    } else {
        Write-Output "Client build failed."
    }
}
#

@loud tulip I start the Editor from Rider but I am Build/Cook'ing according to above. I just saw that it has " -nocompile -nocompileuat". Maybe that is the issue just that it has compiled OK before anyways.

#

Not sure what a ConstructorHelper is, so I don't think I am using it

loud tulip
#

well, you -nocompileeditor -skipbuildeditor you skip building editor for some reason. so these old binaries used to package project

hidden moon
#

Damn, just took this script from an online source. Didn't really check it too closely but at least things are starting to make sense now. Just from copying this here made me actually look at it

#

Ok, so should I remove those as well, sorry. Very inexperienced with this

loud tulip
#

same for -nocompile -nocompileuat old binaries could be used in final package

hidden moon
#

Alright trying now with those 4 removed

#

Damn, same outcome.. :/ So strange this issue

loud tulip
#

Is the class in a project module?try look at load order

#

If they are in another or plugin module add them as a dependency of a gaame module

#

To ensure they are loaded

hidden moon
#

If they are in another or plugin module add them as a dependency of a gaame module
They are in a plugin and the module from the pluging is already added as an item in PublicDependencyModuleNames of the Game Build.cs.

Should I be adding it somewhere else, like PrivateDependencyModuleNames?

#

try look at load order

I will google around a bit for it, but do you have any pointers where it's configured?

loud tulip
#

It will be in loh

#

Log*

#

If you on source engine you can enable logs for shipping

hidden moon
#

Alright, I can tell you are light years more experienced with UE than me since your baseline of expected knowledge is high :D. I will dig into this and if it's OK I will report back here on my progress / what I find. I guess what you mean is --> Am I sure that my plugin module is compiled when the blueprints are compiling, beause it seems that an old build of the c++ classes is being used (since old methods are available but not new)

#

I do see the .cpp classes compiling way before I see the blueprint compilation errors at least

#

I did notice this though when searching in logs for "order" , maybe it's an issue:

UATHelper: Packaging (Windows): MMOKitServer: [Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
UATHelper: Packaging (Windows): MMOKitServer: [Upgrade]     IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
UATHelper: Packaging (Windows): MMOKitServer: [Upgrade] Suppress this message by setting 'IncludeOrderVersion = EngineIncludeOrderVersion.Latest;' in Server.Target.cs.
UATHelper: Packaging (Windows): MMOKitServer: [Upgrade] Alternatively you can set this to 'EngineIncludeOrderVersion.Latest' to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
UATHelper: Packaging (Windows): BootstrapPackagedGame: [Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
UATHelper: Packaging (Windows): BootstrapPackagedGame: [Upgrade]     IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
UATHelper: Packaging (Windows): BootstrapPackagedGame: [Upgrade] Suppress this message by setting 'IncludeOrderVersion = EngineIncludeOrderVersion.Latest;' in BootstrapPackagedGame.Target.cs.
UATHelper: Packaging (Windows): BootstrapPackagedGame: [Upgrade] Alternatively you can set this to 'EngineIncludeOrderVersion.Latest' to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
loud tulip
#

that is forc++ includes, (you should always use latest buildsettings/includeorder)

#

you should see Loading module xxxx in log

#

compare when you open editor and what you get in cooked build

#

module that has that class

hidden moon
#

Thanks ๐Ÿ™

loud tulip
#

last resort you may try playing with LoadOrder of the module that has that class, changing it to PreDefault or earlier

#

that is when you can not fix loading order issue by other means

hidden moon
#

Super, thanks! Then I feel that the most probably reason is what I state above:

Am I sure that my plugin module is compiled when the blueprints are compiling, beause it seems that an old build of the c++ classes is being used (since old methods are available but not new)

And that's what I should pursue to fix

loud tulip
#

check timestamps that no old binaries in final package

hidden moon
#

Hey, I have noticed this on most of the builds:

Using 'git status' to determine working set for adaptive non-unity build

...

Server: [Adaptive Build] Excluded from <My Module> unity file: GameInstanceCpp.cpp, PlayerControllerCpp.cpp, PlayerStateCpp.cpp, UBaseAbilitySystemComponent.cpp, GameplayUtilities.cpp, BaseCharacterCpp.cpp

Does this mean that if I commit something to git without building it first, that could mess with the build later?

#

PreDefault did not work btw

#

It's kind of clearly stating that it is not building the classes as I have issues with ๐Ÿค”

loud tulip