Hi percipio,
Welcome back to our community! 
In many cases, there are multiple ways to make something work in Unity, and Rick cannot show all of them. If your code works, it’s a solution by definition.
Even if there is a problem with your solution, I’m sure you’ll be able to solve it. Until then, don’t worry about problems with your solution because you tested your code, and it seems to be working as intended.
See also:
- Forum User Guides : How to mark a topic as solved