After changing module name all parent classes are missing

After changing module name and MODULE_API tag and recompile all my blueprints in project parent classes are missing. I think unreal can handle finding old classes in new modules.

1 Like

Hey -

Are you changing the name of engine/plugin/custom modules? If you’re using a custom module (ex: for your own game code) can you explain how you’re creating the new module? Additionally, can you let me know if you’re able to use the reparent option to re-associate the blueprints with their parent classes?

Hi , I renamed main module of the project and changed _API macros, and all blueprint classes where broken. Reparenting by hand is not an option for me, we have too many classes.

Actually is it possible to reparent blueprint from content browser? I don’t see any option there.

I want to ensure that I am doing the same things you are in my attempt to reproduce this locally. With a project named MyProjectA - I’ve changed the reference of MyProjectA in the Build.cs file to NewProj. In addition, I’ve also changed MyProjectA_API to NewProj_API in all of the classes of my project. Are there any other places where you are doing any renaming?

, in general i change module name in uproject, change name of .cs files and change _api macros. No classes renaming. But i’ll try to recheck everything on weekend, and will drop you exact steps.

Hey -

I tried to change the name inside the .uproject as well as rename the .Target.cs/Editor.Target.cs/Build.cs files. I then changed the _API for the files in the project. After doing so I was unable to Generate the Visual Studio project files. Can you explain exactly what you’re changing in your project?

  • In .uproject change module names.
  • Rename source folders
  • rename *.Target.cs and classes inside them, also rename ExtraModuleNames
  • In source folders rename *.Build.cs files and module name references if any.

after that .sln should generate.

After that you can change _API macros.

Hey -

Thank you for the detailed steps. I was able to reproduce the issue and have entered UE-32892 for investigation.

Cheers

Hi, .

Looks like ticked was marked Won’t Fix. With proposal to use class redirects. Ok it may work, but maybe Epics can add module redirects, which will redirect all classes of one module to another module. Listing all the classes by hand can be not easy task. Or there is already some similar feature?

I have entered a feature request for the ability to redirect all classes of a module. You can follow the report here (Unreal Engine Issues and Bug Tracker (UE-37232) ) as it is reviewed by developers.

I noticed this thread, I’m working on some improvements to redirects that will make this easier in the 4.16 timeframe, but it’s still in progress.

But you can do this now, with a redirect that has a confusing name:

+ActiveGameNameRedirects=(OldGameName="/Script/MovieSceneCore",NewGameName="/Script/MovieScene")

That redirects all classes inside /Script/MovieSceneCore, even though it isn’t actually a game. There are some bugs with this but it may do what you want.

1 Like

Same problem here on 4.15 But the Ben solution worked for now.

Unfortunately, this doesn’t work anymore.