What if the the function picked got renamed? Looks like this is not properly handled right now
ameaninglessname opened this issue · 5 comments
Thank you for rising this topic.
In comparing with blueprint functions, after its renaming, it will break other blueprints where renamed function is referenced and give BP-compile error.
We can try to provide similar error preventing the asset to compile If such function does not exist.
Does it make sense?
Yeah, make sense to me, and it even better if we could rename these function names automatically like:
https://github.com/JanSeliv/FunctionPicker/assets/20263103/5b346f92-2a18-439b-9415-6f6d6561b4b0
- Implemented Data Validation to verify bound functions.
When a code/blueprint function gets renamed or removed, saving the asset with an incorrect Function Picker property will display an error in the Message Log.
See Release page.
However, the implementation differs from your request based on the gif. Here are the challenges faced:
- In the gif, both the linked function and the function itself reside in the same asset. In contrast, Function Picker often links to a different class, as seen in the sample project where we link a function in the Input Action asset to the function of a pawn class. Even for the scenario in your gif with Unreal delegates, renaming a function from a different class won't happen automatically.
- Function Picker is a USTRUCT, which is essentially simple data without default instances (CDO). It doesn't operate like UCLASS objects, meaning it lacks inherent automatic logic. This is why, to enable the current data validation, the IsDataValid function from UCLASS containing FunctionPicker needs to be called.
I would appreciate any pull requests that might help implement the feature as suggested in the gif. @ameaninglessname, are you comfortable with the current solution?
Closed as there are no updates so far
Hi, @ameaninglessname
are you comfortable with the current solution?
Sorry for the late response, I was missed this reply somehow...
Yes, I am cool with it. Thanks!