unity angle vector3 code example
Example 1: get angle between two vectors unity
Vector3 targetDir = target.position - transform.position;
float angle = Vector3.Angle(targetDir, transform.forward);
Example 2: unity vector2 angle
//Find the angle for the two Vectors
float m_Angle = Vector2.Angle(m_MyFirstVector, m_MySecondVector);