The Scottish referendum was gifted by the UK, as was its parliament which can theoretically be dissolved by the UK at any time.
The NI thing is different, involving a peace treaty between the UK and Ireland.