RB.NativeScreenToDisplayPos
Method - Static
public static Vector2i NativeScreenToDisplayPos(Vector2 nativeScreenPos)
|
Parameters
nativeScreenPos
|
Vector2
|
Native screen coordinates
|
Returns
Vector2i
RetroBlit display coordinates
DescriptionTranslate native screen coordinates to RetroBlit display coordinates. In most games this will likely not be needed, RetroBlit already translates mouse and touch positions to RetroBlit display coordinates, however this method may be useful when integrating RetroBlit into a more complicated Unity Scene. Examplevoid Render() { var nativeScreenPos = UnityEngine.Camera.WorldToScreenPoint(myGameObject.transform.position); var retroBlitPos = RB.NativeScreenToDisplayPos(nativeScreenPos);
RB.DrawEllipse(retroBlitPos, new Vector2i(4, 4), Color.white); } |
|