unity rotate vector

C#
Vector3 rotated = Quaternion.AngleAxis(-45, Vector3.up) * vector;
Source

Also in C#: