How did you make that connection? If you aren't hunting, you can do farm work. If you aren't doing that, you can produce tools. If you aren't doing that, you can go mine ores, make clothes, etc. Its not like agriculture was invented and suddenly anyone who wasnt farming was philosophizing, there is always something productive for you to do. Having a UBI without replacing the people who actually do the productive work is just rewarding those who don't work, you didn't suddenly remove the need for work, someone still has to do all that work that needs to get done, but now there is less incentive for them to do so when they can just kick back and worry about someone else doing it.
A UBI is a socialist fantasy that will only ever work if you have a slave force (read: AI) that does work for free.