-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added code examples for Target Data section, showing inheritance and general usage #102
Conversation
Explained how to subclass, how to get values from it(including casting), and how to use it with making a target data handle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two minor things that need to be fixed up. Thanks for adding this!
README.md
Outdated
UFUNCTION(BlueprintPure) | ||
FName GetCoolNameFromTargetData(const FGameplayAbilityTargetDataHandle& Handle, const int Index) | ||
{ | ||
FGameplayAbilityTargetData* data = Handle.Data[Index].Get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should check to make sure that Index
is within the Handle.Data
array bounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename data
to something else with a capital letter first to follow Unreal style guide like MyData
.
1. Added valid checked index 2. Fixed naming convention
Thanks for adding this example! |
fixed type checking error. fixed typo. added language identifier in fenced code block.
Issue associated: #75
This is to add some sort of examples for target data on how to:
FGameplayAbilityTargetData
FGameplayAbilityTargetDataHandle
that uses this typeFGameplayAbilityTargetData
FGameplayAbilityTargetData