2022-02-18 01:31:38 +00:00
|
|
|
|
using QSB.Utility;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace QSB.PlayerBodySetup.Remote
|
|
|
|
|
{
|
|
|
|
|
public static class ShaderReplacer
|
|
|
|
|
{
|
|
|
|
|
public static void ReplaceShaders(GameObject prefab)
|
|
|
|
|
{
|
|
|
|
|
DebugLog.DebugWrite($"TODO: replace shaders for prefab {prefab}");
|
2022-02-18 01:37:56 +00:00
|
|
|
|
|
|
|
|
|
foreach (var renderer in prefab.GetComponentsInChildren<Renderer>())
|
|
|
|
|
{
|
|
|
|
|
DebugLog.DebugWrite($"found renderer {renderer}");
|
|
|
|
|
foreach (var material in renderer.sharedMaterials)
|
|
|
|
|
{
|
|
|
|
|
DebugLog.DebugWrite($"found shared material {material}");
|
|
|
|
|
DebugLog.DebugWrite($"shader = {material.shader}");
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-18 01:31:38 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|