回答編集履歴

1

HorizontalLayoutGroupの改造案を追記

2019/06/12 09:31

投稿

Bongo
Bongo

スコア10807

test CHANGED
@@ -15,3 +15,41 @@
15
15
 
16
16
 
17
17
  ![図2](b4f60d3c9fe37dee1eecfd7dc588e551.png)
18
+
19
+
20
+
21
+ **追記**
22
+
23
+ `SetLayoutVertical`を無効化した`HorizontalLayoutGroup`
24
+
25
+ ```C#
26
+
27
+ using UnityEngine;
28
+
29
+ using UnityEngine.UI;
30
+
31
+
32
+
33
+ [AddComponentMenu("Layout/Vertical Adjustable Horizontal Layout Group")]
34
+
35
+ public class VerticalAdjustableHorizontalLayoutGroup : HorizontalLayoutGroup
36
+
37
+ {
38
+
39
+ /// <inheritdoc />
40
+
41
+ public override void SetLayoutVertical()
42
+
43
+ {
44
+
45
+ // 垂直方向には何も操作を行わない
46
+
47
+ }
48
+
49
+ }
50
+
51
+ ```
52
+
53
+
54
+
55
+ ![図3](766f2f4ce282f4630e1e5adfe7034e6e.gif)