I use both unraid and freenas (I have not yet upgraded). They both have positives and negatives.
I use unraid for media, software (exe's, iso's, drivers) and certain PC backups.
I use freenas for serving up iscsi storage to my esxi servers. I do also have a small slice carved for some data.
In terms of licensing costs, you will spend any savings from not buying unraid on the hardware/upgrades (system RAM normally) on freenas/TrueNAS. There is no savings to be had.
Unraid is designed to be managed by anyone at nearly any level of technical know-how. It just works. It however also does nifty stuff now like VMs.
As far as the resilliency part goes, you would create a parity disk, then optionally a second parity disk (basically a RAID 6 setup). Unraid is not raid, it will create a parity disk or two to help reconstruct missing disks. A meat feature of unraid, no matter how many drives fail or which ones, any surviving disks will contain whichever data is stored on them and it will be available to you (the array may be completely degraded though). Unraid writes with dual parity drives are slow when working with HDDs. Fast hdds will still limit write speed to less than a 1gbps LAN connection. You can mitigate this with a cache drive (significantly different use than freenas/truenas). It can speed up writes and potentially keep your array of hdds sleeping longer than it otherwise would be. There's lots of free help with unraid as well, a strong community.
There is a low cost to expand unraid, just add another disk as long as it it smaller than the parity disk(s). There is a procedure to swap.
Freenas/truenas is much more customizable when it comes to resilliency of drive failure. You chose what type of arrays you want and how they are organized. You can pick arrays that lead to better performance or better survivability. There's many combinations and many best practices. ZFS is considered to be among the best files systems to most homelabbers. When used correctly in FreeNAS/TrueNAS, you can to a high degree of expectation ensure your data does not become silently corrupted. This is quite valuable. ZFS raid arrays are usually z1/z2 1 or 2 parity disks. These arrays (containing your data) will not survive losing more disks than the array type, 1/2/3.
There is a higher cost to adding storage freenas/truenas. Arrays require planning and complete deployment.
Theres too much to cover everything in any one post. The difference at the end of the day IMO is how do you want to manage the server, the data, and does either offer any features you need. For me, I needed the unparalleled flexibility of cheap adding disks to unraid. I also needed to provide network storage to my hypervisors. Both ended up being my answer to my storage problem.
Edit: I'm not a fan of virtualizing either of these OS's. There are those who have for sure, but they are the few.