Editing Non-User-Classes (UMeshComponent)
Hi guys, in my game, I need addtional information on my meshes. I figured that the easiest way to achieve this is to edit the UMeshComponent header directly. I cannot simply inherit from a subclass, since I'll want to use static and dynamic meshes in the future, so editing their base class would be the most elegant way.
However I have a few questions on this:
Is it acceptable or good practice to edit the classes that come with the engine, instead of only inheriting from them?
What are the downsides?
And if I do that: can I simply override the header file? (VS tells me its read-only, but gives me the option to try to overwrite it.)
How do I version control it? (since the change would not be a part of my game folder).
I just want to know if I am about to do something very stupid.
asked Dec 31 '16 at 11:16 AM in C++ Programming
You are free to modify the source code of the Engine to meet your needs. However, this will only work if you have built the Engine from source code. If you are using the binary version of the Engine that is installed through the Launcher, you won't be able to compile the changes that you make.
Whether or not you should modify the class in the source code really depends on what your needs are. If you need the modifications for all of your projects, then it may be worthwhile to edit the base class. If you only need the modifications in one project, it may be better to subclass the base class and make your modifications in the subclass.
I am a little confused as to why you feel you can't subclass the UMeshComponent if you want to be able to use meshes with different mobility settings. This is a property in the UMeshComponent that should be inherited by your subclass.
answered Jan 04 '17 at 07:47 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here