Resetting Scene when object collides with enemy (cube) c#

So i’ve looked forever now, all i can find is javascript solutions but nothing in c#

I have maze project with enemies, kind of like packman, but instead I need the level to reset if the Player collides with one of my moving cubes. I’ve been looking for days and I cant find anything close to what im looking for. I’m sure i would use object transform in some way, i’m just completely lost as a newbie to Unity and C# - Thanks in advance.

This really depends on your definition of “Reset”.
It can mean reloading the scene (definitely not the best approach), resetting all objects states and game values, or if you simply want to reset the player position you could add the following to it :

private Vector3 _initialPosition;

void Start ()
{
    _initialPosition = transform.position;
}

void OnCollisionEnter (Collision col)
{
    if (col.gameObject.tag == "wall"; // using tags is the easy way
        transform.position == _initialPosition;
}