diff --git a/Assets/Fungus/Flowchart/Editor/GLDraw.cs b/Assets/Fungus/Flowchart/Editor/GLDraw.cs index b9ec2977..9c8446cd 100755 --- a/Assets/Fungus/Flowchart/Editor/GLDraw.cs +++ b/Assets/Fungus/Flowchart/Editor/GLDraw.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.Assertions.Must; using System.Collections; using System; @@ -105,14 +106,8 @@ public class GLDraw if (lineMaterial != null) return; - lineMaterial = new Material("Shader \"Lines/Colored Blended\" {" + - "SubShader { Pass { " + - " Blend SrcAlpha OneMinusSrcAlpha " + - " ZWrite Off Cull Off Fog { Mode Off } " + - " BindChannels {" + - " Bind \"vertex\", vertex Bind \"color\", color }" + - "} } }"); - lineMaterial.hideFlags = HideFlags.HideAndDontSave; + lineMaterial = Resources.Load("GLLineDraw", typeof(Material)) as Material; + lineMaterial.hideFlags = HideFlags.HideAndDontSave; lineMaterial.shader.hideFlags = HideFlags.HideAndDontSave; } diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat new file mode 100644 index 00000000..d6af24a8 --- /dev/null +++ b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GLLineDraw + m_Shader: {fileID: 4800000, guid: ef64b0d30343049d4a634192975fab73, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: .5 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: .5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta new file mode 100644 index 00000000..9d6a27d2 --- /dev/null +++ b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4209d966cfca44792ad45389a996015e +timeCreated: 1434115586 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader new file mode 100644 index 00000000..761be92f --- /dev/null +++ b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader @@ -0,0 +1,11 @@ +Shader "Lines/Colored Blended" { + SubShader { + Pass { + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off Cull Off Fog { Mode Off } + BindChannels { + Bind "vertex", vertex Bind "color", color + } + } + } +} diff --git a/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta new file mode 100644 index 00000000..e94f8e19 --- /dev/null +++ b/Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ef64b0d30343049d4a634192975fab73 +timeCreated: 1434114816 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: