Schedule Dedicated Servers Documentation
  • SDS Documentation
  • Schedule In Unity
    • Extracting the game to unity
    • Creating an assetbundle
  • Creating plugins
    • How to create a plugin
    • The ClientAPI (custom content)
  • Custom Assets
  • Plugin Events
  • Texture/Material Replacement
  • Chat Messages
  • Chat Commands
  • Console Commands
  • HAPI Methods
Powered by GitBook
On this page

Texture/Material Replacement

PreviousPlugin EventsNextChat Messages

Last updated 1 month ago

The ClientAPI also allows you to easily replace textures or materials on the client game. You can use it to modify in-game billboards to add your server logo or simply re-texture parts of the game. You could theorically remaster the game or make a custom texture pack and send that to the client. It'll prob take some time to download and load but still.

1 ) Like with custom assets create your assetbundle and put the new texture inside it. 2 ) Load it like shown below.

string bundle = "mytextures.assets";
RegisterClientsideAssetBundle(bundle);

3 ) Register your texture or material override like shown below.

RegisterTextureReplace("HAM Legal Services Banner", bundle, "MyNewTexture");

This will replace the bus stop ad texture near the motel. (Only the one during daytime tho as it changes) You can ofcourse find the name of the night one and replace it too.

RegisterMaterialReplace("straight road 10m mat", bundle, "MyNewRoadMaterial");

This will replace parts of the road textures, there's multiple ones that you need to redo if you want to fully override all the roads textures.

And that's it, its as simple. Every player that will connect to the server will automatically download the asset and load the replacement textures you define.

Enjoy re-texturing the game !

😄