private void Init() { var bg = CreateChild <UguiSprite>("bg"); { bg.Anchor = AnchorType.Fill; bg.Offset = Offset.Zero; bg.Color = ColorPreset.DarkBackground; } image = CreateChild <WebTexture>("image"); { image.Anchor = AnchorType.Fill; image.Offset = Offset.Zero; } var shadow = CreateChild <UguiSprite>("shadow"); { shadow.Anchor = AnchorType.BottomStretch; shadow.Pivot = PivotType.Bottom; shadow.SetOffsetHorizontal(0f); shadow.Y = 0f; shadow.Height = 32f; shadow.Color = new Color(0f, 0f, 0f, 0.5f); shadow.SpriteName = "gradation-bottom"; } OnEnableInited(); }
void Start() { webTexture = GameObject.FindObjectOfType(typeof(WebTexture)) as WebTexture; UWKWebView view = gameObject.GetComponent <UWKWebView>(); view.LoadURL(UWKWebView.GetApplicationDataURL() + "/StreamingAssets/uWebKit/Examples/AlphaMaskExample.html"); }
// Use this for initialization void Start() { // Get the WebTexture component of this game object. webTexture = this.GetComponent<WebTexture>(); // Set a handler for the OpenExternalLink event. if ( webTexture != null ) webTexture.OpenExternalLink += OnOpenExternalLink; }
void Start() { webTexture = GameObject.FindObjectOfType (typeof(WebTexture)) as WebTexture; UWKWebView view = gameObject.GetComponent<UWKWebView>(); view.LoadURL(UWKWebView.GetApplicationDataURL() + "/StreamingAssets/uWebKit/Examples/AlphaMaskExample.html"); }
// Use this for initialization void Start() { // Get the WebTexture component of this game object. webTexture = this.GetComponent <WebTexture>(); // Set a handler for the OpenExternalLink event. if (webTexture != null) { webTexture.OpenExternalLink += OnOpenExternalLink; } }
void Start() { webTexture = GameObject.FindObjectOfType(typeof(WebTexture)) as WebTexture; }
void Start() { webTexture = GameObject.FindObjectOfType (typeof(WebTexture)) as WebTexture; }
// Use this for initialization void Awake() { // Get the WebTexture component of this game object. webTexture = this.GetComponent<WebTexture>(); }