浏览代码

[Feature] Add Drag&Drop Readme

/main
iizzaya 5 年前
当前提交
a6174147
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 12
      README-ZH.md
  2. 12
      README.md

12
README-ZH.md


如果您希望使用自己的表情图片,请更新纹理图`Tests/Resources/Emoji.png`,以及`Runtime/ui/txt/emoji.cs`中将Unicode映射到纹理图中具体位置的映射表。
特别地,请记得更新Dictionary变量`emojiLookupTable`,纹理图的行数`rowCount`以及纹理图的列数`colCount`。
#### 十一、与GameObject进行拖拽交互
<div style="text-align: center">
<img src="https://connect-prd-cdn.unity.com/20190718/p/images/e3c9cf9b-c732-4eb2-9afd-fe7de894f342_Custom_Inspector_Showcase_320px.gif" width="300"/>
</div>
UIWidgets也可以在EditorWindow上以及在游戏进程非运行状态下运行,因此我们可以使用它来编绘实用且美观的小组件来拓展编辑器。
我们提供了一个包装好的`UnityObjectDetector`组件以及`onRelease`回调函数,借此您可以实现简单地将物体(例如Hierarchy内的场景物体、Project窗口下的文件等)拖拽至区域内,来获得`UnityEngine.Object[] `类型的引用并进行操作。
你可以在“UIWidgetsTests -> Drag&Drop”下找到简单的实例样例。
## 调试UIWidgets应用程序

12
README.md


in the texture. Specifically, remember to update the Dictionary `emojiLookupTable`, number of rows
in the texture `rowCount`, and number of columns `colCount`.
#### Interact with GameObject Drag&Drops
<div style="text-align: center">
<img src="https://connect-prd-cdn.unity.com/20190718/p/images/e3c9cf9b-c732-4eb2-9afd-fe7de894f342_Custom_Inspector_Showcase_320px.gif" width="300"/>
</div>
UIWidgets can also be run on the EditorWindow without playing the runtime mode, thus, we can build some useful and pretty widgets to expand the editor.
With the provided packaged stateful widget `UnityObjectDetector` and its `onRelease` callback function, you can easily drag some objects (for example GameObject from Hierarchy, files from Project Window, etc) into the area, get the UnityEngine.Object[] references and make further modification.
Please refer to "UIWidgetsTests -> Drag&Drop" for simple examples.
## Debug UIWidgets Application

正在加载...
取消
保存