The IRA was riddled by informers and British secret agents by the late 80s/early 90s, and Adams and McGuinness had come to realise there couldn’t be a military victory.
Added to that, loyalist terrorists were carrying out incredibly violent and relatively large scale random gun attacks on pubs, bookmakers and shops, seeing ordinary Catholics targeted as they went about their lives, something which meant the IRA’s continuation of ‘the war’ (to which the terrible loyalist atrocities were a response) became extremely unpopular in their own communities.
Both things were major drivers in bringing Republicans to the table.
As to unity, I doubt that it will be in the lifetime of anyone posting on here. It may happen at some point far down the line - but it’s hard to know what the future holds in a year or two, given the precarious position of the world at present, never mind what might be happening in 50 or 60 years time.