Skip to content

Commit

Permalink
Fixed shader dependency issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keijiro Takahashi authored and Keijiro Takahashi committed Aug 5, 2014
1 parent b948eea commit bca57d6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Assets/SonarFx/SonarFx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ public enum SonarMode { Directional, Spherical }
[SerializeField] Color _addColor = Color.black;
public Color addColor { get { return _addColor; } set { _addColor = value; } }

// Reference to the shader.
[SerializeField] Shader shader;

// Private shader variables
Shader shader;
int baseColorID;
int waveColorID;
int waveParamsID;
Expand All @@ -76,7 +78,6 @@ public enum SonarMode { Directional, Spherical }

void Awake()
{
shader = Shader.Find("Hidden/SonarFX");
baseColorID = Shader.PropertyToID("_SonarBaseColor");
waveColorID = Shader.PropertyToID("_SonarWaveColor");
waveParamsID = Shader.PropertyToID("_SonarWaveParams");
Expand Down
3 changes: 2 additions & 1 deletion Assets/SonarFx/SonarFx.cs.meta

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

1 change: 1 addition & 0 deletions Assets/Test.unity
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ MonoBehaviour:
_waveInterval: 20
_waveSpeed: 10
_addColor: {r: 0, g: 0, b: 0, a: 1}
shader: {fileID: 4800000, guid: 6d12e7ab487bf49d18b89038af741a18, type: 3}
--- !u!114 &768017763
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
4 changes: 3 additions & 1 deletion ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
m_Scenes:
- enabled: 1
path: Assets/Test.unity
Binary file modified SonarFx.unitypackage
Binary file not shown.

0 comments on commit bca57d6

Please sign in to comment.