Which just returns ‘Object Name: AttributeSet’ for every actor instance. It didn’t used to do this, so what may have changed so that Unreal is no longer giving them unique names?
We use MakeUniqueObjectName. This is deterministic btw so if you run it on the same actors / components in the same order, even on different machines, the names will be identical.
Thanks for the reply; maybe my actual problem isn’t related to this (a crash when setting the attributes), but I’m sure before today the object name was something like AttributeSet_0, AttributeSet_1 etc. I’m not 100% though, but regardless, when the code later runs I get an EXCEPTION_ACCESS_VIOLATION:
if (AttributeSet) {
AttributeSet->SetLevel(InitialLevel);
If I output the name of AttributeSet before this it seems to be empty for everything but the most recently created character (the player). What it seems to be doing is creating the subobjects without unique references and then replacing them with each construction; but before today it wasn’t a problem and the code is very similar to the ActionRPG sample.
Edit:
Okay yeah so it still crashes even if I give them unique names like this:
I think that may fix it but it wasn’t necessary before today and every demo/marketplace project I’ve got access to doesn’t seem to need to create a unique name for subobjects created in this way.
I’d like to avoid doing it differently without at least understanding why its changed, it could be of course that the main problem (as per my other reply) is unrelated - but I don’t think so. The crash doesn’t occur if there is only one character.
I don’t know about problem with components naming, but since you talking about gas-crash without visible reasons, as a wild guess, have you copied\duplicated blueprints derived from this class? If so, check possible solutions here, paragraph 9.4
Thanks, this sounds more like the issue I’m having - though there’s no duplication going on.
I’d like to avoid losing usage of the attribute macros as per the solution linked, so I think I’ve got it working by creating the attribute set in PreInitializeComponents as per this page