Tim Cooper 6 年前
当前提交
a6e72ad1
共有 1 个文件被更改,包括 10 次插入5 次删除
  1. 15
      ScriptableRenderPipeline/Core/CoreRP/Debugging/Prefabs/Scripts/UIFoldout.cs

15
ScriptableRenderPipeline/Core/CoreRP/Debugging/Prefabs/Scripts/UIFoldout.cs


public GameObject arrowOpened;
public GameObject arrowClosed;
protected override void Awake()
protected override void Start()
base.Awake();
base.Start();
onValueChanged.AddListener(SetState);
SetState(isOn);
}

if (arrowOpened == null || arrowClosed == null || content == null)
return;
arrowOpened.SetActive(state);
arrowClosed.SetActive(!state);
content.SetActive(state);
if (arrowOpened.activeSelf != state)
arrowOpened.SetActive(state);
if (arrowClosed.activeSelf == state)
arrowClosed.SetActive(!state);
if (content.activeSelf != state)
content.SetActive(state);
if (rebuildLayout)
LayoutRebuilder.ForceRebuildLayoutImmediate(transform.parent as RectTransform);

正在加载...
取消
保存