My prefab isn't getting destroyed

Rundown of my problem:-

public void drop() {
     //creates a bobber
     bobber =(GameObject) Instantiate(bobberPrefab, new Vector3(-0.999f, 0.168f, 0), new Quaternion(0f, 0f, 0f, 0f));

    public void restart()

So what you need to know is that method “drop” gets called, prefab does it’s thing, then calls method “restart” and supposedly gets destroyed

Now here is the problem, The prefab isn’t getting destroyed at all, it just sits there, I know that the method does get called because it used to give me errors for destroying the asset, does anyone see what’s wrong? thanks.

(also I have set all references)

Could I see the rest of the code and get a little more description of what is going on? Like does Drop get called more than once?

Did you try to write:


Also maybe put:

Debug.LogError("Restart called"); 

to see if its really getting called.
Both functions are in the same class?
And bobber is global variable?
Also do you instantiate only one bobber game object or more?
Do you assign anything else to bobber variable after instantiating game object?