I’m working on a mobile game and I need to edit a cpp file from the engine because it contains a deprecated part.
But even after modifying this file, Unreal still compiles its old version.
I have tried to modify the file from Visual Studio, from Android Studio… the original file simply no longer exists but is still compiled by the engine, even on a blank project.
How is it possible?
Is it even possible to edit a file on the classic version of Unreal?
After seeing a tutorial, I downloaded the engine from Github and tried to build it on Visual Studio, but it has been building for hours now (however I still don’t have any errors).
Will it even work? Will I be able to open my Blueprint project on the github version of Unreal? Will I be able to modify the desired file so that it can be compiled into my project?
Thanks a lot for your answers !
(ps: also, is it normal that the engine weight like 250Gb? xD)
Yes, you need to build Engine from GitHub to modify it.
Yes, it’ll take hours the first time (depends on your CPU Core Count and RAM). After that it’ll be around an hour depending on what you modified. (it’s about 40 minutes for me on a Ryzen 9 5950X and 64 GB RAM)
Yes, the size will be greater that 250 GB (one time it was around 700 GB for me. There’s probably ways to reduce the size by building only what you need, but I don’t know how)
the reason you can’t modify the engine code for the versions installed from the Epic Games Launcher (or at least changes will not have an impact) is because those are not the code files being referenced for any of the projects created from the engine (when installed from the Epic Games launcher)
when you install the engine from the Epic Games Launcher you are downloading pre- compiled binaries to your system, and then you also download the C++ files in read-only state so that you can reference them, and so that the reflection system works, but those pre- compiled binaries are keyed to not run the Unread Build Tool on the Engines C++.
effectively when installing the Engine from the Epic Games Launcher consider the included C++ as “for read-only reference”
the reason for the larger size of the Engine when Compiling from source is that you get all of the optional modules/plugins by default, the size of the Compile from Source version should be the same as opting into all of the optional modules/plugins from the Epic Games Launcher installer. the biggest culprit will be the Plugins director (many should be “safer” to remove)
what are you trying to modify from the installed Engine, what version of the Engine are you using?
There is a new node in 5.3 called “Start an in-app purchase”, and this node is related to a file called “InAppPurchaseCheckoutCallbackProxy.cpp”.
When trying to buy an IAP in-game, I get a warning from this specific file: invalid player unique id
IAP doesn’t work anymore on UE5.3 due to that, and apparently (but it’s not sure), it comes from a deprecated thing, and I wanted to modify it to be sure:
GetUniqueNetIdFromCachedControllerId() into GetUniqueNetIdForPlatformUser()
can you usurp the function as long as the subsequent functions and needed members are public, or “friend” then it wouldn’t require too much.
where this is a blueprint node you may need to write your own blueprint node, and specifically where this sounds to require net-calls and callbacks that might go as far as a Delegate
in C++ programming we split up the headers “.h” and implementation files “.cpp” then we put the .cpp files separately. Unreal chooses to call the header’s folder “public” and the implementation file’s folder “private”
the public I am talking about in the previous post is about the access specifier given to the member variables and functions in the header file. the relationship to blueprints is having the eye next to the variable be open (public) or closed (private).
a public access specifier means that any class/blueprint that knows of the object type, and has an instance (if needed) can access those member variables, and functions.
a private access specifier means that only the class itself can access those member variables and functions.
C++ gets an additional specifier of “protected” which is in between the other 2 adding classes derived from it, and classes marked as “friend” (this term is outside the scope of blueprints in addition to the term protected in general)