Rhythm Rally: Fixed broken background in editor preview. FreeCam components can now be enabled/disabled with ctrl+shift+D.

This commit is contained in:
Jenny Crowe 2022-02-20 06:57:20 -07:00
parent 186dac1757
commit 2d996ba3c1
4 changed files with 26 additions and 5 deletions

View File

@ -311,7 +311,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4052947733920485538}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a0e5d5d77f9b8824b997a02d704003ef, type: 3}
m_Name:

View File

@ -407,7 +407,7 @@ SpriteRenderer:
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_WasSpriteAssigned: 0
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1871413452992259420
@ -974,7 +974,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 1}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
@ -1047,7 +1047,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4052947733920485538}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a0e5d5d77f9b8824b997a02d704003ef, type: 3}
m_Name:

View File

@ -34,7 +34,7 @@ namespace RhythmHeavenMania
public float startOffset;
public bool playOnStart;
public float startBeat;
private GameObject currentGameO;
[NonSerialized] public GameObject currentGameO;
public bool autoplay;
public event Action<float> onBeatChanged;

View File

@ -134,6 +134,14 @@ namespace RhythmHeavenMania.Editor
{
CommandManager.instance.Redo();
}
if (Input.GetKey(KeyCode.LeftShift))
{
if (Input.GetKeyDown(KeyCode.D))
{
ToggleDebugCam();
}
}
}
if (Timeline.instance.timelineState.selected && Editor.instance.canSelect)
@ -415,5 +423,18 @@ namespace RhythmHeavenMania.Editor
{
return (rectTransform.gameObject.activeSelf && RectTransformUtility.RectangleContainsScreenPoint(rectTransform, Input.mousePosition, Editor.instance.EditorCamera));
}
public void ToggleDebugCam()
{
var game = GameManager.instance.currentGameO;
if (game != null)
{
foreach(FreeCam c in game.GetComponentsInChildren<FreeCam>(true))
{
c.enabled = !c.enabled;
}
}
}
}
}