Skip to content

Commit

Permalink
Ensure that shaders get included
Browse files Browse the repository at this point in the history
  • Loading branch information
egonelbre committed Apr 22, 2018
1 parent b8bb6db commit d98c07a
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 74 deletions.
5 changes: 3 additions & 2 deletions Assets/Camera/ColorizeEffect.cs
Expand Up @@ -14,13 +14,14 @@ public class ColorizeEffect : MonoBehaviour
public Camera backgroundCamera, levelCamera, textCamera;
public Material blendMaterial;

private Shader shader;
public Shader shader;
private Material material;

// Creates a private material used to the effect
void Awake ()
{
shader = Shader.Find ("Hidden/ColorizeEffect");
if (shader == null)
shader = Shader.Find ("Hidden/ColorizeEffect");
material = new Material (shader);
}

Expand Down
5 changes: 3 additions & 2 deletions Assets/Camera/LineEffect.cs
Expand Up @@ -9,15 +9,16 @@ public class LineEffect : MonoBehaviour
[Range (0, 5)]
public int iterations = 3;

private Shader shader;
public Shader shader;
private Material material;

private Camera effectCamera;

// Creates a private material used to the effect
void Awake ()
{
shader = Shader.Find ("Hidden/LineEffect");
if (shader == null)
shader = Shader.Find ("Hidden/LineEffect");
material = new Material (shader);
effectCamera = GetComponent<Camera> ();
}
Expand Down
7 changes: 5 additions & 2 deletions Assets/Prefabs/Cameras.prefab
Expand Up @@ -108,7 +108,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1373628785762428}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -7.63, y: 4.82, z: 0}
m_LocalPosition: {x: -4.336994, y: -5.739872, z: 0}
m_LocalScale: {x: 1, y: 1, z: 0.78420186}
m_Children:
- {fileID: 4591558714072014}
Expand Down Expand Up @@ -367,6 +367,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
lineWidth: 0.778
iterations: 5
shader: {fileID: 4800000, guid: 5b6dafd31f78c6145a7eab1267bbcabc, type: 3}
--- !u!114 &114557026932380136
MonoBehaviour:
m_ObjectHideFlags: 1
Expand All @@ -388,6 +389,7 @@ MonoBehaviour:
levelCamera: {fileID: 20968921505834768}
textCamera: {fileID: 20953407414548168}
blendMaterial: {fileID: 2100000, guid: 6250b15223f0742c7af1fcc6750dd972, type: 2}
shader: {fileID: 4800000, guid: 4e29fa5e13d0fc34ebe0274c3f32d3db, type: 3}
--- !u!114 &114659910633521664
MonoBehaviour:
m_ObjectHideFlags: 1
Expand All @@ -401,6 +403,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
lineWidth: 0.933
iterations: 5
shader: {fileID: 4800000, guid: 5b6dafd31f78c6145a7eab1267bbcabc, type: 3}
--- !u!114 &114709093157347994
MonoBehaviour:
m_ObjectHideFlags: 1
Expand All @@ -413,7 +416,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
player: {fileID: 0}
offset: {x: 0, y: 7.65, z: 0}
offset: {x: 0, y: 4, z: 0}
DefaultCameraZoom: 10
cameraZoomMask:
serializedVersion: 2
Expand Down
133 changes: 69 additions & 64 deletions Assets/Scenes/Level_1.unity
Expand Up @@ -242,6 +242,37 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 23.892363, y: 46.409424}
m_EdgeRadius: 0
--- !u!84 &12812997
RenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 970
m_Height: 596
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!114 &13599897 stripped
MonoBehaviour:
m_PrefabParentObject: {fileID: 114114591393131020, guid: 29a03fc86f075f94a8f0c7c08e00b0f7,
Expand Down Expand Up @@ -1652,37 +1683,6 @@ RectTransform:
m_PrefabParentObject: {fileID: 224678549238331058, guid: 29a03fc86f075f94a8f0c7c08e00b0f7,
type: 2}
m_PrefabInternal: {fileID: 1412754934}
--- !u!84 &310873928
RenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 640
m_Height: 480
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1001 &328568648
Prefab:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3158,37 +3158,6 @@ Prefab:
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 29a03fc86f075f94a8f0c7c08e00b0f7, type: 2}
m_IsPrefabParent: 0
--- !u!84 &514324397
RenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 640
m_Height: 480
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &514758473
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3673,7 +3642,7 @@ Prefab:
type: 2}
propertyPath: m_TargetTexture
value:
objectReference: {fileID: 514324397}
objectReference: {fileID: 1068751218}
- target: {fileID: 20953407414548168, guid: 1c046ab9da5144cb59bafa5b39ad38d3,
type: 2}
propertyPath: m_TargetTexture
Expand All @@ -3683,7 +3652,7 @@ Prefab:
type: 2}
propertyPath: m_TargetTexture
value:
objectReference: {fileID: 310873928}
objectReference: {fileID: 12812997}
- target: {fileID: 114709093157347994, guid: 1c046ab9da5144cb59bafa5b39ad38d3,
type: 2}
propertyPath: player
Expand All @@ -3704,6 +3673,11 @@ Prefab:
propertyPath: offset.y
value: 4
objectReference: {fileID: 0}
- target: {fileID: 20356820440570046, guid: 1c046ab9da5144cb59bafa5b39ad38d3,
type: 2}
propertyPath: m_AllowDynamicResolution
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 1c046ab9da5144cb59bafa5b39ad38d3, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -7987,6 +7961,37 @@ Transform:
m_Father: {fileID: 514758474}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!84 &1068751218
RenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_Width: 970
m_Height: 596
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &1079175558
GameObject:
m_ObjectHideFlags: 0
Expand Down
5 changes: 4 additions & 1 deletion ProjectSettings/EditorBuildSettings.asset
Expand Up @@ -4,4 +4,7 @@
EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
m_Scenes:
- enabled: 1
path: Assets/Scenes/Level_1.unity
guid: 4886fdffab8ecf34ca56fc396a5480af
2 changes: 2 additions & 0 deletions ProjectSettings/GraphicsSettings.asset
Expand Up @@ -35,6 +35,8 @@ GraphicsSettings:
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down
6 changes: 3 additions & 3 deletions ProjectSettings/ProjectSettings.asset
Expand Up @@ -11,8 +11,8 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: Linea
companyName: Adinfinitum
productName: Dancing Plague
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
Expand Down Expand Up @@ -632,7 +632,7 @@ PlayerSettings:
daydreamIconBackground: {fileID: 0}
cloudServicesEnabled: {}
facebookSdkVersion: 7.9.4
apiCompatibilityLevel: 2
apiCompatibilityLevel: 3
cloudProjectId:
projectName:
organizationId:
Expand Down

0 comments on commit d98c07a

Please sign in to comment.