Added note about AttributeSet being Transient. #70
No reviewers
Labels
No labels
breaking
effort
1
effort
13
effort
2
effort
3
effort
5
effort
8
good first issue
help
priority
2day
priority
now
priority
soon
state
approved
state
blocked
state
inactive
state
pending
type
bug
type
chore
type
discussion
type
docs
type
feature
type
fix
type
security
type
testing
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lucastucious/GASDocumentation!70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "zompi2/patch-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is something me and my team encounter lately. When someone was playing a game in the editor - values inside AttributeSet changed. Then, when a character blueprint was duplicated - these changed values were moved to a new character blueprint (but as a default values).
This was leading us to some very strange and difficult to track issues.
Creating objects, that are not components inside of actor's constructor is very risky and unsafe anyway, just like binding delegates inside the constructor. The best way to mitigate such issues is to set these properties to be Transient, so they won't serialize themselves during gameplay.
I'm not sure if the written note is descriptive enough, but I think it is a good idea to note about this problem, as designers usually love to copy-paste blueprints ;)
I don't think I'm following what you're saying.
That sounds like it's working as intended since any changes to Attributes shouldn't be saved to the CDO BP when PIE stops. I'm reading this as:
I had to remind myself what issue I had have in a first place, because it was some time ago.
I made a description unnecessary overcomplicated. The issue is actually more trivial. This is how it was:
HealthACharacter::BeginPlay()I was readingAttributeSet->GetHealth();(in c++ - it's important)And now the magic happens
FGameplayAttributeData::GetCurrentValue()when theGetHealth()in BeginPlay is called.Making AttributeSet Transient fixes this crash.
I'm trying to figure out how to describe this in the document.
That sounds like the duplicating BP Actor bug https://github.com/tranek/GASDocumentation#troubleshooting-duplicatingblueprintactors and the UE Issue https://issues.unrealengine.com/issue/UE-81109. Does that sound like what you're describing?
Oh... It looks like this is it, actually. I haven't noticed this section for some reason. Ok, so the issue is already covered :D
Anyway, making AttributeSet Transient seems to fix the problem too. I haven't noticed any problems that could be caused by Transient in my project so far.
May I write about it in the section 9.4?
@zompi2 yes, please!
Reviving the dead pull request :D
@tranek @SalahAdDin - I modified the notes that should better fit the document. I divided the 9.4 section into 9.4.1 and 9.4.2 where I present two possible workarounds for this issue.
This should be fixed in 5.6
Pull request closed