Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
35 lines
874 B
C#
35 lines
874 B
C#
using UnityEngine;
|
|
|
|
public class WrapVariableContentsScrollBarSize : MonoBehaviour
|
|
{
|
|
public UIWrapVariableContentVertical wrapContent;
|
|
|
|
private void Start()
|
|
{
|
|
ContentUpdate();
|
|
}
|
|
|
|
public void ContentUpdate()
|
|
{
|
|
UIWidget uIWidget = base.gameObject.GetComponent<UIWidget>();
|
|
if (uIWidget == null)
|
|
{
|
|
uIWidget = base.gameObject.AddComponent<UIWidget>();
|
|
}
|
|
int num = 0;
|
|
for (int i = 0; i < wrapContent.ItemParamList.Count; i++)
|
|
{
|
|
num += wrapContent.ItemParamList[i].Size;
|
|
}
|
|
uIWidget.height = num;
|
|
uIWidget.pivot = UIWidget.Pivot.Top;
|
|
Vector3 localPosition = Vector3.zero;
|
|
if (wrapContent.ItemParamList.Count > 0)
|
|
{
|
|
float position = wrapContent.ItemParamList[0].Position;
|
|
localPosition = new Vector3(localPosition.x, position, localPosition.z);
|
|
}
|
|
base.transform.localPosition = localPosition;
|
|
}
|
|
}
|