Hello,
I have a plugin that I want to rename - its source files and classes. To keep backward compatibility in blueprints
In DefaultEngine.ini file of the game I redirected the old plugin name to the new one like so in the DefaultEngine.ini:
[CoreRedirects]
+PackageRedirects=(OldName=“/Script/HummingbirdPlugin”, NewName=“/Script/CohtmlPlugin”)
+FunctionRedirects=(OldName=“CohtmlInputActor.SetHummingbirdViewFocus”,NewName=“CohtmlInputActor.SetCohtmlViewFocus”)
+FunctionRedirects=(OldName=“CohtmlInputActor.SetHummingbirdInputFocus”,NewName=“CohtmlInputActor.SetCohtmlInputFocus”)
+FunctionRedirects=(OldName=“CohtmlGameHUD.GetHummingbirdHUD”,NewName=“CohtmlGameHUD.GetCohtmlHUD”)
+PropertyRedirects=(OldName=“CohtmlGameHUD.HummingbirdHUD”,NewName=“CohtmlGameHUD.CohtmlHUD”)
At first look existing blueprint classes are fine (Names are displayed correctly), however…
I have my own C++ HUD class which initializes pointer to a custom component object in its constructor. In my sample game there’s a blueprint class which inherits
from my HUD class. When I start the game, the constructor of the HUD class is called and the component allocated. After the C++ class’s constructor executes,
the BP class’s constructor runs and override the pointer to the component to null. If I create a new blueprint class identical to the existing one (inheriting
from the C++ class, having the exact same BP graph), the new class works correctly.
If I am to guess, it looks like the existing BP class constructor tries to initialize the wrong memory and overrides the members of the parent class.
Is there a way that I can keep the current blueprint classes or I should create new ones which are technically the same?