Hi, I'm a sophomore in college. This is for a class. I'm extremely new. Please be aware of that.
I'm making a unity fishing game and I have it right now so that when you cast your line (i.e. duplicate a bobber where the indicator was) it starts a fishing minigame, then if you catch or lose the fish, it triggers a respective UnityEvent to destroy the fish. My issue is that I have 3 different kinds of fish. Big, medium, and small. So I wrote a bookmarker script to determine which fish you hooked and only destroy that one, not all the fish.
I have brought this script to a tutor 3 times, I had my friend look at it, I have had my professor even rewrite it for me.
The current issue is that, yes, it will temporarily get rid of the specific fish. That is, until you cast your rod again and it will reappear as a child of the bobber where the bobber appears. Think of it likes its glued to the bobber.
Here is the script: https://hastebin.com/share/ogefuhetet.csharp
If anyone needs me to hop into a call and screenshare I'd be more than happy I literally just need this done to move on.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.