- 博客(4)
- 收藏
- 关注
原创 【Unity】RectTransform sizeDelta与Rect.size
【Unity】 RectTransform sizeDelta与Rect.size昨天因为有个滚动列表需要纵向自适应的需求,发现了项目底层滚动组件的bug。底层滚动组件可视区域的尺寸取值用的是sizeDelta,其实在此之前我也一直有这样的误解,认为sizeDelta就是实际尺寸,但其实不然,实际尺寸是rect.size。查阅Unity官方文档,发现:The size of this RectTransform relative to the distances between the anch
2020-05-22 10:53:56 3153
原创 【Unity】 Orthographic Size
Unity官方描述Camera’s half-size when in orthographic mode.The orthographicSize is half the size of the vertical viewing volume.The horizontal size of the viewing volume depends on the aspect ratio.o...
2020-04-08 12:02:57 715
原创 C# List.Sort(IComparer<T> comparer) 不稳定排序
C# List.Sort(IComparer\踩坑使用List.Sort(IComparer<T> comparer)进行自定义排序时,发现关键字相等的元素排序后先后顺序发生改变。检查自己实现的ICompare<T>.Compare方法逻辑没发现问题。后来查阅MSDN文档发现:This method uses Array.Sort, which applies the...
2020-04-02 10:14:17 1025
原创 Unity 快键复制输出Prefab节点路径
使用transform.Find需要传入相应节点的路径。之前懵懂无知,傻乎乎地挨个节点复制粘贴,遇到节点层级多的,还担心看岔看漏,得反复检查。 有一回复制得恶心难受,迫出灵光一闪。想到开发快捷键在Console面板输出节点路径。解放生产力!后来进一步偷懒,将路径复制到剪贴板,直接粘贴,一步到位!public class Tools{ // 根节点-&amp;amp;amp;gt;当前节点的完整路径 ...
2019-01-22 15:12:17 1661 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人