internal override void SetWidget(DebugUI.Widget widget) { base.SetWidget(widget); m_Field = CastWidget <DebugUI.Foldout>(); m_Container = GetComponent <DebugUIHandlerContainer>(); nameLabel.text = m_Field.displayName; int columnNumber = m_Field.columnLabels?.Length ?? 0; for (int index = 0; index < columnNumber; ++index) { var column = Instantiate(nameLabel.gameObject, GetComponent <DebugUIHandlerContainer>().contentHolder); column.AddComponent <LayoutElement>().ignoreLayout = true; var rectTransform = column.transform as RectTransform; var originalTransform = nameLabel.transform as RectTransform; rectTransform.anchorMax = rectTransform.anchorMin = new Vector2(0, 1); rectTransform.sizeDelta = new Vector2(100, 26); Vector3 pos = originalTransform.anchoredPosition; pos.x += (index + 1) * xDecal + xDecalInit; rectTransform.anchoredPosition = pos; rectTransform.pivot = new Vector2(0, 0.5f); rectTransform.eulerAngles = new Vector3(0, 0, 13); var text = column.GetComponent <Text>(); text.fontSize = 15; text.text = m_Field.columnLabels[index]; } UpdateValue(); }
internal override void SetWidget(DebugUI.Widget widget) { base.SetWidget(widget); m_Field = CastWidget <DebugUI.Foldout>(); m_Container = GetComponent <DebugUIHandlerContainer>(); nameLabel.text = m_Field.displayName; UpdateValue(); }
static DebugUI.Widget[] GenerateFrameSettingsPanelContent(HDRenderPipelineAsset defaultHdrpAsset, ref FrameSettingsHistory frameSettings) { var panelContent = new DebugUI.Widget[foldoutNames.Length]; for (int index = 0; index < foldoutNames.Length; ++index) { panelContent[index] = new DebugUI.Foldout(foldoutNames[index], GenerateHistoryArea(defaultHdrpAsset, ref frameSettings, index), columnNames); } return(panelContent); }