Infinite Forest Generation

Hi, I am kinda new to Unity, started toying with it last year. I want to know how to make a infinte forest. Basically like how Minecraft loads a new chunk, with it’s infinte generation. I am making a simple forest survival game, where you can only leave and finish the game once you have certain items. And you will have the option to stay in the forest, again, like Minecraft, with it’s ending. Thanks!

You could use that answer Adding trees dynamically - Questions & Answers - Unity Discussions to place your trees by script

Now, Minecraft is not really infinite, it is just really big. It is not possible to make an infinite world with a computer. You would start to get unaccuracy due to float accuracy while reaching large position. Minecraft often has an ocean to stop you from going any further (note that I am not familiar at all with Minecraft).

To place your trees, you could do that randomly as well as your relief but that would mean that if you come back to the same point, it looks different.
The solution is to use a hash function based on the position to return a value that will define where everything is placed. As it is based on the position when you come back to the same position, the function returns the same values and places the same environment.