background color added

This commit is contained in:
2024-05-01 15:26:24 +01:00
parent b79865919d
commit e7e63927d4
4 changed files with 24 additions and 14 deletions

View File

@@ -45,6 +45,10 @@ public class CameraManager : MonoBehaviour
public bool m_CameraController;
private int m_CameraIndex = 0;
[Header("Shader")]
public Material m_HumanoidMaterial;
public Color m_BackgroundColor;
private void Awake()
{
if(_instance != null)
@@ -241,6 +245,10 @@ public class CameraManager : MonoBehaviour
try
{
m_Brain = GameObject.Find("CM Brain");
// Set dissapear color same as sky color
m_Brain.GetComponent<Camera>().backgroundColor = m_BackgroundColor;
Debug.Log(m_BackgroundColor);
m_HumanoidMaterial.SetColor("_DissapearColor", m_BackgroundColor);
}
catch
{