How should I use code to achieve the same function in unity3d?
In Unity3d:
Quaternion rotation = Quaternion.LookRotation(mainCamera.transform.TransformVector(Vector3.forward), mainCamera.transform.TransformVector(Vector3.up));
this.target.rotation = rotation;
How should it be translated to PlayCanvas?