Instance() public static method

public static Instance ( ) : UIRoot,
return UIRoot,
Beispiel #1
0
    //局部世界转换到屏幕坐标
    public Vector3 LocalToWorldUIPosition(RectTransform localRtTrans, RectTransform worldRtTrans)
    {
        Vector3 p = localRtTrans.position - worldRtTrans.position;

        p = UIRoot.Instance().WorldToScreenPoint(p);
        p = UIRoot.Instance().ScreenToUIPosition(p);
        return(p);
    }