LogicalError / realtime-CSG-for-unity

Realtime-CSG, CSG level editor for Unity
https://realtimecsg.com
MIT License
735 stars 77 forks source link

Default Material is not used in Non-Unity based Custom SRP. #344

Closed VeryThiefLike closed 2 years ago

VeryThiefLike commented 2 years ago

I ran into a problem upgrading to the package-based version, while using my own Custom Rendering Pipeline.

The default materials from the package don't update to the custom rendering pipeline's default material and shader, causing them to be pink.

FIX: I modified the MaterialUtility::GetRenderPipelineType to return the render pipeline's name instead of an empty string to trigger updating the default materials.

nukeandbeans commented 2 years ago

This is a bug. That part of the code should have actually been removed, but I missed that when refactoring. There is no longer a need for checking sub-directories for materials, as the default ones are updated to the correct shader, based on the pipeline default shader. I'll get to this as soon as I can. Thanks for the heads up!