Problema with Snake Game

Hi, im noob at this, so sorry if u find my question so easy

Im trying to make a game similar to the original snake game, but in thisone the snake grows all the time.
Its hard to explain but what i need is that my snake grows in the direction i send, whiout food or any other things, only grows its size in the direction i send.

I have made the basics, i have a “map” and a “point” which is the head of my snake, and i can move it all around the map. But i cant make it grow.

I dont know how to do it, the only thing i need is make “cubes” in any point that my head walk.

Heres the Script I have:


using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public class Snake : MonoBehaviour {

Vector2 dir = Vector2.right;

void Start () {

    InvokeRepeating("Move", 0.05f, 0.05f);  
}

void Update() {

if (Input.GetKey(KeyCode.RightArrow))
    dir = Vector2.right;
else if (Input.GetKey(KeyCode.DownArrow))
    dir = -Vector2.up;    // '-up' means 'down'
else if (Input.GetKey(KeyCode.LeftArrow))
    dir = -Vector2.right; // '-right' means 'left'
else if (Input.GetKey(KeyCode.UpArrow))
    dir = Vector2.up;

}

void Move() {

    transform.Translate(dir);               
}

}


If someone can help i ll really greatfull
Sorry if i have mistakes writing this, im from Argentina and i do what i can
Thanks!

Maybe try moving the head and instantianting a body part at her previous positions?
Just save the previous position before you assign the new one, then pass the previous position and instanciate a body part there?