@@ -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: []
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user