void OnSelectionChanged() { var go = Selection.activeObject as GameObject; if (go is null) { return; } var meta = go.GetComponentInParent <VRMMeta>(); if (meta == m_currentRoot) { return; } m_currentRoot = meta; if (m_currentRoot is null) { m_treeViewState = null; m_treeView = null; } else { // update treeview Debug.Log(m_currentRoot); m_treeViewState = new TreeViewState(); m_treeView = new VRMSpringBoneTreeView(m_treeViewState, m_currentRoot); } Repaint(); }
public VRMMetaObject SetActiveGameObject(GameObject go) { var target = go?.GetComponent <VRMMeta>(); if (m_target != target) { m_target = target; m_metaEditor = null; } return(GetVRMMetaObject()); }
public VRMSpringBoneTreeView(TreeViewState treeViewState, VRMMeta root) : base(treeViewState) { m_root = root; Reload(); }