When I created the Block.cs script with Unity 2020.3.13.f1, the auto-generated code was the following.
private void OnCollisionEnter2D(Collision2D collision)
{
Destroy(this);
}
Out of curiosity, I tried it and as I expected it did not work. According to the documentation
Destroy(this); removes this script instance from the game object
So I was wondering what will be a valid case to do this? I can only think of freeing some memory if the script allocates a lot of memory for whatever reason but I am not entirely convinced that this is the most common scenario.
Thank you.