Hi all,
I’m new to crayta, and I’m trying to build my own game, but I’ve some problems:
I’m trying to build a wall made up of several square tiles. The idea is to let them change their color when they’re shot, going from color1 to color2 to color3. I firstly tried to create 3 “tile” voxelMesh assets (“tileColor1”, “tileColor2”, “tileColor3”), and script the first one in order to change it’s “mesh” property in tileColor2.mesh or tileColor3.mesh. (I also created a template from the scripted tile in order to replicate it)
Well, it kinda worked, but idk why, it changed after a while when it was shot, and it’s the same thing of changing the meshName from the Crayta editor UI, it takes a while and sometimes (since the 3 assets are similar but for the color) it doesn’t change at all.
So, to solve the problem I decided to change approach, and I picked up a “tileColor1”, created a template, and added tileColor2 and tileColor3 as children of the tileColor1. Then I applied a script to the first tile, making one of the three visible and collidable, and the other 2 invisible and uncollidable. Now it works very well, the problem is that I need more than 500 square tiles on my game and it seems to be too heavy for the server, which crashes when I test the game.
So my questions are:
- Is it possible to change the asset of a tile on runtime in a different, lighter way?
- How can I optimise it? I don’t know how to create a single “wall” voxel mesh asset, because I need every tile to be a separated entity, with its own color and its own characteristics, so it needs every time to load every tile
Thanks in advance for your help,
Allin18