Creating Your Own Voxel Model
Voxel models are automatically generated from a vox file, which is converted to a base64 string and put into a property in TestVoxSpawner (VoxFile).
To create your own, you'll need
MagicaVoxel Verson 0.99.6.4
Base64 Guru
You MUST use MagicaVoxel Verson 0.99.6.4
Create your voxel model in MagicaVoxel
Save it via the floppy disk icon, and navigate to your saves folder. Exporting doesn't work for some reason so you have to use the save instead.
Convert it to a base 64 string via this site
Click the small
copybutton and copy it to your clipboardCheck if the last few characters at the end of the base64 string is both "A" or "=" - If not, this would most likely mean that your voxel model will not appear in game since it's weird like that
Within within your mod.cs script, paste the text as a public static string
Within your Action Event, call the function
DeleteVoxelModel
for each children on your Instance gameobject -Check out Run Method
.Add the
TestVoxSpawner
component to the instance with the string VoxFile being set to your base64 string -Check out Add 3D Component
.If all goes well, in theory your item will have a different model.
Last updated