Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BOO 0.22 KB | None | 0 0
  1. import UnityEngine
  2.  
  3. class RectExtensions:
  4.    
  5.     [extension] static position[this as Rect]:
  6.         get:
  7.             return Vector2(this.x, this.y)
  8.    
  9.     [extension] static size[this as Rect]:
  10.         get:
  11.             return Vector2(this.width, this.height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement