Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Try this:

    void OnCollisionEnter2D(Collision collisionInfo)

    {

        if (collisionInfo.transform.tag == "1")

        {

            transform.position = homeBase;

            local = 0;

        }

    }