Skip to content

Instantly share code, notes, and snippets.

@RANUX
Created September 30, 2013 08:40
Show Gist options
  • Save RANUX/6760957 to your computer and use it in GitHub Desktop.
Save RANUX/6760957 to your computer and use it in GitHub Desktop.
TIP: C# Unity3d screen coordinates to world point
using UnityEngine;
public class UIRandomSpriteSeeder : MonoBehaviour
{
private Vector3 TopRightPoint;
private Vector3 BottomLeftPoint;
void Start()
{
BottomLeftPoint = Camera.main.ScreenToWorldPoint( Vector3.zero );
TopRightPoint = Camera.main.ScreenToWorldPoint( new Vector3( Screen.width, Screen.height ));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment