Skip to content

Commit

Permalink
Made all ui assets high res and let the UI scale. Playing on a 3k/4k …
Browse files Browse the repository at this point in the history
…resolution allows high res screenshots. Also small depth renderer fix
  • Loading branch information
OlivierHokke committed Mar 22, 2015
1 parent 80f820d commit 8ecc16f
Show file tree
Hide file tree
Showing 19 changed files with 1,168 additions and 33 deletions.
1,138 changes: 1,135 additions & 3 deletions Assets/Depth.unity

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Assets/DepthRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ void LateUpdate()

public void SetDepthRenderer(bool active, float start, float end)
{
this.start = start;
this.end = end;
if (active && !activated)
{
activated = true;
Expand Down
22 changes: 11 additions & 11 deletions Assets/Iris.unity
Original file line number Diff line number Diff line change
Expand Up @@ -3479,7 +3479,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: -7}
m_SizeDelta: {x: -40, y: 26}
m_SizeDelta: {x: -40, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!114 &157873927
MonoBehaviour:
Expand Down Expand Up @@ -5271,7 +5271,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: -7}
m_SizeDelta: {x: -40, y: 26}
m_SizeDelta: {x: -40, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!114 &225428934
MonoBehaviour:
Expand Down Expand Up @@ -19321,7 +19321,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: -7}
m_SizeDelta: {x: -40, y: 26}
m_SizeDelta: {x: -40, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!114 &743528331
MonoBehaviour:
Expand Down Expand Up @@ -31395,8 +31395,8 @@ Transform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1229397836}
m_LocalRotation: {x: -.707106829, y: 0, z: 0, w: .707106829}
m_LocalPosition: {x: .5, y: -55.8699989, z: -10.6000004}
m_LocalRotation: {x: -.12144386, y: .0306155812, z: .00399692683, w: .992118001}
m_LocalPosition: {x: 256.639526, y: -356.378998, z: -701.634949}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
Expand Down Expand Up @@ -39122,7 +39122,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: -7}
m_SizeDelta: {x: -40, y: 26}
m_SizeDelta: {x: -40, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1491434714
MonoBehaviour:
Expand Down Expand Up @@ -39749,7 +39749,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: -7}
m_SizeDelta: {x: -40, y: 26}
m_SizeDelta: {x: -40, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1512373084
MonoBehaviour:
Expand Down Expand Up @@ -42202,12 +42202,12 @@ MonoBehaviour:
m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1024, y: 800}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_MatchWidthOrHeight: 1
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
Expand Down Expand Up @@ -43414,7 +43414,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6c0bb1de2c5507640bef6e047aa9b144, type: 3}
m_Name:
m_EditorClassIdentifier:
screenshotScale: 1
screenshotScale: 2
folder: Screenshots/
button: 292
ctrl: 0
Expand Down
Binary file modified Assets/UI/Arrow.psd
Binary file not shown.
6 changes: 3 additions & 3 deletions Assets/UI/Arrow.psd.meta

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

Binary file modified Assets/UI/Gear.psd
Binary file not shown.
6 changes: 3 additions & 3 deletions Assets/UI/Gear.psd.meta

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

Binary file modified Assets/UI/Icon_IRIS.psd
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/UI/Icon_IRIS.psd.meta

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

4 changes: 2 additions & 2 deletions Assets/UI/Indicator/IndicatorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private BaseIndicator showAudioIndicator(GameObject source, float timer, float s
if (waveperiod.HasValue)
ai.wavePeriod = waveperiod.Value;
RectTransform r = ai.GetComponent<RectTransform>();
r.SetParent(indicatorPanel);
r.SetParent(indicatorPanel, false);
r.localPosition = Vector3.zero;
return ai;
}
Expand All @@ -43,7 +43,7 @@ private BaseIndicator showScreenIndicator(float timer)
ScreenAudioIndicator si = (ScreenAudioIndicator)Instantiate(screenIndicatorPrefab);
si.activeTimer = timer;
RectTransform r = si.GetComponent<RectTransform>();
r.SetParent(indicatorPanel);
r.SetParent(indicatorPanel, false);
r.localPosition = Vector3.zero;
return si;
}
Expand Down
Binary file modified Assets/UI/Indicator/ScreenWave.psd
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/UI/Indicator/ScreenWave.psd.meta

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

Binary file modified Assets/UI/Indicator/SoundWave.psd
Binary file not shown.
5 changes: 3 additions & 2 deletions Assets/UI/Indicator/SourceAudioIndicator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class SourceAudioIndicator : BaseIndicator
{
Expand Down Expand Up @@ -34,7 +35,7 @@ void Update ()
if (activeTimer > 0f)
{
RectTransform r = (RectTransform)Instantiate(soundWavePrefab);
r.SetParent(transform);
r.SetParent(transform, false);
r.localPosition = Vector3.zero;
}
}
Expand All @@ -49,6 +50,6 @@ void Update ()

// set position on camera
Vector3 pos = CameraManager.currentViewingCamera.WorldToScreenPoint(offset + source.transform.position);
GetComponent<RectTransform>().anchoredPosition = pos;
GetComponent<RectTransform>().position = pos.setz(0);
}
}
Binary file modified Assets/UI/SubtitleNameFrame.psd
Binary file not shown.
6 changes: 3 additions & 3 deletions Assets/UI/SubtitleNameFrame.psd.meta

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

Binary file modified Assets/UI/SubtitleTextFrame.psd
Binary file not shown.
6 changes: 3 additions & 3 deletions Assets/UI/SubtitleTextFrame.psd.meta

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

2 changes: 1 addition & 1 deletion Assets/UI/Subtitles/SubtitlesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static SubtitleElement ShowSubtitle(float timer, string sourceName, strin
private SubtitleElement showSubtitle(float timer, string sourceName, string text)
{
SubtitleElement se = (SubtitleElement) Instantiate(subtitlePrefab);
se.transform.SetParent(subtitlePanel);
se.transform.SetParent(subtitlePanel, false);
se.Setup(timer, sourceName.Trim(), text.Trim());
return se;
}
Expand Down

0 comments on commit 8ecc16f

Please sign in to comment.