Materials for Wraps Ads and Recoloring

Bus Base Config

The bus customization replaces the standard materials, setup in your bus, on runtime with the customized ones by the player. To be able to replace them, we need to look at all materials on the bus and check if a material is a material instance of one of the base materials setup in the “BusBaseConfig”. If we find such a material on the bus we will replace that material if the bus has been customized.

E.g. If you want to be able customize the chassis of your bus do the following:

  1. open the BusBaseConfig and locate the default chassis material

  2. click the looking glass next to the material to navigate to the file location

  3. right click the material and create a material instance

  4. move the material instance to your mod folder. If the material is not in your mod folder it will not be packaged and not be available once you load the mod to the game.

  5. assign the material instance to your bus

  6. (optional) change the material instance to your liking, the look of this material instance will be the default visuals players will see when they buy your bus.

Static Mesh for decal placement

Decals are directly baked into the material, this is done by calculating the UV coordinates of the player interaction on the bus and placing the selected decal image on the selected UV coordinates. Those UV coordinates are calculated by raycasting against an invisible static mesh representation of the bus. To create this static mesh open the skeletal mesh of your bus and click the Make Static Mesh button .

Save this mesh inside your plugin folder and don’t forget to assign this mesh to the Customisation Mesh variable in the ModInfo.

Without this static mesh setup players won’t be able to place decals on their bus.

Next Step

Shop Video