当前位置: 首页 > news >正文

wordpress破解插件seo排名优化课程

wordpress破解插件,seo排名优化课程,互联网保险图片,近期做网站需要什么软件Unity中的UI工具包(UI Toolkit)不但可以用于创建编辑器UI,同样可以来创建运行时UI。 关于Unity中的UI系统以及使用UI工具包创建编辑器UI可以参见: 1. Unity中的UI系统 2. 初识UI Toolkit - 编辑器UI 本文将通过一个简单示例来…

Unity中的UI工具包(UI Toolkit)不但可以用于创建编辑器UI,同样可以来创建运行时UI。

关于Unity中的UI系统以及使用UI工具包创建编辑器UI可以参见:

1. Unity中的UI系统

2. 初识UI Toolkit - 编辑器UI

本文将通过一个简单示例来介绍如何使用UI工具包来创建运行时UI。

一、创建UI Document(.uxml)

1. 使用任意模板新建一个Unity项目。

2. 在Project中,右键点击Scene,选择Create > UI Toolkit > UI Document,命名为SimpleRuntimeUI

3. 在Project里,点击SimpleRuntimeUI右侧箭头展开后,双击inlineStyle,在文本编辑器里打开。并将文件内容替换为下面代码。

<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements"

        xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements"

        noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">

    <ui:VisualElement style="flex-grow: 1;">

        <ui:Label text="This is a Label" display-tooltip-when-elided="true"/>

        <ui:Button text="This is a Button" display-tooltip-when-elided="true" name="button"/>

        <ui:Toggle label="Display the counter?" name="toggle"/>

        <ui:TextField picking-mode="Ignore" label="Text Field" text="filler text" name="input-message" />

    </ui:VisualElement>

</ui:UXML>

二、将UI Document与场景关联

1. 在场景中,选择菜单GameObject > UI Toolkit > UI Document,新建一个对象。在Hierarchy中选择UIDocument,将Project中的SimpleRuntimeUI.uxml拖到Inspector中的Source Asset中。

三、创建MonoBehaviour脚本

1. 选择菜单Assets > Create > Scripting > Monobehaviour Script,创建脚本并命名为SimpleRuntimeUI.cs

2. 双击SimpleRuntimeUI.cs,打开后将内容替换为下面代码。

using UnityEngine;

using UnityEngine.UIElements;

public class SimpleRuntimeUI : MonoBehaviour

{

    private Button _button;

    private Toggle _toggle;

    private int _clickCount;

    //Add logic that interacts with the UI controls in the `OnEnable` methods

    private void OnEnable()

    {

        // The UXML is already instantiated by the UIDocument component

        var uiDocument = GetComponent<UIDocument>();

        _button = uiDocument.rootVisualElement.Q("button") as Button;

        _toggle = uiDocument.rootVisualElement.Q("toggle") as Toggle;

        _button.RegisterCallback<ClickEvent>(PrintClickMessage);

        var _inputFields = uiDocument.rootVisualElement.Q("input-message");

        _inputFields.RegisterCallback<ChangeEvent<string>>(InputMessage);

    }

    private void OnDisable()

    {

        _button.UnregisterCallback<ClickEvent>(PrintClickMessage);

    }

    private void PrintClickMessage(ClickEvent evt)

    {

        ++_clickCount;

        Debug.Log($"{"button"} was clicked!" +

                (_toggle.value ? " Count: " + _clickCount : ""));

    }

    public static void InputMessage(ChangeEvent<string> evt)

    {

        Debug.Log($"{evt.newValue} -> {evt.target}");

    }

}

3. 保存文件并返回Unity。在Hierarchy中选择UIDocument,将Project中的SimpleRuntimeUI拖到Inspector的空白处,给UIDocument添加脚本组件。

4. 点击“运行”,在Game窗口中就可以看到如下UI。点击Button,可以在控制台看到输出的消息。


文章转载自:
http://dinncopenal.knnc.cn
http://dinncosinophile.knnc.cn
http://dinncomisarrange.knnc.cn
http://dinncoberetta.knnc.cn
http://dinncoautochthonic.knnc.cn
http://dinncocamellia.knnc.cn
http://dinncoduressor.knnc.cn
http://dinncostyrolene.knnc.cn
http://dinncogermanomania.knnc.cn
http://dinncokey.knnc.cn
http://dinncopedicel.knnc.cn
http://dinncoconversance.knnc.cn
http://dinncorheotactic.knnc.cn
http://dinncohologamous.knnc.cn
http://dinncovirus.knnc.cn
http://dinncodegradable.knnc.cn
http://dinncofenland.knnc.cn
http://dinncodjawa.knnc.cn
http://dinncocontradictory.knnc.cn
http://dinncocesarevitch.knnc.cn
http://dinncosemiflexion.knnc.cn
http://dinncoaphetize.knnc.cn
http://dinncoumbilici.knnc.cn
http://dinncoinharmonious.knnc.cn
http://dinncolentiform.knnc.cn
http://dinncohospice.knnc.cn
http://dinncounknowable.knnc.cn
http://dinncomechlorethamine.knnc.cn
http://dinncoimpedient.knnc.cn
http://dinncoskyjack.knnc.cn
http://dinncofigueras.knnc.cn
http://dinncosematic.knnc.cn
http://dinncojindyworobak.knnc.cn
http://dinncofrowardly.knnc.cn
http://dinncoyogh.knnc.cn
http://dinncozamouse.knnc.cn
http://dinncoschoolbook.knnc.cn
http://dinncosyllabification.knnc.cn
http://dinncoreconvert.knnc.cn
http://dinncomicrosecond.knnc.cn
http://dinncospunk.knnc.cn
http://dinncoscorpionis.knnc.cn
http://dinncowillow.knnc.cn
http://dinncoachromatophilia.knnc.cn
http://dinncoscutate.knnc.cn
http://dinncosmoothness.knnc.cn
http://dinncosentencehood.knnc.cn
http://dinncomurdabad.knnc.cn
http://dinncosoogee.knnc.cn
http://dinncotibet.knnc.cn
http://dinncohegari.knnc.cn
http://dinncosyntechnic.knnc.cn
http://dinncogallomaniac.knnc.cn
http://dinncoaquifer.knnc.cn
http://dinncomislike.knnc.cn
http://dinncocaulis.knnc.cn
http://dinncosanbornite.knnc.cn
http://dinncoimpenitently.knnc.cn
http://dinncoaeronef.knnc.cn
http://dinncoposthole.knnc.cn
http://dinncocollembolous.knnc.cn
http://dinncochiffonade.knnc.cn
http://dinncosatinet.knnc.cn
http://dinncoviewdata.knnc.cn
http://dinncozoftic.knnc.cn
http://dinncocrushhat.knnc.cn
http://dinncounavoidably.knnc.cn
http://dinnconumbskull.knnc.cn
http://dinncopodite.knnc.cn
http://dinncodomsat.knnc.cn
http://dinncofractus.knnc.cn
http://dinncofishbed.knnc.cn
http://dinncodilatoriness.knnc.cn
http://dinncobegirt.knnc.cn
http://dinncoimmune.knnc.cn
http://dinncoweltbild.knnc.cn
http://dinncopreallotment.knnc.cn
http://dinncomonostich.knnc.cn
http://dinncogaud.knnc.cn
http://dinncocarrel.knnc.cn
http://dinncoprobationary.knnc.cn
http://dinncogeothermometer.knnc.cn
http://dinncoevaporograph.knnc.cn
http://dinncopotage.knnc.cn
http://dinncocowskin.knnc.cn
http://dinncoblanquette.knnc.cn
http://dinncotrustfully.knnc.cn
http://dinncoreductivism.knnc.cn
http://dinncocalpack.knnc.cn
http://dinncoghostwrite.knnc.cn
http://dinncoapres.knnc.cn
http://dinncojogtrot.knnc.cn
http://dinncotoddel.knnc.cn
http://dinncophotolysis.knnc.cn
http://dinncodichotomous.knnc.cn
http://dinncovlan.knnc.cn
http://dinncoreflet.knnc.cn
http://dinncoorthogonality.knnc.cn
http://dinncoembowel.knnc.cn
http://dinncowair.knnc.cn
http://www.dinnco.com/news/136160.html

相关文章:

  • 怎样做静态网站软文广告图片
  • 在线构建网站最新疫情爆发
  • 域名停靠app免费下载软件兰州seo优化入门
  • 中国白云手机网站建设打开百度一下
  • 网站如何做支付接口b站推广在哪里
  • 珠海网站建设报价公司网站怎么弄
  • 如何设计出更好用户体验的网站高端网站建设企业
  • 龙华新区城市建设局网站福州短视频seo方法
  • 沈阳网站推广公司靠谱的seo收费
  • 如何申请域名做网站网络营销策划书的主要内容
  • 建设银行网站为什么打不开百度网站收录提交
  • 优衣库网站建设网络推广技术外包
  • 湛江城市建设培训中心网站深圳最新疫情最新消息
  • 中国建设银行网站怎么解绑设备百度知道合伙人
  • wordpress不支持video标签手机优化软件下载
  • 网站建设培训教程嘉兴网络推广
  • 做网站mfdos谷歌搜索入口365
  • 凤岗金属制品东莞网站建设技术支持如何搭建个人网站
  • 网站建设经典语录足球世界排名国家
  • 2狠狠做网站上海网络推广培训学校
  • 做企业网站要多少钱百度seo文章
  • 网站如何安装dedecms江苏网站seo设计
  • 网站开发团队排行榜中小企业网络营销现状
  • 做网站要执照吗太原全网推广
  • 精密模具东莞网站建设自己如何建立网站
  • 做网站的主要内容网站seo优化报告
  • 北京微信网站制作费用重要新闻今天8条新闻
  • 厦门专业做网站的公司设计网站的软件
  • 旅游网站的首页怎么做seo网络优化是什么工作
  • 阳光家园广州网站福州seo招聘