Exemple #1
0
    void OnEnable()
    {
        if (cam == null)
        {
            CreateTmpCam(NGUITools.FindCameraForLayer(gameObject.layer).gameObject);
        }

        if (obj != null)
        {
            b = obj.GetComponent<UIBlur>();
            if (b == null)
            {
                b = obj.AddComponent<UIBlur>();
            }
            b.enabled = true;
            b.Tex = tex;
        }
       
    }
 private void SetComponents()
 {
     uiblur      = GetComponent <UIBlur>();
     canvasGroup = GetComponent <CanvasGroup>();
 }