Skip to content

Instantly share code, notes, and snippets.

@mindryu
Last active October 27, 2015 16:34

Revisions

  1. mindryu renamed this gist Nov 10, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.cs → LabelManager
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    label.transform.SetParent(transform,false);

    // Canvas = Screen Space - Overlay
    label.transform.position = RectTransformUtility.WorldToScreenPoint(Camera.main, pos);

  2. mindryu created this gist Nov 10, 2014.
    5 changes: 5 additions & 0 deletions gistfile1.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    // Canvas = Screen Space - Overlay
    label.transform.position = RectTransformUtility.WorldToScreenPoint(Camera.main, pos);

    // Canvas = Screen Space - Camera
    label.transform.position = RectTransformUtility.WorldToScreenPoint(Camera.main, Camera.main.ScreenToWorldPoint(pos));