Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-12-21 16:41:12 +08:00
parent 7f4e339032
commit be1ad1566b
12 changed files with 204488 additions and 4699 deletions

View File

@@ -97,5 +97,5 @@ Material:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
- _Tint2: {r: 0, g: 0, b: 0, a: 0.5}
- _Tint2: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -366,16 +366,24 @@ public class SkyboxBlender : MonoBehaviour
// set the skybox material
void SetSkyBoxes(bool firstTex = false, int firstTexIndex = 0, bool secondTex = false, int secondTexIndex = 0, bool apply = false)
{
if (firstTex)
try
{
skyboxBlenderMaterial.SetTexture("_Tex", skyboxMaterials[firstTexIndex].GetTexture("_Tex"));
skyboxBlenderMaterial.SetColor("_Tint", skyboxMaterials[firstTexIndex].GetColor("_Tint"));
}
if (firstTex)
{
skyboxBlenderMaterial.SetTexture("_Tex", skyboxMaterials[firstTexIndex].GetTexture("_Tex"));
skyboxBlenderMaterial.SetColor("_Tint", skyboxMaterials[firstTexIndex].GetColor("_Tint"));
}
if (secondTex)
if (secondTex)
{
skyboxBlenderMaterial.SetTexture("_Tex2", skyboxMaterials[secondTexIndex].GetTexture("_Tex"));
skyboxBlenderMaterial.SetColor("_Tint2", skyboxMaterials[secondTexIndex].GetColor("_Tint"));
}
}
catch
{
skyboxBlenderMaterial.SetTexture("_Tex2", skyboxMaterials[secondTexIndex].GetTexture("_Tex"));
skyboxBlenderMaterial.SetColor("_Tint2", skyboxMaterials[secondTexIndex].GetColor("_Tint"));
Debug.LogWarning("Skybox Blender: There was an error setting the skybox materials. Please make sure the indices are correct and the materials are assigned.");
}
if (apply)