bool AddMissingScriptLabel(SerializedObject serializedObject) { SerializedProperty scriptProperty = serializedObject.FindProperty("m_Script"); if (scriptProperty != null) { hierarchy.Add(new IMGUIContainer(() => GenericInspector.ShowScriptNotLoadedWarning(scriptProperty))); return(true); } return(false); }
static bool AddMissingScriptLabel(VisualElement container, SerializedObject serializedObject, bool isPartOfPrefabInstance) { SerializedProperty scriptProperty = serializedObject.FindProperty("m_Script"); if (scriptProperty != null) { container.Add(new IMGUIContainer(() => GenericInspector.ShowScriptNotLoadedWarning(scriptProperty, isPartOfPrefabInstance))); return(true); } return(false); }