public bool CanAddChild(object child) { if (child.Is <IGameObject>() || child.Is <IGameObjectFolder>()) { return(false); } var domNode = child as DomNode; if (domNode != null) { foreach (var type in domNode.Type.Lineage) { if (type == Schema.placementsFolderType.Type) { return(true); } if (type == Schema.envSettingsFolderType.Type) { return(true); } } } return(PlacementsFolder.CanAddChild(child) | EnvSettingsFolder.CanAddChild(child)); }
public bool CanAddChild(object child) { var domNode = child as DomNode; if (domNode != null) { foreach (var type in domNode.Type.Lineage) { if (type == Schema.placementsFolderType.Type) { return(true); } if (type == Schema.abstractPlacementObjectType.Type) { return(true); } if (type == Schema.envSettingsFolderType.Type) { return(true); } } } if (EnvSettingsFolder.CanAddChild(child)) { return(true); } return(false); }