public CustomInspectorElement(PropertyPath basePath, IInspector inspector, PropertyElement root) { m_Root = root; binding = this; m_BasePath = basePath; name = inspector.Type.Name; Inspector = inspector; try { m_Content = Inspector.Build(); if (null == m_Content) { return; } HasInspector = true; // If `IInspector.Build` was not overridden, it returns this element as its content. if (this != m_Content) { Add(m_Content); RegisterBindings(m_Content); } } catch (Exception exception) { Debug.LogException(exception); } }
public CustomInspectorElement(PropertyPath basePath, IInspector inspector, PropertyElement root) { m_Root = root; binding = this; m_BasePath = basePath; name = inspector.Type.Name; m_Inspector = inspector; m_Inspector.Parent = this; m_Content = m_Inspector.Build(); if (null == m_Content) { return; } if (this != m_Content) { Add(m_Content); RefreshBindings(); } HasInspector = true; }