Some none fatal error message started to popping up during engine start up process.
It says “Failed import: class ‘STPlayerAttributeComponent’ name ‘HealthComponent’ outer ‘BA_ST_Breakable_C_1’. There is another object (of ‘STHealthComponent’ class) at the path.”
The “BA_ST_Breakable” actor only has “STHealthComponent” as an attachment. “STPlayerAttributeComponent” is a child class of “STHealthComponent” but it has never being used or references by “BA_ST_Breakable”. So somehow the engine trying to import “STPlayerAttributeComponent” to a unrelated class when compiling blueprint at startup simply because it is a child class of “STHealthComponent”?
The error will go away if I attach “STPlayerAttributeComponent” to the actor instead. Why would the engine complain if the component I used is not the last one of the inheritance chain?
It’s the ask a question then find the solution right away magic again. Took me a day to debug this…
This bug and some other nasty behaviours that come with it is caused by the conflicting class redirects that are in my project’s default ini file, because I am using Rider it can auto generate a lot redirects if class names are changed a lot. By deleting the outdated ones and only left the latest one that relates to “STPlayerAttributeComponent”. The error message and other bugs that really similar to lingering CDO bug are all gone now which is such a relive.
I will mark this as solved and hope it can help some one else in the future.