Camera Following [2D]

Hello!
I’m new to c# coding and I’m trying to create a script for camera, which will follow my object. I want to do that by getting my objects position and transforming camera position by it. I guess everything should be written in void update function. But how?

Thanks for help.

This has already been answered on this forum. A quick google search of “unity camera follow player 2d” and I found it… Hope this helps.

hey there, thing is i wanted to do this my way, because those scripts are making my camera really laggy. i just want it simplest way.

thanks for reply.