Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#146871   2018-08-04 21:00          
Ah I see there is a way to load any arbitrary texture from disk (in a proper format) the Decal is nothing more than a wrapper over the makeTexture function of the ResourceRef class so you can directly use it like:
ResourceRef texture = new Decal("MW_Mod\\Textures\\checkerd.png");
this in turn can be used with the Part.setTexture like
p.setTexture(texture.id());

But it would be better if you created a proper RPK entry for each texture because these dynamic resources will have a dynamic typeID (0xFFFF....) and I'm unsure what will happen if you try and save a part with such a texture it's not impossible it'll work but I have not tested this.
If you test this out and it works then I see no other potential problem with the implementation.