SetAlphaMask() public method

Enabled or disables alpha mask rendering of view
public SetAlphaMask ( bool enabled ) : void
enabled bool
return void
Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        view = gameObject.GetComponent <UWKWebView>();

        view.SetAlphaMask(AlphaMask);

#if !UNITY_4_6
        if (GetComponent <Renderer>() != null)
        {
            GetComponent <Renderer>().material.mainTexture = view.WebTexture;
        }

        if (GetComponent <GUITexture>() != null)
        {
            GetComponent <GUITexture>().texture = view.WebTexture;
        }
#else
        if (renderer != null)
        {
            renderer.material.mainTexture = view.WebTexture;
        }

        if (guiTexture != null)
        {
            guiTexture.texture = view.WebTexture;
        }
#endif
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        view = gameObject.GetComponent<UWKWebView>();

        view.SetAlphaMask(AlphaMask);

        #if UNITY_5_0
        if (GetComponent<Renderer>() != null)
            GetComponent<Renderer>().material.mainTexture = view.WebTexture;

        if (GetComponent<GUITexture>() != null)
            GetComponent<GUITexture>().texture = view.WebTexture;
        #else
        if (renderer != null)
            renderer.material.mainTexture = view.WebTexture;

        if (guiTexture != null)
            guiTexture.texture = view.WebTexture;
        #endif
    }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        center = GameObject.Find("CenterEyeAnchor");
        mouseCursor = GameObject.Find("MouseCursor");

        view = gameObject.GetComponent<UWKWebView>();

        view.SetAlphaMask(AlphaMask);

        #if !UNITY_4_6
        if (GetComponent<Renderer>() != null)
            GetComponent<Renderer>().material.mainTexture = view.WebTexture;

        if (GetComponent<GUITexture>() != null)
            GetComponent<GUITexture>().texture = view.WebTexture;
        #else
        if (renderer != null)
            renderer.material.mainTexture = view.WebTexture;

        if (guiTexture != null)
            guiTexture.texture = view.WebTexture;
        #endif
    }