I am trying to make a game with deformable terrain, but I do not want to use Unity’s terrain engine but rather a mesh. Is there a way to access and modify a file in the game files while running the game at a text based level?
A simple way to put this is if I were to have a .txt file read out its text and display it, could I have the text in the .txt file edited and then changed in real time?
.Obj files are read in plain text as display the coordinates of the points followed by the connection of the points as faces or lines. That’s easy enough to code something to modify the mesh in-game. A simple square plane looks like this in an obj file:
v 1.000000 0.000000 -1.000000 v 1.000000 0.000000 1.000000 v -1.000000 0.000000 1.000000 v -1.000000 0.000000 -1.000000 usemtl (null) s off f 1 4 3 2
My second question, if the first can be answered, is if it is possible to also modify the texture in real time.
Please let me know anything you can, even if it’s about modifying a text file in real-time directly from the game! Thanks!