It’s used for a small tutorial scene and I dont want to copy paste the cubes as the textures are changing rapidly (60 png pictures in a Texture2D[ ], changing every 0.01s) and too many are really killing the fps down.
And now I want to “teleport” them as soon as the player gets too far away and it’s new position should be in front of the player.
So:
You should mainly look at the last three methods I believe.
Demo of my Script->> https://dl.dropbox.com/u/32175794/Demo/Demo.html
Move, ReadMap and Read… It reads the map that is created before hand… which I tested like 2000x2000 and worked fine.
But only displays a radius around the player. Set it to 3 and its 9 tiles displayed. My script is referencing a PoolManager that I created( and I attached so you can use it). The pool manager creates a set number of tiles on start of the game… Then as you need them it will pull and deactive them for later use. Which is what the Read and ReadMap handle.
That’s a very good script but it doesnt do what i need. Your script drops the fps in my game because all objects have a image-sequence as material texture.
I managed to write my own script but it still sometimes skips a block for an unknown reason.
Your script copies the objects and generates the level, wich is good, but i need them dinamicly created around the player, and those who are at a large distance to get destroyed. My current problem is, I cant get it to position the object right in the grid.
The script does exactly that except instead of destroying them it uses the same objects… So it doesn’t constantly instanciate and destroy which is a waste of resources.
In the video you can see the map generate around the player… If you watch the entire thing. I’ll admit its a bit much to deal with without know what your looking at however.
nah nvm i figured out how to do it. Your script was a bit too much to trim it down to what i needed. All i did was locate the block the player is currently on, then re-position the others around that block and everything worked fine. I didnt instantiate any objects because as i said they were using image sequences as material texture so many of them really did take the fps down, nor did i use destroy for the same reasons.