After looking through the book I found out how one can learn their affinity and unlock it. All you need to do is to use a spell the book even has the spell. But the problem is not the spell's complexity but its power cost being higher than three or four adult unicorns' worth of magic so there are only three good options.