Skip to content

Commit

Permalink
set screen resolution on 0.5s after startup
Browse files Browse the repository at this point in the history
  • Loading branch information
kodai100 committed Aug 29, 2021
1 parent 5ae6705 commit f3fa02a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
21 changes: 17 additions & 4 deletions Assets/Scenes/Repulser.unity
Original file line number Diff line number Diff line change
Expand Up @@ -7472,7 +7472,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1270, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &459597252
MonoBehaviour:
Expand Down Expand Up @@ -17164,7 +17164,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 800, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1147569779
Expand Down Expand Up @@ -21266,6 +21266,7 @@ GameObject:
- component: {fileID: 1460004942}
- component: {fileID: 1460004941}
- component: {fileID: 1460004943}
- component: {fileID: 1460004944}
m_Layer: 0
m_Name: SceneContext
m_TagString: Untagged
Expand Down Expand Up @@ -21331,6 +21332,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a7698e59a37e7e341b3e7519a0477a62, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1460004944
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1460004940}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 544c8f1b2bda89c40a1c2c0d2e888241, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1468837318
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -23240,7 +23253,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 340, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1576998453
Expand Down Expand Up @@ -25095,7 +25108,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 340, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1705774458
Expand Down
3 changes: 0 additions & 3 deletions Assets/Scripts/1_Installers/MasterInstaller.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using ProjectBlue.RepulserEngine.Controllers;
using ProjectBlue.RepulserEngine.Domain.UseCase;
using ProjectBlue.RepulserEngine.Repository;
using UnityEngine;
using Zenject;

namespace ProjectBlue.RepulserEngine.Installers
Expand Down Expand Up @@ -65,8 +64,6 @@ public override void InstallBindings()
Container.BindInterfacesAndSelfTo<SignalTriggerController>().AsSingle().NonLazy();

Container.BindInterfacesAndSelfTo<MidiOscConversionController>().AsSingle().NonLazy();

Screen.SetResolution(1280, 720, false);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using UnityEngine;

namespace ProjectBlue.RepulserEngine
{
public class ScreenResolutionManager : MonoBehaviour
{
private void Start()
{
StartCoroutine(Delay());
}

private IEnumerator Delay()
{
yield return new WaitForSeconds(0.5f);

Screen.SetResolution(1280, 720, false);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f3fa02a

Please sign in to comment.