-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In TexturesUnlimitedLoader.cs the method loadTransparencyData() is never called. As a result, isTransparentShader always returns false and the constructor for renderQueue doesn't properly parse default renderQueue values for transparent shaders. If you try to call loadTransparencyData() bad things happen(I'm not a coder, something about null values), so basically you need to wrap the logic in that method in some checks to catch exceptions, null values etc. Then in load() you want to call loadTransparencyData() just before PresetColor.loadColors(). Doing this sets up the proper environment for isTransparentShader to return true when it should. I would include the logic I used for loadTransparencyData() but it's probably not great, I just had copilot do it(it did work though, and I roughly understood enough to guide it towards making these changes properly so I could test the idea locally).
And now that the renderQueue constructor is fixed, you can change line 572 in TextureSet.cs to:
material.renderQueue = renderQueue;
Because the constructor parses all the default values and then also uses the value pulled from the config file if it's been set.
I hope this is the right way to fix these two problems, it does seem to work for me.
WORKAROUND: If you're experiencing this bug, know that you can use "update" mode in the meantime which will properly read and use your renderQueue setting in the config file. Just put renderQueue = value(probably 3000, since you're here) and mode = update inside the MATERIAL node of your TextureSet config.