摘要: ContentSizeFitter、GridLayoutGroup、HorizontalLayoutGroup、VerticalLayoutGroup、AspectRatioFitter等UGUI布局组件在某些情况下不能立即生效,这是可以调用SetLayoutHorizontal()、SetLayo 阅读全文
posted @ 2023-03-15 17:54 朋丶Peng 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1. UIBehaviour.OnTransformParentChanged() 当此脚本的父物体发生变化时(变化时)调用此函数。 2. UIBehaviour.OnBeforeTransformParentChanged() 当此脚本的父物体发生变化之前调用此函数。 阅读全文
posted @ 2023-03-15 17:22 朋丶Peng 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1. 当此脚本所在的RectTransform维度发生变化时调用的函数(在Awake方法之前会调用一次)。 2. 维度发生变化也就是RectTransform下列属性发生变化: 大小:Width、Height; 锚点:Min(x,y)、Max(x,y); 轴心点:Pivot(x,y)。 阅读全文
posted @ 2023-03-15 17:16 朋丶Peng 阅读(157) 评论(0) 推荐(0) 编辑
摘要: AspectRatioFitter组件下的方法: public bool IsAspectModeValid() 描述:AspectRatioFitter组件是否有效。 测试过程: 条件: ①AspectRatioFitter.AspectMode是Fit In Parent/Envelope Pa 阅读全文
posted @ 2023-03-15 16:57 朋丶Peng 阅读(35) 评论(0) 推荐(0) 编辑