private void OnEnable() { s_ActiveInspectors.Add(this); RootElement = new VisualElement { name = "Entity Inspector" }; RootElement.style.marginBottom = RootElement.style.marginTop = RootElement.style.marginLeft = RootElement.style.marginRight = 0; RootElement.style.paddingBottom = RootElement.style.paddingTop = RootElement.style.paddingLeft = RootElement.style.paddingRight = 0; RootElement.AddStyleSheetSkinVariant(StyleSheets.Inspector.StyleSheet); Application.BeginAuthoringProject += EnterAuthoringContext; Application.EndAuthoringProject += ExitAuthoringContext; EnterAuthoringContext(Application.AuthoringProject); }