Skip to content

Commit 67daf33

Browse files
committed
Fader Improvements and Billboard script
Fixed Fader Shader not loading problem, its now on a Resources folder Fixed Fader breaking when scene changes. Added CameraFacingBillboard.cs to Other
1 parent 6b98855 commit 67daf33

9 files changed

Lines changed: 22 additions & 1 deletion

Packages/Fader 1.9.1.unitypackage

4.1 KB
Binary file not shown.
125 KB
Binary file not shown.
125 KB
Binary file not shown.

Testie/Assets/seyahdoo/fading/Editor/FaderSingletonInspector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/// <summary>
1414
/// A custom inspector script for fancy controll buttons
1515
/// </summary>
16-
[CustomEditor(typeof(FaderSingletonInspector))]
16+
[CustomEditor(typeof(FaderSingleton))]
1717
public class FaderSingletonInspector : Editor
1818
{
1919

Testie/Assets/seyahdoo/fading/Resources.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Testie/Assets/seyahdoo/fading/Unlit Transparent Color Shader.shader renamed to Testie/Assets/seyahdoo/fading/Resources/Unlit Transparent Color Shader.shader

File renamed without changes.

Testie/Assets/seyahdoo/fading/Unlit Transparent Color Shader.shader.meta renamed to Testie/Assets/seyahdoo/fading/Resources/Unlit Transparent Color Shader.shader.meta

File renamed without changes.

Testie/Assets/seyahdoo/fading/singleton/FaderSingleton.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
///Created by oculus engineers in OVRScreenFade class
1010
///Edited by eVRydayVR -> https://evrydayvr.wordpress.com/2015/07/15/unity-5-x-package-fade-screen-inout/
1111
///Edited so that you can use it as a static service in game
12+
///Fixed "scene change camera null" bug
1213

1314
///usage:
1415
///seyahdoo.fading.Fader.CreateInstance();
@@ -76,7 +77,15 @@ void AddCameraControlls()
7677
void SetFadersEnabled(bool value)
7778
{
7879
foreach (ScreenFadeControl fadeControl in fadeControls)
80+
{
81+
if(fadeControl == null)
82+
{
83+
AddCameraControlls();
84+
SetFadersEnabled(value);
85+
return;
86+
}
7987
fadeControl.enabled = value;
88+
}
8089
}
8190

8291
private IEnumerator DoFade()

Testie/Assets/seyahdoo/other/CameraFacingBillboard.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public class CameraFacingBillboard : MonoBehaviour
2929
void Awake()
3030
{
3131
m_Camera = Camera.main;
32+
33+
transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.forward,
34+
m_Camera.transform.rotation * Vector3.up);
3235
}
3336

3437
void Update()

0 commit comments

Comments
 (0)