How to unload a gameobject?

I used Resource.Load to load a prefab , how can I unload the resources used by that prefab?(texture,sound…etc)
I’ve tried Resource.UnloadAsset , but it said :

UnloadAsset may only be used on individual assets and can not be used on GameObject

What am I supposed to do?

1 Like

You can simply destroy it from the Hierarchy using:

Destroy(gameObject);