빌드개선
This commit is contained in:
parent
3c83b770e1
commit
85a7ad5649
@ -1,28 +1,49 @@
|
||||
using SoulGames.EasyGridBuilderPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEngine.Rendering.PostProcessing;
|
||||
using Bloom = UnityEngine.Rendering.Universal.Bloom;
|
||||
|
||||
public class ChangeBuildMode : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private EasyGridBuilderPro gridBuilder;
|
||||
|
||||
private PostProcessingManager volume;
|
||||
private Bloom bloomEffect;
|
||||
private Color orgColor;
|
||||
|
||||
void Start()
|
||||
{
|
||||
volume = Singleton<PostProcessingManager>.Instance;
|
||||
volume._globalVolume.profile.TryGet(out bloomEffect);
|
||||
orgColor = bloomEffect.tint.value;
|
||||
Debug.Log(orgColor);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
|
||||
|
||||
if (gridBuilder.showEditorAndRuntimeCanvasGrid)
|
||||
{
|
||||
gridBuilder.showEditorAndRuntimeCanvasGrid = false;
|
||||
// bloomEffect.tint.value = orgColor;
|
||||
bloomEffect.tint.value = orgColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
gridBuilder.showEditorAndRuntimeCanvasGrid = true;
|
||||
// bloomEffect.tint.value = new Color(0.0f , 0.0f, 0.0f);
|
||||
}
|
||||
bloomEffect.tint.value = new Color(0.0f , 0.0f, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && gridBuilder.showEditorAndRuntimeCanvasGrid)
|
||||
{
|
||||
gridBuilder.showEditorAndRuntimeCanvasGrid = false;
|
||||
bloomEffect.tint.value = orgColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public enum RendererFeatureName
|
||||
public class PostProcessingManager : Singleton<PostProcessingManager>
|
||||
{
|
||||
[SerializeField]
|
||||
private Volume _globalVolume;
|
||||
public Volume _globalVolume;
|
||||
|
||||
[SerializeField]
|
||||
private Volume _playerVolume;
|
||||
|
Loading…
Reference in New Issue
Block a user