This commit is contained in:
yulong 2024-11-28 13:09:10 +08:00
parent 02bdde2032
commit 44c8730cbb
180 changed files with 30968 additions and 959 deletions

10
Assets/HighlightPlus.meta Normal file
View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 5db7164e964ae4c6b82d2283320ad13d
folderAsset: yes
timeCreated: 1557315954
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b0c676f447c26429db5c9404720e279c
folderAsset: yes
timeCreated: 1542876294
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b18a9c16bcd174b1683d370384a8cab7
timeCreated: 1542877475
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 96cd4e40d2f234b9e95987f9f953d17c
timeCreated: 1542877475
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1c609762d2aa646c7a9fe426b06d8eee
timeCreated: 1542877475
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d4f7bf313cad54255a94a5340731a311
folderAsset: yes
timeCreated: 1542877572
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,92 @@
%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: Floor
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _NORMALMAP
_UVSEC_UV1
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: d398536e88a354ed3b3825173a7e092a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 2, y: 2}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 13ea04b5d27644ccba761e09947624da, type: 3}
m_Scale: {x: 2, y: 2}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Occlusion:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 2800000, guid: 943181a31ab5a411496dc4b0d6a41630, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaTestRef: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 0.02
- _DstBlend: 0
- _EmissionScaleUI: 1
- _GlossMapScale: 0.538
- _Glossiness: 0.34
- _GlossyReflections: 1
- _Lightmapping: 1
- _Metallic: 0.1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.0104
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0.99999994}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1}

View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: d681c1d72c3c16149abd2f0f25ca628c
NativeFormatImporter:
userData:
assetBundleName:

View File

@ -0,0 +1,90 @@
%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: Gold
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _UVSEC_UV1
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Occlusion:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaTestRef: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EmissionScaleUI: 0
- _GlossMapScale: 1
- _Glossiness: 0.9
- _GlossyReflections: 1
- _Lightmapping: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.9607843, g: 0.8392157, b: 0.4745098, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.8088235, g: 0.6295969, b: 0.3033088, a: 1}

View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 5b12cf4be3e7c5149a5f24108ee6a551
NativeFormatImporter:
userData:
assetBundleName:

View File

@ -0,0 +1,91 @@
%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: PlasticGlossy
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME
_UVSEC_UV1
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Occlusion:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaTestRef: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EmissionScaleUI: 0
- _GlossMapScale: 1
- _Glossiness: 0.8
- _GlossyReflections: 1
- _Lightmapping: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0.78942597, b: 0.79607844, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}

View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 958abb01761e1dc4ebf9ffdf8252d20e
NativeFormatImporter:
userData:
assetBundleName:

View File

@ -0,0 +1,91 @@
%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: Silk
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME
_UVSEC_UV1
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Occlusion:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaTestRef: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EmissionScaleUI: 0
- _GlossMapScale: 1
- _Glossiness: 0.6
- _GlossyReflections: 1
- _Lightmapping: 1
- _Metallic: 0.75
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.49411765, g: 0.14509805, b: 0.16470589, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.74264705, g: 0.20750435, b: 0.216731, a: 1}

View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 3134ae80e55101b468fe9ea362327f28
NativeFormatImporter:
userData:
assetBundleName:

View File

@ -0,0 +1,92 @@
%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: Wall
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _NORMALMAP
_PARALLAXMAP _SPECGLOSSMAP _UVSEC_UV1
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: ebcd1fde239ed44bc808f7c571d8a6a9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 3, y: 3}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: dc645ec4f4eba40dd8f0e8b0c21b99b0, type: 3}
m_Scale: {x: 3, y: 3}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Occlusion:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 2800000, guid: 2fb008ff4214b4130a4f33cb385b6fa6, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 2800000, guid: 4c5aaebe522004ddfbf0da83b147e635, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 2800000, guid: a1d43acc22aa4427f89ca56382ce5272, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaTestRef: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 0.02
- _DstBlend: 0
- _EmissionScaleUI: 1
- _GlossMapScale: 0.325
- _Glossiness: 0.311
- _GlossyReflections: 1
- _Lightmapping: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.0203
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0.99999994}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecularColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1}

View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 0062779a7c303451ab69ea6fc7893dc8
NativeFormatImporter:
userData:
assetBundleName:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5ea7a654ed5444ecd828eb05ba66a572
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,91 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8e9253636bf2648bd813257f451f8486, type: 3}
m_Name: Selected
m_EditorClassIdentifier:
effectGroup: 0
effectGroupLayer:
serializedVersion: 2
m_Bits: 4294967295
effectNameFilter:
combineMeshes: 0
alphaCutOff: 0
cullBackFaces: 1
depthClip: 0
normalsOption: 0
fadeInDuration: 0
fadeOutDuration: 0
constantWidth: 1
overlay: 0
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
overlayAnimationSpeed: 1
overlayMinIntensity: 0.5
overlayBlending: 1
outline: 1
outlineColor: {r: 0, g: 0, b: 0, a: 1}
outlineWidth: 1.5
outlineQuality: 1
outlineDownsampling: 2
outlineOptimalBlit: 1
outlineVisibility: 0
outlineIndependent: 0
glow: 1
glowWidth: 0.5
glowQuality: 1
glowDownsampling: 2
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
glowDithering: 1
glowOptimalBlit: 1
glowMagicNumber1: 0.75
glowMagicNumber2: 0.5
glowAnimationSpeed: 1
glowVisibility: 0
glowBlendPasses: 1
glowPasses:
- offset: 4
alpha: 0.1
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 3
alpha: 0.2
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 2
alpha: 0.3
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 1
alpha: 0.4
color: {r: 0.64, g: 1, b: 0, a: 1}
innerGlow: 0.5
innerGlowWidth: 1
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
innerGlowVisibility: 0
targetFX: 0
targetFXTexture: {fileID: 0}
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
targetFXRotationSpeed: 50
targetFXInitialScale: 4
targetFXEndScale: 1.5
targetFXTransitionDuration: 0.5
targetFXStayDuration: 1.5
targetFXVisibility: 1
seeThrough: 2
seeThroughOccluderMask:
serializedVersion: 2
m_Bits: 4294967295
seeThroughOccluderThreshold: 0.4
seeThroughOccluderCheckInterval: 1
seeThroughIntensity: 0.8
seeThroughTintAlpha: 0.5
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
seeThroughNoise: 1
seeThroughBorder: 0
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
seeThroughBorderWidth: 0.45

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e6e74f38237364260b68bef0cd1b8795
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,91 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8e9253636bf2648bd813257f451f8486, type: 3}
m_Name: SelectedAndHighlighted
m_EditorClassIdentifier:
effectGroup: 0
effectGroupLayer:
serializedVersion: 2
m_Bits: 4294967295
effectNameFilter:
combineMeshes: 0
alphaCutOff: 0
cullBackFaces: 1
depthClip: 0
normalsOption: 0
fadeInDuration: 0
fadeOutDuration: 0
constantWidth: 1
overlay: 0.5
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
overlayAnimationSpeed: 1
overlayMinIntensity: 0.5
overlayBlending: 1
outline: 1
outlineColor: {r: 0, g: 0, b: 0, a: 1}
outlineWidth: 1.5
outlineQuality: 1
outlineDownsampling: 2
outlineOptimalBlit: 1
outlineVisibility: 0
outlineIndependent: 0
glow: 1
glowWidth: 0.5
glowQuality: 1
glowDownsampling: 2
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
glowDithering: 1
glowOptimalBlit: 1
glowMagicNumber1: 0.75
glowMagicNumber2: 0.5
glowAnimationSpeed: 1
glowVisibility: 0
glowBlendPasses: 1
glowPasses:
- offset: 4
alpha: 0.1
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 3
alpha: 0.2
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 2
alpha: 0.3
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 1
alpha: 0.4
color: {r: 0.64, g: 1, b: 0, a: 1}
innerGlow: 0.5
innerGlowWidth: 1
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
innerGlowVisibility: 0
targetFX: 0
targetFXTexture: {fileID: 0}
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
targetFXRotationSpeed: 50
targetFXInitialScale: 4
targetFXEndScale: 1.5
targetFXTransitionDuration: 0.5
targetFXStayDuration: 1.5
targetFXVisibility: 1
seeThrough: 2
seeThroughOccluderMask:
serializedVersion: 2
m_Bits: 4294967295
seeThroughOccluderThreshold: 0.4
seeThroughOccluderCheckInterval: 1
seeThroughIntensity: 0.8
seeThroughTintAlpha: 0.5
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
seeThroughNoise: 1
seeThroughBorder: 0
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
seeThroughBorderWidth: 0.45

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 77128a10e40704023952e72c2046e685
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0748038d48d9c48fc9f35f5d32dc985a
folderAsset: yes
timeCreated: 1544692068
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
using UnityEngine;
namespace HighlightPlus.Demos {
public class HitFxDemo : MonoBehaviour {
public AudioClip hitSound;
void Update() {
if (!InputProxy.GetMouseButtonDown(0)) return;
Ray ray = Camera.main.ScreenPointToRay(InputProxy.mousePosition);
if (Physics.Raycast(ray, out RaycastHit hitInfo)) {
HighlightEffect effect = hitInfo.collider.GetComponent<HighlightEffect>();
if (effect == null) return;
AudioSource.PlayClipAtPoint(hitSound, hitInfo.point);
effect.HitFX(hitInfo.point);
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 53883b254655d44479b3d33caba0be58
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
using UnityEngine;
using HighlightPlus;
namespace HighlightPlus.Demos {
public class ManualSelectionDemo : MonoBehaviour {
HighlightManager hm;
public Transform objectToSelect;
void Start() {
hm = FindObjectOfType<HighlightManager>();
}
void Update() {
if (Input.GetKeyDown(KeyCode.Alpha1)) {
hm.SelectObject(objectToSelect);
}
if (Input.GetKeyDown(KeyCode.Alpha2)) {
hm.ToggleObject(objectToSelect);
}
if (Input.GetKeyDown(KeyCode.Alpha3)) {
hm.UnselectObject(objectToSelect);
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ae556bec7040546f0a8bcc625513a0d2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,40 @@
using UnityEngine;
using HighlightPlus;
namespace HighlightPlus.Demos {
public class SphereHighlightEventExample : MonoBehaviour {
HighlightEffect effect;
void Start() {
effect = GetComponent<HighlightEffect> ();
effect.OnObjectHighlightStart += ValidateHighlightObject;
}
bool ValidateHighlightObject(GameObject obj) {
// You can return false to cancel highlight on this object
return true;
}
void HighlightStart () {
Debug.Log ("Gold sphere highlighted!");
}
void HighlightEnd () {
Debug.Log ("Gold sphere not highlighted!");
}
void Update() {
if (InputProxy.GetKeyDown ("space")) {
effect.HitFX (Color.white, 0.2f);
}
if (InputProxy.GetKeyDown("c")) {
effect.SetGlowColor(new Color(Random.value, Random.value, Random.value));
}
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 36aa3934b8f65413188fabe723ded4da
timeCreated: 1544692056
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using UnityEngine;
using HighlightPlus;
namespace HighlightPlus.Demos {
public class SphereSelectionEventsExample : MonoBehaviour {
void Start() {
HighlightManager.instance.OnObjectSelected += OnObjectSelected;
HighlightManager.instance.OnObjectUnSelected += OnObjectUnSelected;
}
bool OnObjectSelected(GameObject go) {
Debug.Log(go.name + " selected!");
return true;
}
bool OnObjectUnSelected(GameObject go) {
Debug.Log(go.name + " un-selected!");
return true;
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e03a4fb11e1844a42b2becf08e18b9e2
timeCreated: 1544692056
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 952080b4610a343de8a56483df1aaf6b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 0cf993a8419a44000883892928cbdd4d
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 13783dcd57d4d4977b6fa46c1be6a21d
folderAsset: yes
timeCreated: 1542901861
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: 13ea04b5d27644ccba761e09947624da
timeCreated: 1542918613
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: d398536e88a354ed3b3825173a7e092a
timeCreated: 1542918925
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 6f4d7782c600f4fa1859b8f3c092189d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: 2fb008ff4214b4130a4f33cb385b6fa6
timeCreated: 1542918613
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: ebcd1fde239ed44bc808f7c571d8a6a9
timeCreated: 1542918741
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 KiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: 4c5aaebe522004ddfbf0da83b147e635
timeCreated: 1542918717
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: dc645ec4f4eba40dd8f0e8b0c21b99b0
timeCreated: 1542918615
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0b800828db32d4d3db02036d0637b878
folderAsset: yes
timeCreated: 1578838656
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,758 @@
USER GUIDE
1
Contents
Introduction ............................................................................................................................................3
Quick Start and Demo Scenes...................................................................................................................3
How to use the asset in your project.........................................................................................................4
Option 1: Highlighting/customizing gameobjects .............................................................................................................4
Option 2: Highlighting/customizing ANY gameobject automatically ................................................................................4
Ignoring specific gameobjects from highlighting...............................................................................................................4
Highlighting vs Selection ..........................................................................................................................5
Highlighting ........................................................................................................................................................................5
Selection............................................................................................................................................................................. 5
Full list of options in Highlight Effect component .......................................................................................6
General Settings.................................................................................................................................................................6
Highlight Options ...............................................................................................................................................................6
Outline Effect Options .......................................................................................................................................................7
Outer Glow Effect Options.................................................................................................................................................8
Inner Glow Effect Options..................................................................................................................................................9
Overlay Effect Options .......................................................................................................................................................9
Target Effect Options .........................................................................................................................................................9
See-Through Effect Options.............................................................................................................................................10
Hit-FX Effect Options........................................................................................................................................................11
Scripting support ...................................................................................................................................12
Using scripting to add effects ..........................................................................................................................................12
Setting profile at runtime ................................................................................................................................................12
Changing properties at runtime.......................................................................................................................................12
Executing a Hit FX effect ..................................................................................................................................................12
Starting the Target FX on demand...................................................................................................................................12
Changing the target of highlight using scripting..............................................................................................................13
Events / reacting to highlighting......................................................................................................................................13
Events / reacting to selection ..........................................................................................................................................14
Using the Highlight Manager ......................................................................................................................................14
Using the Highlight Trigger .........................................................................................................................................14
Messages..........................................................................................................................................................................15
Manually selecting/toggling/unselecting objects with Highlight Manager.....................................................................15
Advanced Topics and Notes....................................................................................................................16
Quick help & tips..............................................................................................................................................................16
Normals Option................................................................................................................................................................16
Highlight when entering a volume ..................................................................................................................................16
Depth Clip option .............................................................................................................................................................16
Compatibility of transparent objects with depth clip option ..........................................................................................17
Compatibility of see-through effect with transparent shaders.......................................................................................17
Masking UI .......................................................................................................................................................................17
Static batching .................................................................................................................................................................17
Cancelling see-through effect behind certain objects.....................................................................................................17
Excluding submeshes .......................................................................................................................................................18
Custom Vertex Transformations......................................................................................................................................18
Controlling which objects can be selected ......................................................................................................................18
Custom sorting.................................................................................................................................................................19
Universal Rendering Pipeline compatibility.....................................................................................................................19
2
Introduction
Thank you for purchasing!
Highlight Plus is a simple yet powerful package for adding outline, glow and other effects to your
gameobjects.
We hope you find the asset easy and fun to use. Feel free to contact us for any enquiry.
Visit our Support Forum on https://kronnect.com for help and access to the latest beta releases.
Kronnect Technologies
Email: contact@kronnect.com
Support Forum: https://www.kronnect.com/support
Quick Start and Demo Scenes
1. Import the asset into your project or create an empty project.
2. Go to Demo folder and run the demo scenes to quickly test the asset effects.
3. Examine the code behind the script attached to the Demo game object in demo scene 1.
The Demo scenes contains 3 spheres with a Highlight Effect and Highlight Trigger scripts attached to each
one. Each sphere has:
- The Highlight Effect script contains all the settings and appearance properties for the effects. If you
activate the “Highlighted” checkbox, the effects will be rendered immediately.
- The Highlight Trigger component checks the position of the pointer and detected when it passes over
the gameobject. When this occurs, it activates the “Highlighted” checkbox of the previous component
and disables it when the pointer exits the gameobject.
Alternatively, you can create a “Highlight Manager” from the top menu GameObject -> Effects -> Highlight
Plus -> Create Manager. This command will create a gameobject with the Highlight Manager script attached,
responsible for detecting mouse interaction with any gameobject that matches the layer and other settings
in the manager and highlight it accordingly.
3
How to use the asset in your project
Option 1: Highlighting/customizing gameobjects
▪ Add HighlightEffect.cs script to any gameobject. Customize the appearance options.
▪ Optionally add HighlightTrigger.cs script to the gameobject. It will activate highlight on the
gameobject when mouse pass over it. A collider must be present on the gameobject. Note: adding a
HighlightTrigger.cs script to a gameobject will automatically add a HighlightEffect component.
In the Highlight Effect inspector, you can specify which objects, in addition to the parent, are also affected
by the effects. The “Include” property in the inspector allows:
a) Only this object
b) This object and its children
c) All objects from the root to the children
d) All objects belonging to a layer
e) Custom targets specified by script (see Advanced Topics & Notes)
Option 2: Highlighting/customizing ANY gameobject automatically
▪ Select top menu GameObject -> Effects -> Highlight Plus -> Create Manager.
▪ Customize behaviour of Highlight Manager. Those settings wil be applied to any gameobject
highlighted by the manager. But if a gameobject already has a HighlightEffect component, the
manager will use those settings instead.
Ignoring specific gameobjects from highlighting
In addition to the “Include” options in the inspector, you can add a “Highlight Effect” component to
the gameobject that you dont want to be highlighted and activate the “Ignore” checkbox.
If youre using the Highlight Manager, it also provides some filter options like Layer Mask.
4
Highlighting vs Selection
Highlight Plus offers a Selection feature integrated in the Highlight Manager, which can draw objects
differently depending if theyre selected or not. You can select any number of objects by clicking on them.
Highlighting
Refers to the temporary effect that causes an object to show an outline, glow or other kind of effect. For
example, when using the Highlight Trigger or Highlight Manager components, and the “Highlight On Hover”
checkbox is activated, the asset will “highlight” any target automatically when the pointer is positioned over
that target. When you move the pointer out of the object, the highlight disappears.
You can also use scripting to toggle the highlight on / off by calling SetHighlighted() or setting the highlighted
property of the HighlightEffect component.
The demo scene 1 provides an example of highlighting spheres.
Selection
Refers to the ability to keep the highlight visible when you click on objects. To enable the new selection
feature, tick the option “Select On Click” and assign a “selected” profile and a “selected and highlighted”
profile:
• Selected Profile: the profile you want to use to visualize an object thats selected only (not
highlighted).
• Selected and Highlighted Profile: the profile to use when the object is both selected and highlighted.
The Highlight Effect attached to the Highlight Manager contains the default highlight settings which are used
to highlight objects that are not selected.
The Highlight Manager script exposes a “selectedObjects” public property which can be used with scripting
to get a list of the currently selected objects
Use the SelectObject, ToggleObject and UnselectObject methods of the Highlight Manager to manually
control the selection state of any object in the scene using scripting.
The demo scene 2 provides an example of selection by clicking on spheres.
5
Full list of options in Highlight Effect component
The Highlight Effect component provides many options. This section covers each one of them:
- Profile: allows you to assign a profile with custom settings. You can create a profile by clicking
“Create”, customize that profile and reuse it on any number of highlight effect components.
General Settings
- Preview In Editor: enabling this option will render the effects while in Edit mode. Note that most
effects wont be visible unless the “Highlighted” checkbox is enabled.
- Cameras Layer Mask: let you specify which cameras can render the effects. By default, every camera.
- Ignore Object Visibility: by default, Highlight Plus wont render the effects if the object is not visible
in screen. If youre using some tool that uses GPU instancing to render the object directly on the GPU
and not using the regular renderer component, enable this option to force the effects to be rendered.
- Reflection Probes: enable to render the effects on reflection probe cameras.
- Normals Option: several options to smooth or reorient normals of the geometry of the object. Only
used in outline and glow effects when rendering in Fast, Average or High quality mode (mesh-based
effects, not used in Highest quality modes or screen-space mode).
- Sub Mesh Mask: bitwise mask that filters which sub-mesh will be highlighted. Useful for objects that
have multiple sub-meshes.
- GPU Instancing: enabled by default, improves rendering performance of outline and glow effects.
Highlight Options
- Ignore: let you disable any effect on this object. If you use the Highlight Manager, it will still use this
highlight effect component values.
- Include: this option let you specify which other objects will also be highlighted. Its extremely useful
as you can using a single highlight effect on the root of a group of objects for example, and include
all the children. The outline and glow effects will be combined and show a single contour around the
entire group if they overlap.
6
o Object Name Filter: lets you specify which objects will be included (according to the Include
option) by filtering their names. For example, if you have 5 children, you could use a prefix or
suffix to specify which of them will be highlighted.
o Combine Meshes: this option is useful for objects that do not rotate individually. Highlight
Plus will automatically combine the meshes of the group, reducing the number of draw calls
dramatically.
- Alpha Cut Off: applies an alpha cutoff to the effects, useful when youre highlighting semi-
transparent objects or objects that exhibit holes or transparent parts in their textures like leaves,
fences, etc.
- Cull Back Faces: do not apply the effects to back faces. Enabled by defauflt.
- Fade In/Out Duration: applies a “lerping” effect for the given duration.
- Constant Width: keeps the outline or glow width constant regardless of the distance of the object to
the camera.
- Depth Clip: performs a depth buffer clipping so effects are correctly hidden behind solid geometry.
Outline Effect Options
The outline shows a usually thin colored line around the object.
- Outline: controls the transparency of the outline. A value of 0 deactivates completely this effect.
- Width: the width of the outline. The “Constant Width” option in the previous section can affect the
actual visible width.
- Color: the color for the outline.
- Quality: therere 4 quality modes: fast, average, high and highest. The first 3 quality modes use a
mesh-based rendering technique which is usually faster. The Highest quality mode uses a screen-
space effect which provides a smoother result. The quality modes and the actual result can vary
depending on the characteristic of the highlighted object so dont hesitate to use the mode that looks
or perform better in your case, regardless of the name. For example, the “Fast” quality mode usually
works best for simple objects.
- Visibility: controls the z-buffer testing for the outline. Let you specify if the outline should be visible
on top of everything, only when the object is occluded (check also see-through effect for more
options) or normal, which means the outline will be visible when the object is visible as well.
- Optimal Blit: when in Highest Quality mode, performs a blit over the affected region of the screen,
instead of using a full-screen blit. This option will improve performance.
- Independent: this option forces the outline to show completely ignoring other highlighted objects
that could overlap on the screen. By default, Highlight Effect will merge the outlines of overlapping
objects, showing a continuous outline around the mixed group. By enabling the Independent option
you ensure that the outline is visible around each group separately.
7
Outer Glow Effect Options
The outer glow effect shows a bright glow or bloom-like effect, usually wider than the outline, around the
object.
- Outer Glow: controls the transparency of the outer glow. A value of 0 disables this effect.
- Width: the width of the glow. Check the “Constant Width” setting in Highlight Options section
because it can affect the actual width displayed.
- Visibility: controls the z-buffer testing for the effect. Let you specify if the glow should be visible on
top of everything, only when the object is occluded or normal, which means the glow will be visible
when the object is visible as well.
- Dithering: only used in mesh-based quality modes, let you control the style of the dithering used in
the glow. This is a pure and optional artist-driven effect. You can disable it to show a solid glow.
- Blend Passes: in mesh-based quality modes, the outer glow is achieved by rendering the object mesh
using several custom passes. When this option enabled, each pass will be blended with the previous
one. If the option is disabled, each pass is rendered additively.
- Glow Passes: let you configure the number and characteristic of each glow pass including color, offset
and transparency (alpha).
- Animation Speed: the outer glow will animate if this value is greater than 0.
To quickly change the glow color using scripting, you can call SetGlowColor(color) method on the
HighlightEffect component. Check demo scene 1 for an example.
8
Inner Glow Effect Options
The Inner Glow renders a rim-like effect over the object.
- Inner Glow: controls the transparency of the inner glow effect which renders inside the object, like
a rim lighting effect. A value of 0 disables this effect.
- Color: the color for this effect.
- Width: the amount of inner glow.
- Visibility: controls the z-buffer testing for the effect. Let you specify if the glow should be visible on
top of everything, only when the object is occluded or normal, which means the glow will be visible
when the object is visible as well.
Overlay Effect Options
The Overlay effect adds a solid color over the object with custom transparency.
- Overlay: controls the transparency of the effect. A value of 0 disables this effect.
- Color: the color of the effect.
- Blending: determines how much the color is blended with the original color/texture of the object.
- Min Intensity: minimum intensity for the blending.
- Animation Speed: the speed of the overlay “pulse”. Enter 0 to disable animation.
Target Effect Options
The Target effect adds an animated object floating over the highlighted target.
- Texture: the overlay texture to be used for this effect.
- Color: the tint color for such texture.
- Center: where the target should be positioned. If not set, the center of the highlighted object will be
used. However, if the object has multiple parts or children, you could assign a transform of a child
instead (ie. part of the body of a monster).
- Rotation Speed: the speed at which the object rotates. Enter 0 to disable rotation.
- Initial / End Scale: used to create a zoom / pulsating effect.
9
- Scale To Object Bound: the scale of the target image will be relative to the object screen bounds (if
object grows, the target effect will also expand). Note that if object rotates and its bounds change,
the target effect will also change its size. This can produce a strange result so you may prefer to have
this option disabled for rotating characters/objects.
- Transition Duration: the duration of the transparency transition when the overlay texture
appears/disappears.
- Align To Ground: projects the target sprite on the ground (as a decal). In this mode, vertical walls will
be detected by using the camera depth texture and reconstructed normal of the scene so the decal
wont appear stretched on the wall. Use the Fade Power option to attenuate the target sprite with
elevation.
- Stay Duration: how long the overlay texture will be displayed when the object is no longer highlighted
until it fades out. A value of 0 keeps the effect visible until its deactivated.
- Visibility: controls the z-buffer testing for the effect. Let you specify if the glow should be visible on
top of everything, only when the object is occluded or normal, which means the glow will be visible
when the object is visible as well.
See-Through Effect Options
The see-through effect, also known as x-ray effect, shows when the object is occluded by other elements, like
walls.
- See Through: determines if the see-through will be visible only when the object is highlighted, always
when its occluded or never. Use “Never” to completely disable this effect.
- Occlude Layer: if this value is different to Everything, the asset will use raycasting to try to determine
if an object belonging to a matching layer is occluding the highlighted object. If it hits an occluding
object, the see-through effect will be activated.
o Threshold: when using the occlude layer, the object bound size is multiplied by this value
when testing occlusion. You can use this value to avoid false positives and only show the see-
through effect when the object is really behind another solid object.
o Check Individual Objects: by default, Highlight Plus takes all children affected by the see-
through effect of this component and combines the bounds before testing occlusion. If this
option is enabled, the occlusion test is performed per each individual child.
o Depth Offset / Max Depth: provides distance limitations to the effect (distance referred to
the occluder). A value of 0 will not use these options.
o Accurate: when using the occlude layer, this option enables pixel-perfect occlusion.
- Intensity: intensity of brightness of the effect.
- Color & Color Blend: controls the color and intensity of the blending of the color with the original
color/texture of the object.
- Noise: optional, artist-driven, effect.
- Border When Hidden: this option let you show an additional outline but only when see-through is
active.
10
- Ordered: when enabled, it will respect the relative distance to camera when rendering see-through
effect.
A common scenario when using the See-Through effect is when you want your character to be occluded by
walls and not ground or ceilings. A solution involves assigning your walls to a different layer than the
ground/ceilings and specify that layer in the Occluder Layer of the See-Through effect. Enable the “Accurate”
option for best results:
In the screenshot above, you can see the see-through effect is visible only over the wall but not over the
grass or terrain.
Hit-FX Effect Options
This effect is only usable in play mode. It let you show a “punch” effect by changing the color of the hit object
briefly. In play mode you can test it:
Please refer to the “Executing a Hit-FX effect” in the next section for sample code.
11
Scripting support
Using scripting to add effects
Use GetComponent<HighlightEffect>() to get a reference to the component of your gameobject.
Most properties shown in the inspector can be accessed through code, for example:
using HighlightPlus;
HighlightEffect effect = myGameObject.GetComponetn<HighlightEffect>();
effect.outline = true;
effect.outlineColor = Color.blue;
effect.SetGlowColor(Color.yellow);
effect.UpdateMaterialProperties();
To control the state of the highlight, use:
effect.SetHighlighted(true/false) or effect.highlighted = true/false.
Important! If you change the hierarchy of your object (change its parent or attach it to another
object), you need to call effect.Refresh() to make Highlight Plus update its internal data.
Setting profile at runtime
Call ProfileLoad() or ProfileReload() methods of the HighlightEffect component and pass your
highlight profile object.
Changing properties at runtime
When changing specific script properties at runtime, call UpdateMaterialProperties() to ensure
those changes are applied immediately.
Executing a Hit FX effect
The HitFX effect is a fast flash overlay effect which is used from code. Just call HitFX and pass the
desired parameters:
using HighlightPlus;
HighlightEffect effect = myGameObject.GetComponetn<HighlightEffect>();
effect.HitFX(color, duration, initial_intensity);
Starting the Target FX on demand
Call effect.StartTargetFX() method to start the target FX whenever you wish.
Note: if you change target fx properties using scripting, you may need to call
UpdateMaterialProperties() so the new values get reflected in new target fx executions.
12
Changing the target of highlight using scripting
The objects to be highlighted by the script are those configured by the “Include” option in the
Highlight Options section. However, you can override this selection using scripting in two ways:
effect.SetTarget(transform) will instruct the script to execute the effects on the given object.
effect.SetTarget(transform, Renderer[] additionalObjects) will do the same but also will
include any number of other renderers. Useful when you want to highlight a set of objects defined
by a script.
Events / reacting to highlighting
Note: check SphereHighlightEventExample.cs script in the demo scene.
The Highlight Effect script exposes two events (OnObjectHighlightStart and OnObjectHighlightEnd) which
fire when the object highlight starts or ends.
Example:
using UnityEngine;
using HighlightPlus;
public class SphereHighlightEventExample : MonoBehaviour {
void Start() {
HighlightEffect effect = GetComponent<HighlightEffect> ();
effect.OnObjectHighlightStart += ValidateHighlightObject;
}
bool ValidateHighlightObject(GameObject obj) {
// Used to fine-control if the object can be highlighted; return false to cancel
highlight
return true;
}
}
These two events are also exposed by the HighlightManager and the HighlightTrigger.
For example, when using the HighlightManager, you can also hook into its OnObjectHighlightStart,
OnObjectHighlightEnd, OnObjectSelected, OnObjectUnselected events:
HighlightManager.instance.OnObjectHighlightStart += MyEventHandler;
13
Events / reacting to selection
Selection events OnObjectSelected and OnObjectUnSelected are provided by the
HighlightManager or HighlightTrigger components. Check demo scene 2 for a working sample (using
the code below).
Using the Highlight Manager
using UnityEngine;
using HighlightPlus;
public class SelectionEventExample : MonoBehaviour {
void Start() {
HighlightManager.instance.OnObjectSelected += SelectObject;
HighlightManager.instance.OnObjectUnSelected += UnSelectObject;
}
bool SelectObject (GameObject obj) {
// Used to fine-control if the object can be selected; return false to cancel
selection
return true;
}
bool UnSelectObject (GameObject obj) {
// Used to fine-control if the object can be unselected; return false to cancel
unselection
return true;
}
}
Using the Highlight Trigger
using UnityEngine;
using HighlightPlus;
public class SelectionEventExample : MonoBehaviour {
void Start() {
HighlightTrigger ht = GetComponent<HighlightTrigger> ();
ht.OnObjectSelected += SelectObject;
ht.OnObjectUnSelected += SelectObject;
}
bool SelectObject (GameObject obj) {
// Used to fine-control if the object can be selected; return false to cancel
selection
return true;
}
bool UnSelectObject (GameObject obj) {
// Used to fine-control if the object can be unselected; return false to cancel
unselection
return true;
}
}
14
Messages
Highlight Effect will send the “HighlightStart” and “HighlightEnd” to any script attached to the
gameobject when its highlighted (or highlight ends). You can get those messages using the
following code:
using UnityEngine;
using HighlightPlus;
public class MyBehaviour : MonoBehaviour {
void HighlightStart () {
Debug.Log ("Object highlighted!");
}
void HighlightEnd () {
Debug.Log ("Oject not highlighted!");
}
}
Manually selecting/toggling/unselecting objects with Highlight Manager
The Highlight Manager provides a “selection” state functionality which you can invoke using the
methods SelectObject, ToggleObject and UnselectObject of the Highlight Manager. The following
code is extracted from demo scene 2:
using UnityEngine;
using HighlightPlus;
namespace HighlightPlus.Demos {
public class ManualSelectionDemo : MonoBehaviour {
HighlightManager hm;
public Transform objectToSelect;
void Start() {
hm = FindObjectOfType<HighlightManager>();
}
void Update() {
if (Input.GetKeyDown(KeyCode.Alpha1)) {
hm.SelectObject(objectToSelect);
}
if (Input.GetKeyDown(KeyCode.Alpha2)) {
hm.ToggleObject(objectToSelect);
}
if (Input.GetKeyDown(KeyCode.Alpha3)) {
hm.UnselectObject(objectToSelect);
}
}
}
}
15
Advanced Topics and Notes
Quick help & tips
Highlight Plus has been designed to be used without having to read a long manual. Hover the mouse
over the label of any option in the inspector to reveal a tooltip with a short explanation of that option.
This section contains specific instructions or notes about specific features or issues.
Normals Option
Highlight Plus can automatically optimize mesh normal to provide a better result. The available options
are:
- Smooth: this will improve the outline effect when using the Fast or High-quality level (not with
Highest).
- Preserve Original: in some circumstances you may want to modify your mesh dynamically and
also want Highlight Plus to avoid caching that mesh enable “Preserve Original Mesh” to force
Highlight Plus to use the original mesh always.
- Reorient: this will replace existing normal with a vector pointing out from the center of the object.
Useful for some 2D geometry or objects without normals.
Note that Highlight Plus wont never change the original mesh of your objects so these are safe
operations.
Highlight when entering a volume
Its possible to automatically enable/disable highlight effects when object enters/exits a volume. Add
a HighlightTrigger component to the object and select “Volume” as trigger mode.
The script uses the OnTriggerEnter / OnTriggerExit events. The volume must have a collider marked
as IsTrigger and static. Also, the object entering the volume must have a rigidbody in order for the
events to trigger.
Depth Clip option
When using Outline or Outer Glow in high quality mode, the asset relies on the depth buffer to
perform proper depth cull or depth clipping. However, when MSAA (integrated antialias) is enabled,
the depth buffer is not available at the stage Highlight Plus renders. If you need MSAA in your project
and wants depth clipping/culling, you can enable the “Depth Clip” option in the Highlight inspector.
This option only is used when Outline or Outer Glow is set to High Quality (the other quality modes
work differently and do not require special treatment).
16
Compatibility of transparent objects with depth clip option
The Depth Clip option is only available for Outline and Outer Glow in High Quality modes. When
enabled, the special _CameraDepthTexture buffer is used to clip the effect. This option is useful if
you need to use MSAA since enabling MSAA disables depth checking in high quality mode.
Transparent objects do not write to this special texture unless you use this option in GameObject ->
Effects -> Highlight Plus -> “Make Transparent Object Compatible With Depth Clip”.
Once you add this feature to your transparent object, make sure you also have “Depth Clip” option
enabled in the objects to be highlighted using Outline or Outer Glow in HQ mode.
Compatibility of see-through effect with transparent shaders
If you want the See-Through effect be seen through other transparent objects, their shaders need to
be modified so they write to depth buffer (by default transparent objects do not write to z-buffer).
To do so, select top menu GameObject -> Effects -> Highlight Plus -> “Add Depth To Transparent
Object”.
Note that forcing a transparent object to write to depth buffer will cause issues with transparency.
Masking UI
To avoid Highlight Plus effects show on top of any UI or sprite element, therere a few options:
a) Use “Screen Space Overlay” mode for canvas rendering. This mode renders the UI at the end of
the render loop so the UI appears on top of any highlight plus effect.
b) Use a second camera to render your world-space UI. Set the culling mask of your main camera
and the “UI camera” accordingly (so the UI camera only renders the UI) and set the UI Camera
clear flag to “Depth only”. Make sure the “Depth” value of the UI camera is greater than the
regular camera so the UI camera renders after the main camera. This setup is easy and ensures
the world-space UI renders on top of any highlight plus effect.
c) Create a panel on your UI and assign the material HighlightUIMask found in
HighlightPlus/Resources/Materials. This special material will write to stencil buffers and will
prevent Highlight Plus effects from rendering over that panel. This panel wont be visible, it will
just serve the purpose of masking that portion of screen.
Static batching
Objects marked as "static" need a MeshCollider to be highlighted (other collider types wont work).
This required because Unity combines the meshes of static objects so it's not possible to access to
the individual meshes of non-batched objects.
Note: the MeshCollider can be disabled. The only purpose of this collider is to allow Highlight Effect
to get access to the original mesh before the merge performed by Unity when scene starts.
Cancelling see-through effect behind certain objects
Add HighlightSeeThroughOccluder script to the object you want to block see-through effects.
The HighlightEffect.isSeeThroughOccluded will return true if any occluder using raycast mode is
covering the highlighted object.
17
Excluding submeshes
Use the SubMesh Mash property to specify which submeshes will be affected by the effect.
By default, a value of -1 means all submeshes. This is a component mask field. The effect does the
following test to determine if the submesh will be included:
(1<<subMeshIndex) & SubMeshMash != 0
Examples:
If you want to only include submesh 1 (index 1), set it to 1 (1<<1).
If you want to include only submesh 2, set it to 2 (1<<2).
For submesh 3, set it to 4 (1<<3).
For submeshes 2 and 3, set it to 6 (1<<2 + 1<<3).
In general, this works like the layer mask or culling mask in rest of Unity.
Custom Vertex Transformations
You can apply your own vertex transformations inside the “CustomVertexTransform.cginc” file. The
function “ComputeVertexPosition” is used by all Highlight Plus shader so this is a convenient
centralized place where to include your custom vertex transforms.
Please note that any addition or change to this file will be lost if you upgrade Highlight Plus.
Controlling which objects can be selected
The Highlight Manager exposes two events, OnObjectSelected and OnObjectUnSelected, which are
fired when user selects/unselects objects. These events can be used to cancel a selection or
deselection depending on the value returned by the even handler (a Boolean):
using UnityEngine;
using HighlightPlus;
public class ControlExample : MonoBehaviour {
void Start() {
HighlightManager manager = FindObjectOfType<HighlightManager> ();
manager.OnObjectSelected += ValidateSelection;
}
bool ValidateSelection(GameObject obj) {
// Used to fine-control if the object can be selected; return false to cancel
selection
return true;
}
}
18
Custom sorting
Highlight Plus effects render after transparent queue by default in any order. However, you can
control ordering of the effects by adding this script to the scene:
using UnityEngine;
using HighlightPlus;
[ExecuteAlways]
public class CustomRendering : MonoBehaviour {
void OnEnable() {
HighlightEffect.customSorting = true;
}
void Update() {
HighlightEffect.effects.Sort(Comparer);
}
int Comparer(HighlightEffect effect1, HighlightEffect effect2) {
float dist1 = effect1.transform.position.z;
float dist2 = effect2.transform.position.z;
return dist2.CompareTo(dist1);
}
}
In this case, the effects will be sorted by the z position. Feel free to sort the “effects” list above
according to your needs.
Universal Rendering Pipeline compatibility
URP support is limited in this package. A version of Highlight Plus designed for URP can be found in the same
asset (just import it from the URP folder).
19

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 63c764939b9ea4aecacd8c4d7c76e19c
timeCreated: 1578838656
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,234 @@
Dont miss these other cool assets brought to you by
BEAUTIFY 2 is an acclaimed full-screen image processing effect that improves the image quality in real time
producing incredibly crisp and vivid scenes. Compatible with built-in, LWRP and URP pipelines.
In addition to this unique image enhancement filter, you will find in Beautify additional effects like high quality Bloom,
dirty lens effect, vignetting, night & thermal vision and more!
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-61730?aid=1101lGsd
DYNAMIC FOG & MIST 2 is a full-screen image effect that adds live, moving Fog, Mist and Sky Haze to your scenes
making them less dull and boring. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/dynamic-fog-mist-48200?aid=1101lGsd
VOLUMETRIC FOG & MIST 2 is the enhanced version of Dynamic Fog & Mist (which is also included in the package)
and has been designed to provide a better-looking fog and cloud formations with support of lighting and glow effects.
Compatible with built-in and URP pipelines.
Its feature-rich with options like fog of war, Sun tracking, better transparent and sprite support, sun shafts and more.
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/volumetric-fog-mist-49858?aid=1101lGsd
WORLD POLITICAL MAP SERIES is a collection of professional mapping assets for Unity (2D and Globe Editions). Used by
many companies and agencies across the world to visualize data, resources, interact with the user, etc.
Compatible with built-in and URP pipelines.
Get it on the Asset Store (Globe Edition):
https://assetstore.unity.com/packages/tools/gui/world-map-globe-edition-41890?aid=1101lGsd
Get it on the Asset Store (2D Edition):
https://assetstore.unity.com/packages/tools/gui/world-map-2d-edition-43180?aid=1101lGsd
WORLD MAP STRATEGY KIT 2 is a complete framework for building AAA strategy games, including all world countries
and provinces, +7000 cities, cool 3D PBS dynamic viewport for map, hexagonal grid, pathfinding, real elevation, and much
more.
Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/templates/systems/world-map-strategy-kit-55121?aid=1101lGsd
WORLD MAPS PRO BUNDLE 2 is our most complete and professional suite of maps for Unity platform for the best price.
Compatible with built-in and URP pipelines.
This bundle contains:
- World Political Map Globe Edition
- World Political Map 2D Edition
- World Map Strategy Kit
- World Flags and Weather Icons
Purchase this bundle and save $$$!
https://assetstore.unity.com/packages/tools/gui/world-maps-pro-bundle-80125?aid=1101lGsd
SHINY SSRR is our Screen Space Raytraced Reflections solution optimized for both forward and deferred rendering
path. As with Beautify, this effect gives an instant boost to your scene by making light bounce on shiny surfaces, casting
gorgeous reflections on all kind of reflective surfaces. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/slug/188638?aid=1101lGsd
SKYBOX PLUS is an artist-driven replacement for Unity default skybox. Includes a lovely blend of procedural haze and
hand-drawn clouds which mimic the style of Studio Ghibli.
Supports full day/night transition with moon, stars, several cloud layers with custom animation and lot of customization
options. . Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/2d/textures-materials/sky/skybox-plus-182966?aid=1101lGsd
VOLUMETRIC LIGHTS is a powerful asset to add scattering effect to any number of Unity lights. Supports spot, point
and area light types. Directional lights are also supported for localized areas. Includes advanced options like dust lit
particles and shadow occlusion. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/volumetric-lights-164149?aid=1101lGsd
COMPASS NAVIGATOR PRO adds a “Skyrim”-like compass bar to your UI, including smooth fade in/out, various bar
designs, +11 icons in two variations (+22 icons) and nice features like minimap and beam lights!
Compatible with all render pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/gui/compass-navigator-pro-59519?aid=1101lGsd
X-FRAME FPS ACCELERATOR provides you extra frames per second in your mobile games (iOS and Android). It takes
advantage of the huge screen resolution of these devices to sacrifice some pixels in Exchange of performance with flexible
and dynamic quality options. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/camera/x-frame-fps-accelerator-63965?aid=1101lGsd
SHADER CONTROL is a tiny but powerful tool that will allow you to identify and manage shader keywords usage in your
project, taking more control over the build size and compilation time. Compatible with all render pipelines.
Quickly locates and helps you disable keywords not needed, learn about the shaders used in your project and their keywords!
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/shader-control-74817?aid=1101lGsd
TERRAIN GRID SYSTEM is an advanced grid generator and territory/cell highlighter/fader for both Terrain and 2D grids.
Compatible with all render pipelines. It can generate Voronoi, hexagonal and boxed grids dynamically on your terrain, with
flexible position options . Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/terrain/terrain-grid-system-47215?aid=1101lGsd
GRIDS 2D is similar to Terrain Grid System but only for flat 2D grids. Its fast, convenient and easy to use.
Compatible with all render pipelines. It can also generate Voronoi, hexagonal and boxed grids dynamically on your terrain, with
flexible API to integrate with your game. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/sprite-management/grids-2d-59981?aid=1101lGsd
HEXASPHERE GRID SYSTEM leverages shader technologies like texture arrays and geometry shaders to render hundreds
of thousands of interactive and customizable tiles in a spherical/hexagonal grid.
Fully interactive, with VR support and super-fast. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/modeling/hexasphere-grid-system-89112?aid=1101lGsd
TUNNEL FX 2 is a full-screen post image effect that creates stunning, colorful 3D animated tunnels. It does not create any
real tunnel but just draw the tunnel as a post-effect behind any geometry or UI.
Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/tunnel-fx-68564?aid=1101lGsd
GLOBAL SNOW renders your existing scene into a winter landscape with a couple of clicks. Just add a single script to your
camera and customize the results.
Supports relief mapping for realistic snow effect + human footprints + terrain marks with automatic collision detection and
more!
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/global-snow-79795?aid=1101lGsd
HIGHLIGHT PLUS adds outline, glow and see-through effects to any 3D object in the scene.
Its performant and designed for all platforms, including built-in and URP rendering pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/particles-effects/highlight-plus-134149?aid=1101lGsd
VOXEL PLAY is a procedural, fast environment based on cubes. It leverages highly optimized code, including
geometry shaders and texture arrays, to generate beautiful, rich, vast infinite worlds which can be customized and
modified in many ways. Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/templates/systems/voxel-play-106618?aid=1101lGsd
PIRATES OF VOXEL PLAY is a multiplayer game template built with Mirror and Voxel Play. Its the perfect
sample project to learn how to implement multiplayer games using these two frameworks.
Includes animated characters, a fully populated tropical island with 3 biomes, wild beasts, weapons, loots, cute
music and sound effects and of course plenty of commented code, documentation and video tutorials!
Get it on the Asset Store:
https://assetstore.unity.com/packages/slug/189096?aid=1101lGsd
LIQUID VOLUME is a powerful and highly customizable shader that simulates realistic and animated liquid
containers. Can be used in 3D scenes and 2D UI (demos included).
Liquid Volume is super easy and fun to use: just add the main script to any primitive (sphere, box, cylinder and
similar shape models) to convert it into a liquid container!
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-70992?aid=1101lGsd
LIQUID VOLUME PRO 2 includes all features of Liquid Volume and adds additional advanced options plus
improved compatibility with more platforms.
Among the new options are multiple liquid layers support, miscible liquids, bubbles, better mesh options and full
WebGL support! Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-pro-129967?aid=1101lGsd
HIGHLIGHT PLUS 2D adds outline, glow, see-through and other effects to any sprite in the scene.
Its performant and designed for all platforms, including standard and URP rendering pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/particles-effects/highlight-plus-2d-138383?aid=1101lGsd
TRAILS FX renders smooth, mesmerizing trails behind moving objects and characters.
Its performant thanks to the use of GPU instancing and use correct transparency order producing a fascinating effect.
Compatible with built-in and URP pipelines.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/particles-effects/highlight-plus-2d-138383?aid=1101lGsd
COLOR STUDIO is an Editor Extension that allows you to create awesome color palettes and recolor objects, sprites and scenes
easily in editor and runtime. Compatible with all render pipelines.
It comes with an interactive color wheel editor and a complete set of tools that let you also export color palettes as LUTs,
transform existing textures or specific colors from object materials.
Get it on the Asset Store:
https://assetstore.unity.com/packages/tools/painting/color-studio-151892?aid=1101lGsd
LUT PACK is a collection of +200 cinematic and artistic LUTs plus tints for Beautify. They can dramatically change the mood
and look of your game scenes. Beautify includes a LUT Browser that let you quickly text each one of the included LUT in this
package.
Get it on the Asset Store:
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/lut-pack-for-beautify-202502?aid=1101lGsd
FRAME PACK is a collection of +75 film mattes and artistic borders that can be used with Beautify or Unity UI. This p
Get it on the Asset Store:
https://assetstore.unity.com/packages/2d/gui/frame-pack-204058?aid=1101lGsd
MILITARY UNITS THE STYLIZED ART COLLECTION includes +100 hand-painted, stylized portraits of military units
from ancient warriors to modern ships and aircraft. Great for decorating your game screens, unit sheets, icons, or prototyping.
Get it on the Asset Store:
https://assetstore.unity.com/packages/2d/textures-materials/military-units-the-stylized-art-collection-
187769?aid=1101lGsd
PICKUPS VOL. 1 includes near 100 3D prefabs that can be used in a wide range of games in many ways: inventory icons,
3D pickups in the scene, decoration or prototyping.
Get it on the Asset Store:
https://assetstore.unity.com/packages/3d/props/pickups-vol-1-204581?aid=1101lGsd

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 44f7a64d904454f09a455fc561dbce2e
timeCreated: 1578838663
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c1cfaabf0583f44b4871807a898aaf31
folderAsset: yes
timeCreated: 1542886534
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,636 @@
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace HighlightPlus {
[CustomEditor(typeof(HighlightEffect))]
[CanEditMultipleObjects]
public class HighlightEffectEditor : Editor {
#pragma warning disable 0618
SerializedProperty profile, profileSync, camerasLayerMask, ignoreObjectVisibility, reflectionProbes, GPUInstancing;
SerializedProperty ignore, previewInEditor, effectGroup, effectGroupLayer, effectNameFilter, combineMeshes, alphaCutOff, cullBackFaces, depthClip, normalsOption, subMeshMask;
SerializedProperty highlighted, fadeInDuration, fadeOutDuration, flipY, constantWidth;
SerializedProperty overlay, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayBlending, overlayTexture, overlayTextureScale;
SerializedProperty outline, outlineColor, outlineWidth, outlineQuality, outlineDownsampling, outlineVisibility, outlineOptimalBlit, outlineBlitDebug, outlineIndependent;
SerializedProperty glow, glowWidth, glowQuality, glowDownsampling, glowHQColor, glowDithering, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed, glowBlendPasses, glowPasses, glowVisibility, glowBlendMode, glowOptimalBlit, glowBlitDebug, glowIgnoreMask;
SerializedProperty innerGlow, innerGlowWidth, innerGlowColor, innerGlowVisibility;
SerializedProperty seeThrough, seeThroughOccluderMask, seeThroughOccluderMaskAccurate, seeThroughOccluderThreshold, seeThroughOccluderCheckInterval, seeThroughOccluderCheckIndividualObjects, seeThroughDepthOffset, seeThroughMaxDepth;
SerializedProperty seeThroughIntensity, seeThroughTintAlpha, seeThroughTintColor, seeThroughNoise, seeThroughBorder, seeThroughBorderWidth, seeThroughBorderColor, seeThroughOrdered, seeThroughBorderOnly;
SerializedProperty targetFX, targetFXTexture, targetFXColor, targetFXCenter, targetFXRotationSpeed, targetFXInitialScale, targetFXEndScale, targetFXScaleToRenderBounds;
SerializedProperty targetFXAlignToGround, targetFXFadePower, targetFXGroundMaxDistance, targetFXGroundLayerMask, targetFXTransitionDuration, targetFXStayDuration, targetFXVisibility;
SerializedProperty hitFxInitialIntensity, hitFxMode, hitFxFadeOutDuration, hitFxColor, hitFxRadius;
SerializedProperty cameraDistanceFade, cameraDistanceFadeNear, cameraDistanceFadeFar;
HighlightEffect thisEffect;
bool profileChanged, enableProfileApply;
bool expandGeneralSettings, expandHighlightOptions;
bool showCurrentOccluders;
const string HP_GENERAL_SETTINGS = "HPGeneralSettings";
const string HP_HIGHLIGHT_OPTIONS = "HPHighlightOptions";
GUIStyle foldoutBold;
void OnEnable() {
expandGeneralSettings = EditorPrefs.GetBool("HPGeneralSettings", true);
expandHighlightOptions = EditorPrefs.GetBool("HPHighlightOptions", true);
profile = serializedObject.FindProperty("profile");
profileSync = serializedObject.FindProperty("profileSync");
camerasLayerMask = serializedObject.FindProperty("camerasLayerMask");
reflectionProbes = serializedObject.FindProperty("reflectionProbes");
ignoreObjectVisibility = serializedObject.FindProperty("ignoreObjectVisibility");
GPUInstancing = serializedObject.FindProperty("GPUInstancing");
normalsOption = serializedObject.FindProperty("normalsOption");
subMeshMask = serializedObject.FindProperty("subMeshMask");
ignore = serializedObject.FindProperty("ignore");
previewInEditor = serializedObject.FindProperty("previewInEditor");
effectGroup = serializedObject.FindProperty("effectGroup");
effectGroupLayer = serializedObject.FindProperty("effectGroupLayer");
effectNameFilter = serializedObject.FindProperty("effectNameFilter");
combineMeshes = serializedObject.FindProperty("combineMeshes");
alphaCutOff = serializedObject.FindProperty("alphaCutOff");
cullBackFaces = serializedObject.FindProperty("cullBackFaces");
depthClip = serializedObject.FindProperty("depthClip");
highlighted = serializedObject.FindProperty("_highlighted");
fadeInDuration = serializedObject.FindProperty("fadeInDuration");
fadeOutDuration = serializedObject.FindProperty("fadeOutDuration");
flipY = serializedObject.FindProperty("flipY");
constantWidth = serializedObject.FindProperty("constantWidth");
overlay = serializedObject.FindProperty("overlay");
overlayColor = serializedObject.FindProperty("overlayColor");
overlayAnimationSpeed = serializedObject.FindProperty("overlayAnimationSpeed");
overlayMinIntensity = serializedObject.FindProperty("overlayMinIntensity");
overlayBlending = serializedObject.FindProperty("overlayBlending");
overlayTexture = serializedObject.FindProperty("overlayTexture");
overlayTextureScale = serializedObject.FindProperty("overlayTextureScale");
outline = serializedObject.FindProperty("outline");
outlineColor = serializedObject.FindProperty("outlineColor");
outlineWidth = serializedObject.FindProperty("outlineWidth");
outlineQuality = serializedObject.FindProperty("outlineQuality");
outlineDownsampling = serializedObject.FindProperty("outlineDownsampling");
outlineVisibility = serializedObject.FindProperty("outlineVisibility");
outlineOptimalBlit = serializedObject.FindProperty("outlineOptimalBlit");
outlineBlitDebug = serializedObject.FindProperty("outlineBlitDebug");
outlineIndependent = serializedObject.FindProperty("outlineIndependent");
glow = serializedObject.FindProperty("glow");
glowWidth = serializedObject.FindProperty("glowWidth");
glowQuality = serializedObject.FindProperty("glowQuality");
glowDownsampling = serializedObject.FindProperty("glowDownsampling");
glowHQColor = serializedObject.FindProperty("glowHQColor");
glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed");
glowBlendPasses = serializedObject.FindProperty("glowBlendPasses");
glowDithering = serializedObject.FindProperty("glowDithering");
glowMagicNumber1 = serializedObject.FindProperty("glowMagicNumber1");
glowMagicNumber2 = serializedObject.FindProperty("glowMagicNumber2");
glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed");
glowPasses = serializedObject.FindProperty("glowPasses");
glowVisibility = serializedObject.FindProperty("glowVisibility");
glowBlendMode = serializedObject.FindProperty("glowBlendMode");
glowOptimalBlit = serializedObject.FindProperty("glowOptimalBlit");
glowBlitDebug = serializedObject.FindProperty("glowBlitDebug");
glowIgnoreMask = serializedObject.FindProperty("glowIgnoreMask");
innerGlow = serializedObject.FindProperty("innerGlow");
innerGlowColor = serializedObject.FindProperty("innerGlowColor");
innerGlowWidth = serializedObject.FindProperty("innerGlowWidth");
innerGlowVisibility = serializedObject.FindProperty("innerGlowVisibility");
seeThrough = serializedObject.FindProperty("seeThrough");
seeThroughOccluderMask = serializedObject.FindProperty("seeThroughOccluderMask");
seeThroughOccluderMaskAccurate = serializedObject.FindProperty("seeThroughOccluderMaskAccurate");
seeThroughOccluderThreshold = serializedObject.FindProperty("seeThroughOccluderThreshold");
seeThroughOccluderCheckInterval = serializedObject.FindProperty("seeThroughOccluderCheckInterval");
seeThroughOccluderCheckIndividualObjects = serializedObject.FindProperty("seeThroughOccluderCheckIndividualObjects");
seeThroughDepthOffset = serializedObject.FindProperty("seeThroughDepthOffset");
seeThroughMaxDepth = serializedObject.FindProperty("seeThroughMaxDepth");
seeThroughIntensity = serializedObject.FindProperty("seeThroughIntensity");
seeThroughTintAlpha = serializedObject.FindProperty("seeThroughTintAlpha");
seeThroughTintColor = serializedObject.FindProperty("seeThroughTintColor");
seeThroughNoise = serializedObject.FindProperty("seeThroughNoise");
seeThroughBorder = serializedObject.FindProperty("seeThroughBorder");
seeThroughBorderWidth = serializedObject.FindProperty("seeThroughBorderWidth");
seeThroughBorderColor = serializedObject.FindProperty("seeThroughBorderColor");
seeThroughOrdered = serializedObject.FindProperty("seeThroughOrdered");
seeThroughBorderOnly = serializedObject.FindProperty("seeThroughBorderOnly");
targetFX = serializedObject.FindProperty("targetFX");
targetFXTexture = serializedObject.FindProperty("targetFXTexture");
targetFXRotationSpeed = serializedObject.FindProperty("targetFXRotationSpeed");
targetFXInitialScale = serializedObject.FindProperty("targetFXInitialScale");
targetFXEndScale = serializedObject.FindProperty("targetFXEndScale");
targetFXScaleToRenderBounds = serializedObject.FindProperty("targetFXScaleToRenderBounds");
targetFXAlignToGround = serializedObject.FindProperty("targetFXAlignToGround");
targetFXFadePower = serializedObject.FindProperty("targetFXFadePower");
targetFXGroundMaxDistance = serializedObject.FindProperty("targetFXGroundMaxDistance");
targetFXGroundLayerMask = serializedObject.FindProperty("targetFXGroundLayerMask");
targetFXColor = serializedObject.FindProperty("targetFXColor");
targetFXCenter = serializedObject.FindProperty("targetFXCenter");
targetFXTransitionDuration = serializedObject.FindProperty("targetFXTransitionDuration");
targetFXStayDuration = serializedObject.FindProperty("targetFXStayDuration");
targetFXVisibility = serializedObject.FindProperty("targetFXVisibility");
hitFxInitialIntensity = serializedObject.FindProperty("hitFxInitialIntensity");
hitFxMode = serializedObject.FindProperty("hitFxMode");
hitFxFadeOutDuration = serializedObject.FindProperty("hitFxFadeOutDuration");
hitFxColor = serializedObject.FindProperty("hitFxColor");
hitFxRadius = serializedObject.FindProperty("hitFxRadius");
cameraDistanceFade = serializedObject.FindProperty("cameraDistanceFade");
cameraDistanceFadeNear = serializedObject.FindProperty("cameraDistanceFadeNear");
cameraDistanceFadeFar = serializedObject.FindProperty("cameraDistanceFadeFar");
thisEffect = (HighlightEffect)target;
thisEffect.Refresh();
}
private void OnDisable() {
EditorPrefs.SetBool(HP_GENERAL_SETTINGS, expandGeneralSettings);
EditorPrefs.SetBool(HP_HIGHLIGHT_OPTIONS, expandHighlightOptions);
}
public override void OnInspectorGUI() {
bool isManager = IsDefaultEffectUsedByManager();
EditorGUILayout.Separator();
serializedObject.Update();
if (foldoutBold == null) {
foldoutBold = new GUIStyle(EditorStyles.foldout);
foldoutBold.fontStyle = FontStyle.Bold;
}
EditorGUILayout.BeginHorizontal();
HighlightProfile prevProfile = (HighlightProfile)profile.objectReferenceValue;
EditorGUILayout.PropertyField(profile, new GUIContent("Profile", "Create or load stored presets."));
if (profile.objectReferenceValue != null) {
if (prevProfile != profile.objectReferenceValue) {
profileChanged = true;
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal();
GUILayout.Label("", GUILayout.Width(EditorGUIUtility.labelWidth));
if (GUILayout.Button(new GUIContent("Create", "Creates a new profile which is a copy of the current settings."), GUILayout.Width(60))) {
CreateProfile();
profileChanged = false;
enableProfileApply = false;
GUIUtility.ExitGUI();
return;
}
if (GUILayout.Button(new GUIContent("Load", "Updates settings with the profile configuration."), GUILayout.Width(60))) {
profileChanged = true;
}
if (!enableProfileApply)
GUI.enabled = false;
if (GUILayout.Button(new GUIContent("Save", "Updates profile configuration with changes in this inspector."), GUILayout.Width(60))) {
enableProfileApply = false;
profileChanged = false;
thisEffect.profile.Save(thisEffect);
EditorUtility.SetDirty(thisEffect.profile);
GUIUtility.ExitGUI();
return;
}
GUI.enabled = true;
if (GUILayout.Button(new GUIContent("Locate", "Finds the profile in the project"), GUILayout.Width(60))) {
if (thisEffect.profile != null) {
Selection.activeObject = thisEffect.profile;
EditorGUIUtility.PingObject(thisEffect.profile);
}
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.PropertyField(profileSync, new GUIContent("Sync With Profile", "If disabled, profile settings will only be loaded when clicking 'Load' which allows you to customize settings after loading a profile and keep those changes."));
EditorGUILayout.BeginHorizontal();
} else {
if (GUILayout.Button(new GUIContent("Create", "Creates a new profile which is a copy of the current settings."), GUILayout.Width(60))) {
CreateProfile();
GUIUtility.ExitGUI();
return;
}
}
EditorGUILayout.EndHorizontal();
if (isManager) {
EditorGUILayout.HelpBox("These are default settings for highlighted objects. If the highlighted object already has a Highlight Effect component, those properties will be used.", MessageType.Info);
}
expandGeneralSettings = EditorGUILayout.Foldout(expandGeneralSettings, "General Settings", true, foldoutBold);
if (expandGeneralSettings) {
if (!isManager) {
EditorGUILayout.PropertyField(previewInEditor);
}
EditorGUILayout.PropertyField(camerasLayerMask);
EditorGUILayout.PropertyField(ignoreObjectVisibility);
if (thisEffect.staticChildren) {
EditorGUILayout.HelpBox("This GameObject or one of its children is marked as static. If highlight is not visible, add a MeshCollider to them (the MeshCollider can be disabled).", MessageType.Warning);
}
EditorGUILayout.PropertyField(reflectionProbes);
EditorGUILayout.PropertyField(normalsOption);
EditorGUILayout.PropertyField(subMeshMask);
EditorGUILayout.PropertyField(GPUInstancing);
EditorGUILayout.Separator();
}
if (!isManager) {
EditorGUILayout.LabelField("State", EditorStyles.boldLabel);
if (isManager) {
EditorGUILayout.LabelField(new GUIContent("Highlighted", "Highlight state (controlled by Highlight Manager)."), new GUIContent(thisEffect.highlighted.ToString()));
} else {
EditorGUILayout.PropertyField(highlighted);
}
EditorGUILayout.LabelField(new GUIContent("Selected", "Selection state (used by Highlight Trigger or Manager) when using multi-selection option."), new GUIContent(thisEffect.isSelected.ToString()));
EditorGUILayout.Separator();
}
EditorGUILayout.BeginHorizontal();
expandHighlightOptions = EditorGUILayout.Foldout(expandHighlightOptions, "Highlight Options", true, foldoutBold);
if (GUILayout.Button("Help", GUILayout.Width(50))) {
EditorUtility.DisplayDialog("Quick Help", "Move the mouse over a setting for a short description.\n\nVisit kronnect.com's forum for support, questions and more cool assets.\n\nIf you like Highlight Plus please rate it or leave a review on the Asset Store! Thanks.", "Ok");
}
EditorGUILayout.EndHorizontal();
if (expandHighlightOptions) {
EditorGUI.BeginChangeCheck();
if (!isManager) {
EditorGUILayout.PropertyField(ignore, new GUIContent("Ignore", "This object won't be highlighted."));
}
if (!ignore.boolValue) {
EditorGUILayout.PropertyField(effectGroup, new GUIContent("Include", "Additional objects to highlight. Pro tip: when highlighting multiple objects at the same time include them in the same layer or under the same parent."));
if (effectGroup.intValue == (int)TargetOptions.LayerInScene || effectGroup.intValue == (int)TargetOptions.LayerInChildren) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(effectGroupLayer, new GUIContent("Layer"));
EditorGUI.indentLevel--;
}
bool usesHQEffects = (outlineQuality.intValue == (int)QualityLevel.Highest && outline.floatValue > 0) || (glowQuality.intValue == (int)QualityLevel.Highest && glow.floatValue > 0);
if (effectGroup.intValue != (int)TargetOptions.OnlyThisObject) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(effectNameFilter, new GUIContent("Object Name Filter"));
EditorGUILayout.PropertyField(combineMeshes);
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(alphaCutOff, new GUIContent("Alpha Cut Off", "Only for semi-transparent objects. Leave this to zero for normal opaque objects."));
EditorGUILayout.PropertyField(cullBackFaces);
EditorGUILayout.PropertyField(fadeInDuration);
EditorGUILayout.PropertyField(fadeOutDuration);
EditorGUILayout.PropertyField(cameraDistanceFade);
if (cameraDistanceFade.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(cameraDistanceFadeNear, new GUIContent("Near Distance"));
EditorGUILayout.PropertyField(cameraDistanceFadeFar, new GUIContent("Far Distance"));
EditorGUI.indentLevel--;
}
if (usesHQEffects) {
EditorGUILayout.PropertyField(depthClip);
if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS || EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android) {
EditorGUILayout.HelpBox("On mobile, consider enabling 'Depth Clip' option for better results.", MessageType.Info);
}
if (VRCheck.IsActive()) {
EditorGUILayout.PropertyField(flipY, new GUIContent("Flip Y Fix", "Flips outline/glow effect to fix bug introduced in Unity 2019.1.0 when VR is enabled."));
}
}
if (glowQuality.intValue != (int)QualityLevel.Highest || outlineQuality.intValue != (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(constantWidth, new GUIContent("Constant Width", "Compensates outline/glow width with depth increase."));
}
EditorGUILayout.PropertyField(outlineIndependent, new GUIContent("Independent", "Do not combine outline or glow with other highlighted objects."));
}
}
if (!ignore.boolValue) {
EditorGUILayout.Separator();
EditorGUILayout.LabelField("Effects", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(outline, "Outline", outline.floatValue > 0);
if (outline.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width"));
EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color"));
EditorGUILayout.BeginHorizontal();
QualityPropertyField(outlineQuality);
if (outlineQuality.intValue == (int)QualityLevel.Highest) {
GUILayout.Label("(Screen-Space Effect)");
} else {
GUILayout.Label("(Mesh-based Effect)");
}
EditorGUILayout.EndHorizontal();
CheckVRSupport(outlineQuality.intValue);
if (outlineQuality.intValue == (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling"));
EditorGUILayout.PropertyField(outlineOptimalBlit, new GUIContent("Optimal Blit", "Blits result over a section of the screen instead of rendering to the full screen buffer."));
if (outlineOptimalBlit.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(outlineBlitDebug, new GUIContent("Debug View", "Shows the blitting rectangle on the screen."));
if (outlineBlitDebug.boolValue && (!previewInEditor.boolValue || !highlighted.boolValue)) {
EditorGUILayout.HelpBox("Enable \"Preview In Editor\" and \"Highlighted\" to display the outline Debug View.", MessageType.Warning);
}
EditorGUI.indentLevel--;
}
}
GUI.enabled = outlineQuality.intValue != (int)QualityLevel.Highest || CheckForwardMSAA();
if (outlineQuality.intValue == (int)QualityLevel.Highest && glowQuality.intValue == (int)QualityLevel.Highest && glow.floatValue > 0) {
EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility"));
} else {
EditorGUILayout.PropertyField(outlineVisibility, new GUIContent("Visibility"));
}
GUI.enabled = true;
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(glow, "Outer Glow", glow.floatValue > 0);
if (glow.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width"));
EditorGUILayout.BeginHorizontal();
QualityPropertyField(glowQuality);
if (glowQuality.intValue == (int)QualityLevel.Highest) {
GUILayout.Label("(Screen-Space Effect)");
} else {
GUILayout.Label("(Mesh-based Effect)");
}
EditorGUILayout.EndHorizontal();
CheckVRSupport(glowQuality.intValue);
if (glowQuality.intValue == (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(glowDownsampling, new GUIContent("Downsampling"));
EditorGUILayout.PropertyField(glowHQColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(glowOptimalBlit, new GUIContent("Optimal Blit", "Blits result over a section of the screen instead of rendering to the full screen buffer."));
if (glowOptimalBlit.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(glowBlitDebug, new GUIContent("Debug View", "Shows the blitting rectangle on the screen."));
if (glowBlitDebug.boolValue && (!previewInEditor.boolValue || !highlighted.boolValue)) {
EditorGUILayout.HelpBox("Enable \"Preview In Editor\" and \"Highlighted\" to display the glow Debug View.", MessageType.Warning);
}
EditorGUI.indentLevel--;
}
GUI.enabled = glowQuality.intValue != (int)QualityLevel.Highest || CheckForwardMSAA();
EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility"));
EditorGUILayout.PropertyField(glowBlendMode, new GUIContent("Blend Mode"));
GUI.enabled = true;
} else {
GUI.enabled = glowQuality.intValue != (int)QualityLevel.Highest || CheckForwardMSAA();
EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility"));
GUI.enabled = true;
EditorGUILayout.PropertyField(glowDithering, new GUIContent("Dithering"));
if (glowDithering.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(glowMagicNumber1, new GUIContent("Magic Number 1"));
EditorGUILayout.PropertyField(glowMagicNumber2, new GUIContent("Magic Number 2"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(glowBlendPasses, new GUIContent("Blend Passes"));
if (!glowBlendPasses.boolValue) {
HighlightEffect ef = (HighlightEffect)target;
if (ef.glowPasses != null) {
for (int k = 0; k < ef.glowPasses.Length - 1; k++) {
if (ef.glowPasses[k].offset > ef.glowPasses[k + 1].offset) {
EditorGUILayout.HelpBox("Glow pass " + k + " has a greater offset than the next one. Reduce it to ensure the next glow pass is visible.", MessageType.Warning);
}
}
}
}
EditorGUILayout.PropertyField(glowPasses, true);
}
EditorGUILayout.PropertyField(glowAnimationSpeed, new GUIContent("Animation Speed"));
EditorGUILayout.PropertyField(glowIgnoreMask, new GUIContent("Ignore Mask"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(innerGlow, "Inner Glow", innerGlow.floatValue > 0);
if (innerGlow.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(innerGlowColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(innerGlowWidth, new GUIContent("Width"));
EditorGUILayout.PropertyField(innerGlowVisibility, new GUIContent("Visibility"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(overlay, "Overlay", overlay.floatValue > 0);
if (overlay.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(overlayColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(overlayTexture, new GUIContent("Texture"));
if (overlayTexture.objectReferenceValue != null) {
EditorGUILayout.PropertyField(overlayTextureScale, new GUIContent("Texture Scale"));
}
EditorGUILayout.PropertyField(overlayBlending, new GUIContent("Blending"));
EditorGUILayout.PropertyField(overlayMinIntensity, new GUIContent("Min Intensity"));
EditorGUILayout.PropertyField(overlayAnimationSpeed, new GUIContent("Animation Speed"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(targetFX, "Target", targetFX.boolValue);
if (targetFX.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(targetFXTexture, new GUIContent("Texture", "The texture that contains the shape to be drawn over the highlighted object."));
EditorGUILayout.PropertyField(targetFXColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(targetFXCenter, new GUIContent("Center", "Optionally assign a transform. Target will follow transform. If the object is skinned, you can also assign a bone to reflect currenct animation position."));
EditorGUILayout.PropertyField(targetFXRotationSpeed, new GUIContent("Rotation Speed"));
EditorGUILayout.PropertyField(targetFXInitialScale, new GUIContent("Initial Scale"));
EditorGUILayout.PropertyField(targetFXEndScale, new GUIContent("End Scale"));
EditorGUILayout.PropertyField(targetFXScaleToRenderBounds, new GUIContent("Scale To Object Bounds"));
EditorGUILayout.PropertyField(targetFXAlignToGround, new GUIContent("Align To Ground"));
if (targetFXAlignToGround.boolValue) {
EditorGUI.indentLevel++;
if (thisEffect.includedObjectsCount > 1 && targetFXCenter.objectReferenceValue == null && effectGroup.intValue != (int)TargetOptions.OnlyThisObject) {
EditorGUILayout.HelpBox("It's recommended to specify in the 'Center' property above, the specific object used to position the target fx image (will be rendered under that object on the ground).", MessageType.Info);
}
EditorGUILayout.PropertyField(targetFXGroundMaxDistance, new GUIContent("Ground Max Distance"));
EditorGUILayout.PropertyField(targetFXGroundLayerMask, new GUIContent("Ground Layer Mask"));
HighlightEffect he = (HighlightEffect)target;
if ((targetFXGroundLayerMask.intValue & (1<<he.gameObject.layer)) != 0) {
EditorGUILayout.HelpBox("Ground Layer Mask should not include this object layer.", MessageType.Warning);
}
EditorGUILayout.PropertyField(targetFXFadePower, new GUIContent("Fade Power"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(targetFXTransitionDuration, new GUIContent("Transition Duration"));
EditorGUILayout.PropertyField(targetFXStayDuration, new GUIContent("Stay Duration"));
EditorGUILayout.PropertyField(targetFXVisibility, new GUIContent("Visibility"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
}
EditorGUILayout.BeginVertical(GUI.skin.box);
EditorGUILayout.PropertyField(seeThrough);
if (seeThrough.intValue != (int)SeeThroughMode.Never) {
if (isManager && seeThrough.intValue == (int)SeeThroughMode.AlwaysWhenOccluded) {
EditorGUILayout.HelpBox("This option is not valid in Manager.\nTo make an object always visible add a Highlight Effect component to the gameobject and enable this option on the component.", MessageType.Error);
}
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(seeThroughOccluderMask, new GUIContent("Occluder Layer"));
if (seeThroughOccluderMask.intValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(seeThroughOccluderMaskAccurate, new GUIContent("Accurate"));
EditorGUILayout.PropertyField(seeThroughOccluderThreshold, new GUIContent("Radius Threshold", "Multiplier to the object bounds. Making the bounds smaller prevents false occlusion tests."));
EditorGUILayout.PropertyField(seeThroughOccluderCheckInterval, new GUIContent("Check Interval", "Interval in seconds between occlusion tests."));
EditorGUILayout.PropertyField(seeThroughOccluderCheckIndividualObjects, new GUIContent("Check Individual Objects"));
if (!showCurrentOccluders && Camera.main != null) {
GUI.enabled = Application.isPlaying;
EditorGUILayout.BeginHorizontal();
GUILayout.Label("", GUILayout.Width(30));
if (GUILayout.Button(" Show Current Occluders (only during Play Mode) ")) {
showCurrentOccluders = true;
}
GUILayout.FlexibleSpace();
EditorGUILayout.EndHorizontal();
GUI.enabled = true;
}
if (showCurrentOccluders) {
HighlightEffect h = (HighlightEffect)target;
List<Renderer> occluders = h.GetOccluders(Camera.main);
int count = occluders != null ? occluders.Count : 0;
if (count == 0) {
EditorGUILayout.LabelField("No occluders found (using main camera)");
} else {
EditorGUILayout.LabelField("Occluders found (using main camera):");
for (int k = 0; k < count; k++) {
if (occluders[k] == null) continue;
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField(occluders[k].name);
if (GUILayout.Button("Select")) {
Selection.activeGameObject = occluders[k].gameObject;
GUIUtility.ExitGUI();
}
EditorGUILayout.EndHorizontal();
}
}
}
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(seeThroughDepthOffset, new GUIContent("Depth Offset" + ((seeThroughDepthOffset.floatValue > 0) ? " •" : "")));
EditorGUILayout.PropertyField(seeThroughMaxDepth, new GUIContent("Max Depth" + ((seeThroughMaxDepth.floatValue > 0) ? " •" : "")));
EditorGUILayout.PropertyField(seeThroughIntensity, new GUIContent("Intensity"));
EditorGUILayout.PropertyField(seeThroughTintColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(seeThroughTintAlpha, new GUIContent("Color Blend"));
EditorGUILayout.PropertyField(seeThroughNoise, new GUIContent("Noise"));
EditorGUILayout.PropertyField(seeThroughBorder, new GUIContent("Border When Hidden" + ((seeThroughBorder.floatValue > 0) ? " •" : "")));
if (seeThroughBorder.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(seeThroughBorderWidth, new GUIContent("Width"));
EditorGUILayout.PropertyField(seeThroughBorderColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(seeThroughBorderOnly, new GUIContent("Border Only"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(seeThroughOrdered, new GUIContent("Ordered"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(hitFxInitialIntensity, "Hit FX", hitFxInitialIntensity.floatValue > 0);
if (hitFxInitialIntensity.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(hitFxMode, new GUIContent("Mode"));
EditorGUILayout.PropertyField(hitFxFadeOutDuration, new GUIContent("Fade Out Duration"));
EditorGUILayout.PropertyField(hitFxColor, new GUIContent("Color"));
if ((HitFxMode)hitFxMode.intValue == HitFxMode.LocalHit) {
EditorGUILayout.PropertyField(hitFxRadius, new GUIContent("Radius"));
}
EditorGUI.indentLevel--;
}
if (!Application.isPlaying) {
EditorGUILayout.HelpBox("Enter Play Mode to test this feature. In your code, call effect.HitFX() method to execute this hit effect.", MessageType.Info);
} else {
EditorGUI.indentLevel++;
if (GUILayout.Button("Execute Hit")) {
thisEffect.HitFX();
}
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
if (serializedObject.ApplyModifiedProperties() || profileChanged || Event.current.commandName == "UndoRedoPerformed") {
if (thisEffect.profile != null) {
if (profileChanged) {
thisEffect.profile.Load(thisEffect);
profileChanged = false;
enableProfileApply = false;
} else {
enableProfileApply = true;
}
}
foreach (HighlightEffect effect in targets) {
effect.Refresh();
}
}
}
void DrawSectionField(SerializedProperty property, string label, bool active) {
EditorGUILayout.PropertyField(property, new GUIContent(active ? label + " •" : label));
}
void CheckVRSupport(int qualityLevel) {
if (qualityLevel == (int)QualityLevel.Highest && VRCheck.IsActive()) {
if (PlayerSettings.stereoRenderingPath != StereoRenderingPath.MultiPass) {
EditorGUILayout.HelpBox("Highest Quality only supports VR Multi-Pass as CommandBuffers do not support this VR mode yet. Either switch to 'High Quality' or change VR Stereo mode to Multi-Pass.", MessageType.Error);
}
}
}
bool CheckForwardMSAA() {
if (QualitySettings.antiAliasing > 1) {
if (Camera.main != null && Camera.main.allowMSAA && !depthClip.boolValue) {
EditorGUILayout.HelpBox("Effect will be shown always on top due to MSAA. To enable depth clipping enable 'Depth Clip' option above OR disable MSAA in Quality Settings OR choose a different quality level.", MessageType.Info);
return false;
}
}
return true;
}
static readonly int[] qualityValues = { 0, 3, 1, 2 };
static readonly GUIContent[] qualityTexts = { new GUIContent("Fastest"), new GUIContent("Medium"), new GUIContent("High"), new GUIContent("Highest") };
public static void QualityPropertyField(SerializedProperty prop) {
prop.intValue = EditorGUILayout.IntPopup(new GUIContent("Quality", "Default and High use a mesh displacement technique. Highest quality can provide best look and also performance depending on the complexity of mesh."), prop.intValue, qualityTexts, qualityValues);
}
bool IsDefaultEffectUsedByManager() {
MonoBehaviour[] components = thisEffect.GetComponents<MonoBehaviour>();
if (components != null) {
for (int k = 0; k < components.Length; k++) {
if (components[k] == null || !components[k].enabled)
continue;
string name = components[k].GetType().Name;
if ("HighlightManager".Equals(name)) return true;
}
}
return false;
}
#region Profile handling
void CreateProfile() {
HighlightProfile newProfile = CreateInstance<HighlightProfile>();
newProfile.Save(thisEffect);
AssetDatabase.CreateAsset(newProfile, "Assets/Highlight Plus Profile.asset");
AssetDatabase.SaveAssets();
EditorUtility.FocusProjectWindow();
Selection.activeObject = newProfile;
thisEffect.profile = newProfile;
}
#endregion
#pragma warning restore 0618
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: be287539f47634552a716f0705710448
timeCreated: 1542886545
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,69 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace HighlightPlus {
[CustomEditor(typeof(HighlightManager))]
public class HighlightManagerEditor : Editor {
SerializedProperty highlightOnHover, layerMask, raycastCamera, raycastSource, minDistance, maxDistance, respectUI;
SerializedProperty selectOnClick, selectedProfile, selectedAndHighlightedProfile, singleSelection, toggleOnClick;
void OnEnable() {
highlightOnHover = serializedObject.FindProperty("highlightOnHover");
layerMask = serializedObject.FindProperty("layerMask");
raycastCamera = serializedObject.FindProperty("raycastCamera");
raycastSource = serializedObject.FindProperty("raycastSource");
minDistance = serializedObject.FindProperty("minDistance");
maxDistance = serializedObject.FindProperty("maxDistance");
respectUI = serializedObject.FindProperty("respectUI");
selectOnClick = serializedObject.FindProperty("selectOnClick");
selectedProfile = serializedObject.FindProperty("selectedProfile");
selectedAndHighlightedProfile = serializedObject.FindProperty("selectedAndHighlightedProfile");
singleSelection = serializedObject.FindProperty("singleSelection");
toggleOnClick = serializedObject.FindProperty("toggle");
}
public override void OnInspectorGUI() {
EditorGUILayout.Separator();
EditorGUILayout.HelpBox("Only objects with a collider can be highlighted automatically.", MessageType.Info);
serializedObject.Update();
EditorGUILayout.PropertyField(layerMask);
EditorGUILayout.PropertyField(raycastCamera);
EditorGUILayout.PropertyField(raycastSource);
EditorGUILayout.PropertyField(minDistance);
EditorGUILayout.PropertyField(maxDistance);
EditorGUILayout.PropertyField(respectUI);
EditorGUILayout.PropertyField(highlightOnHover);
EditorGUILayout.PropertyField(selectOnClick);
if (selectOnClick.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(selectedProfile);
EditorGUILayout.PropertyField(selectedAndHighlightedProfile);
EditorGUILayout.PropertyField(singleSelection);
EditorGUILayout.PropertyField(toggleOnClick);
EditorGUI.indentLevel--;
}
serializedObject.ApplyModifiedProperties();
}
[MenuItem("GameObject/Effects/Highlight Plus/Create Manager", false, 10)]
static void CreateManager(MenuCommand menuCommand) {
HighlightManager manager = FindObjectOfType<HighlightManager>();
if (manager == null) {
GameObject managerGO = new GameObject("HighlightPlusManager");
manager = managerGO.AddComponent<HighlightManager>();
// Register root object for undo.
Undo.RegisterCreatedObjectUndo(manager, "Create Highlight Plus Manager");
}
Selection.activeObject = manager;
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ace58d1d278d649c98e5a2b5a066b3cd
timeCreated: 1548711355
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,323 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace HighlightPlus {
[CustomEditor(typeof(HighlightProfile))]
[CanEditMultipleObjects]
public class HighlightProfileEditor : Editor {
SerializedProperty effectGroup, effectGroupLayer, effectNameFilter, combineMeshes, alphaCutOff, cullBackFaces, depthClip, normalsOption;
SerializedProperty overlay, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayTexture, overlayTextureScale, overlayBlending;
SerializedProperty fadeInDuration, fadeOutDuration, constantWidth;
SerializedProperty outline, outlineColor, outlineWidth, outlineQuality, outlineDownsampling, outlineOptimalBlit, outlineVisibility, outlineIndependent;
SerializedProperty glow, glowWidth, glowQuality, glowOptimalBlit, glowDownsampling, glowHQColor, glowDithering, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed, glowVisibility, glowBlendMode, glowBlendPasses, glowPasses, glowIgnoreMask;
SerializedProperty innerGlow, innerGlowWidth, innerGlowColor, innerGlowVisibility;
SerializedProperty targetFX, targetFXTexture, targetFXColor, targetFXRotationSpeed, targetFXInitialScale, targetFXEndScale, targetFXScaleToRenderBounds;
SerializedProperty targetFXAlignToGround, targetFXFadePower, targetFXGroundMaxDistance, targetFXGroundLayerMask, targetFXTransitionDuration, targetFXStayDuration, targetFXVisibility;
SerializedProperty seeThrough, seeThroughOccluderMask, seeThroughOccluderMaskAccurate, seeThroughOccluderThreshold, seeThroughOccluderCheckInterval, seeThroughOccluderCheckIndividualObjects, seeThroughDepthOffset, seeThroughMaxDepth;
SerializedProperty seeThroughIntensity, seeThroughTintAlpha, seeThroughTintColor, seeThroughNoise, seeThroughBorder, seeThroughBorderWidth, seeThroughBorderColor, seeThroughOrdered, seeThroughBorderOnly;
SerializedProperty hitFxInitialIntensity, hitFxMode, hitFxFadeOutDuration, hitFxColor, hitFxRadius;
SerializedProperty cameraDistanceFade, cameraDistanceFadeNear, cameraDistanceFadeFar;
void OnEnable() {
effectGroup = serializedObject.FindProperty("effectGroup");
effectGroupLayer = serializedObject.FindProperty("effectGroupLayer");
effectNameFilter = serializedObject.FindProperty("effectNameFilter");
combineMeshes = serializedObject.FindProperty("combineMeshes");
alphaCutOff = serializedObject.FindProperty("alphaCutOff");
cullBackFaces = serializedObject.FindProperty("cullBackFaces");
depthClip = serializedObject.FindProperty("depthClip");
normalsOption = serializedObject.FindProperty("normalsOption");
fadeInDuration = serializedObject.FindProperty("fadeInDuration");
fadeOutDuration = serializedObject.FindProperty("fadeOutDuration");
constantWidth = serializedObject.FindProperty("constantWidth");
overlay = serializedObject.FindProperty("overlay");
overlayColor = serializedObject.FindProperty("overlayColor");
overlayAnimationSpeed = serializedObject.FindProperty("overlayAnimationSpeed");
overlayMinIntensity = serializedObject.FindProperty("overlayMinIntensity");
overlayBlending = serializedObject.FindProperty("overlayBlending");
overlayTexture = serializedObject.FindProperty("overlayTexture");
overlayTextureScale = serializedObject.FindProperty("overlayTextureScale");
outline = serializedObject.FindProperty("outline");
outlineColor = serializedObject.FindProperty("outlineColor");
outlineWidth = serializedObject.FindProperty("outlineWidth");
outlineQuality = serializedObject.FindProperty("outlineQuality");
outlineOptimalBlit = serializedObject.FindProperty("outlineOptimalBlit");
outlineDownsampling = serializedObject.FindProperty("outlineDownsampling");
outlineVisibility = serializedObject.FindProperty("outlineVisibility");
outlineIndependent = serializedObject.FindProperty("outlineIndependent");
glow = serializedObject.FindProperty("glow");
glowWidth = serializedObject.FindProperty("glowWidth");
glowQuality = serializedObject.FindProperty("glowQuality");
glowOptimalBlit = serializedObject.FindProperty("glowOptimalBlit");
glowDownsampling = serializedObject.FindProperty("glowDownsampling");
glowHQColor = serializedObject.FindProperty("glowHQColor");
glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed");
glowDithering = serializedObject.FindProperty("glowDithering");
glowMagicNumber1 = serializedObject.FindProperty("glowMagicNumber1");
glowMagicNumber2 = serializedObject.FindProperty("glowMagicNumber2");
glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed");
glowBlendPasses = serializedObject.FindProperty("glowBlendPasses");
glowVisibility = serializedObject.FindProperty("glowVisibility");
glowBlendMode = serializedObject.FindProperty("glowBlendMode");
glowPasses = serializedObject.FindProperty("glowPasses");
glowIgnoreMask = serializedObject.FindProperty("glowIgnoreMask");
innerGlow = serializedObject.FindProperty("innerGlow");
innerGlowColor = serializedObject.FindProperty("innerGlowColor");
innerGlowWidth = serializedObject.FindProperty("innerGlowWidth");
innerGlowVisibility = serializedObject.FindProperty("innerGlowVisibility");
targetFX = serializedObject.FindProperty("targetFX");
targetFXTexture = serializedObject.FindProperty("targetFXTexture");
targetFXRotationSpeed = serializedObject.FindProperty("targetFXRotationSpeed");
targetFXInitialScale = serializedObject.FindProperty("targetFXInitialScale");
targetFXEndScale = serializedObject.FindProperty("targetFXEndScale");
targetFXScaleToRenderBounds = serializedObject.FindProperty("targetFXScaleToRenderBounds");
targetFXAlignToGround = serializedObject.FindProperty("targetFXAlignToGround");
targetFXGroundMaxDistance = serializedObject.FindProperty("targetFXGroundMaxDistance");
targetFXGroundLayerMask = serializedObject.FindProperty("targetFXGroundLayerMask");
targetFXFadePower = serializedObject.FindProperty("targetFXFadePower");
targetFXColor = serializedObject.FindProperty("targetFXColor");
targetFXTransitionDuration = serializedObject.FindProperty("targetFXTransitionDuration");
targetFXStayDuration = serializedObject.FindProperty("targetFXStayDuration");
targetFXVisibility = serializedObject.FindProperty("targetFXVisibility");
seeThrough = serializedObject.FindProperty("seeThrough");
seeThroughOccluderMask = serializedObject.FindProperty("seeThroughOccluderMask");
seeThroughOccluderMaskAccurate = serializedObject.FindProperty("seeThroughOccluderMaskAccurate");
seeThroughOccluderThreshold = serializedObject.FindProperty("seeThroughOccluderThreshold");
seeThroughOccluderCheckInterval = serializedObject.FindProperty("seeThroughOccluderCheckInterval");
seeThroughOccluderCheckIndividualObjects = serializedObject.FindProperty("seeThroughOccluderCheckIndividualObjects");
seeThroughDepthOffset = serializedObject.FindProperty("seeThroughDepthOffset");
seeThroughMaxDepth = serializedObject.FindProperty("seeThroughMaxDepth");
seeThroughIntensity = serializedObject.FindProperty("seeThroughIntensity");
seeThroughTintAlpha = serializedObject.FindProperty("seeThroughTintAlpha");
seeThroughTintColor = serializedObject.FindProperty("seeThroughTintColor");
seeThroughNoise = serializedObject.FindProperty("seeThroughNoise");
seeThroughBorder = serializedObject.FindProperty("seeThroughBorder");
seeThroughBorderWidth = serializedObject.FindProperty("seeThroughBorderWidth");
seeThroughBorderColor = serializedObject.FindProperty("seeThroughBorderColor");
seeThroughBorderOnly = serializedObject.FindProperty("seeThroughBorderOnly");
seeThroughOrdered = serializedObject.FindProperty("seeThroughOrdered");
hitFxInitialIntensity = serializedObject.FindProperty("hitFxInitialIntensity");
hitFxMode = serializedObject.FindProperty("hitFxMode");
hitFxFadeOutDuration = serializedObject.FindProperty("hitFxFadeOutDuration");
hitFxColor = serializedObject.FindProperty("hitFxColor");
hitFxRadius = serializedObject.FindProperty("hitFxRadius");
cameraDistanceFade = serializedObject.FindProperty("cameraDistanceFade");
cameraDistanceFadeNear = serializedObject.FindProperty("cameraDistanceFadeNear");
cameraDistanceFadeFar = serializedObject.FindProperty("cameraDistanceFadeFar");
}
public override void OnInspectorGUI() {
EditorGUILayout.Separator();
EditorGUILayout.LabelField("Highlight Options", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(effectGroup, new GUIContent("Include"));
if (effectGroup.intValue == (int)TargetOptions.LayerInScene || effectGroup.intValue == (int)TargetOptions.LayerInChildren) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(effectGroupLayer, new GUIContent("Layer"));
EditorGUI.indentLevel--;
}
if (effectGroup.intValue != (int)TargetOptions.OnlyThisObject && effectGroup.intValue != (int)TargetOptions.Scripting) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(effectNameFilter, new GUIContent("Object Name Filter"));
EditorGUILayout.PropertyField(combineMeshes);
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(alphaCutOff);
EditorGUILayout.PropertyField(cullBackFaces);
EditorGUILayout.PropertyField(normalsOption);
EditorGUILayout.PropertyField(depthClip);
EditorGUILayout.PropertyField(fadeInDuration);
EditorGUILayout.PropertyField(fadeOutDuration);
EditorGUILayout.PropertyField(cameraDistanceFade);
if (cameraDistanceFade.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(cameraDistanceFadeNear, new GUIContent("Near Distance"));
EditorGUILayout.PropertyField(cameraDistanceFadeFar, new GUIContent("Far Distance"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(constantWidth);
EditorGUILayout.PropertyField(outlineIndependent, new GUIContent("Independent", "Do not combine outline with other highlighted objects."));
EditorGUILayout.Separator();
EditorGUILayout.LabelField("Effects", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(outline, "Outline", outline.floatValue > 0);
if (outline.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width"));
EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color"));
HighlightEffectEditor.QualityPropertyField(outlineQuality);
if (outlineQuality.intValue == (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling"));
EditorGUILayout.PropertyField(outlineOptimalBlit, new GUIContent("Optimal Blit", "Blits result over a section of the screen instead of rendering to the full screen buffer."));
}
if (outlineQuality.intValue == (int)QualityLevel.Highest && glowQuality.intValue == (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility"));
} else {
EditorGUILayout.PropertyField(outlineVisibility, new GUIContent("Visibility"));
}
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(glow, "Outer Glow", glow.floatValue > 0);
if (glow.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width"));
HighlightEffectEditor.QualityPropertyField(glowQuality);
if (glowQuality.intValue == (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(glowDownsampling, new GUIContent("Downsampling"));
EditorGUILayout.PropertyField(glowHQColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(glowOptimalBlit, new GUIContent("Optimal Blit", "Blits result over a section of the screen instead of rendering to the full screen buffer."));
}
EditorGUILayout.PropertyField(glowAnimationSpeed, new GUIContent("Animation Speed"));
EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility"));
EditorGUILayout.PropertyField(glowBlendMode, new GUIContent("Blend Mode"));
if (glowQuality.intValue != (int)QualityLevel.Highest) {
EditorGUILayout.PropertyField(glowDithering, new GUIContent("Dithering"));
if (glowDithering.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(glowMagicNumber1, new GUIContent("Magic Number 1"));
EditorGUILayout.PropertyField(glowMagicNumber2, new GUIContent("Magic Number 2"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(glowBlendPasses, new GUIContent("Blend Passes"));
EditorGUILayout.PropertyField(glowPasses, true);
EditorGUILayout.PropertyField(glowIgnoreMask, new GUIContent("Ignore Mask"));
}
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(innerGlow, "Inner Glow", innerGlow.floatValue > 0);
if (innerGlow.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(innerGlowColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(innerGlowWidth, new GUIContent("Width"));
EditorGUILayout.PropertyField(innerGlowVisibility, new GUIContent("Visibility"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(overlay, "Overlay", overlay.floatValue > 0);
if (overlay.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(overlayColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(overlayTexture, new GUIContent("Texture"));
if (overlayTexture.objectReferenceValue != null) {
EditorGUILayout.PropertyField(overlayTextureScale, new GUIContent("Texture Scale"));
}
EditorGUILayout.PropertyField(overlayBlending, new GUIContent("Blending"));
EditorGUILayout.PropertyField(overlayMinIntensity, new GUIContent("Min Intensity"));
EditorGUILayout.PropertyField(overlayAnimationSpeed, new GUIContent("Animation Speed"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(targetFX, "Target", targetFX.boolValue);
if (targetFX.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(targetFXTexture, new GUIContent("Texture"));
EditorGUILayout.PropertyField(targetFXColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(targetFXRotationSpeed, new GUIContent("Rotation Speed"));
EditorGUILayout.PropertyField(targetFXInitialScale, new GUIContent("Initial Scale"));
EditorGUILayout.PropertyField(targetFXEndScale, new GUIContent("End Scale"));
EditorGUILayout.PropertyField(targetFXScaleToRenderBounds, new GUIContent("Scale To Object Bounds"));
EditorGUILayout.PropertyField(targetFXAlignToGround, new GUIContent("Align To Ground"));
if (targetFXAlignToGround.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(targetFXGroundMaxDistance, new GUIContent("Ground Max Distance"));
EditorGUILayout.PropertyField(targetFXGroundLayerMask, new GUIContent("Ground Layer Mask"));
EditorGUILayout.PropertyField(targetFXFadePower, new GUIContent("Fade Power"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(targetFXTransitionDuration, new GUIContent("Transition Duration"));
EditorGUILayout.PropertyField(targetFXStayDuration, new GUIContent("Stay Duration"));
EditorGUILayout.PropertyField(targetFXVisibility, new GUIContent("Visibility"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
EditorGUILayout.PropertyField(seeThrough);
if (seeThrough.intValue != (int)SeeThroughMode.Never) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(seeThroughOccluderMask, new GUIContent("Occluder Layer"));
if (seeThroughOccluderMask.intValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(seeThroughOccluderMaskAccurate, new GUIContent("Accurate"));
EditorGUILayout.PropertyField(seeThroughOccluderThreshold, new GUIContent("Radius Threshold", "Multiplier to the object bounds. Making the bounds smaller prevents false occlusion tests."));
EditorGUILayout.PropertyField(seeThroughOccluderCheckInterval, new GUIContent("Check Interval", "Interval in seconds between occlusion tests."));
EditorGUILayout.PropertyField(seeThroughOccluderCheckIndividualObjects, new GUIContent("Check Individual Objects", "Interval in seconds between occlusion tests."));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(seeThroughDepthOffset, new GUIContent("Depth Offset" + ((seeThroughDepthOffset.floatValue > 0) ? " •" : "")));
EditorGUILayout.PropertyField(seeThroughMaxDepth, new GUIContent("Max Depth" + ((seeThroughMaxDepth.floatValue > 0) ? " •" : "")));
EditorGUILayout.PropertyField(seeThroughIntensity, new GUIContent("Intensity"));
EditorGUILayout.PropertyField(seeThroughTintColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(seeThroughTintAlpha, new GUIContent("Color Blend"));
EditorGUILayout.PropertyField(seeThroughNoise, new GUIContent("Noise"));
EditorGUILayout.PropertyField(seeThroughBorder, new GUIContent("Border When Hidden"));
if (seeThroughBorder.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(seeThroughBorderWidth, new GUIContent("Width"));
EditorGUILayout.PropertyField(seeThroughBorderColor, new GUIContent("Color"));
EditorGUILayout.PropertyField(seeThroughBorderOnly, new GUIContent("Border Only"));
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(seeThroughOrdered, new GUIContent("Ordered"));
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(GUI.skin.box);
DrawSectionField(hitFxInitialIntensity, "Hit FX", hitFxInitialIntensity.floatValue > 0);
if (hitFxInitialIntensity.floatValue > 0) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(hitFxInitialIntensity, new GUIContent("Initial Intensity"));
EditorGUILayout.PropertyField(hitFxMode, new GUIContent("Mode"));
EditorGUILayout.PropertyField(hitFxFadeOutDuration, new GUIContent("Fade Out Duration"));
EditorGUILayout.PropertyField(hitFxColor, new GUIContent("Color"));
if ((HitFxMode)hitFxMode.intValue == HitFxMode.LocalHit) {
EditorGUILayout.PropertyField(hitFxRadius, new GUIContent("Radius"));
}
EditorGUI.indentLevel--;
}
EditorGUILayout.EndVertical();
if (serializedObject.ApplyModifiedProperties() || (Event.current.type == EventType.ValidateCommand &&
Event.current.commandName == "UndoRedoPerformed")) {
// Triggers profile reload on all Highlight Effect scripts
HighlightEffect[] effects = FindObjectsOfType<HighlightEffect>();
for (int t = 0; t < targets.Length; t++) {
HighlightProfile profile = (HighlightProfile)targets[t];
for (int k = 0; k < effects.Length; k++) {
if (effects[k] != null && effects[k].profile == profile && effects[k].profileSync) {
profile.Load(effects[k]);
effects[k].Refresh();
}
}
}
EditorUtility.SetDirty(target);
}
}
void DrawSectionField(SerializedProperty property, string label, bool active) {
EditorGUILayout.PropertyField(property, new GUIContent(active ? label + " •" : label));
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b3b0e551d6f4f4f3987e8e5be2e89285
timeCreated: 1542886545
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
using UnityEditor;
using UnityEngine;
namespace HighlightPlus {
[CustomEditor (typeof(HighlightSeeThroughOccluder))]
public class HighlightSeeThroughOccluderEditor : Editor {
public override void OnInspectorGUI () {
EditorGUILayout.Separator ();
EditorGUILayout.HelpBox ("This object will occlude any see-through effect.", MessageType.Info);
DrawDefaultInspector ();
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 11e725ecbe4d74569b232e1a0d57efba
timeCreated: 1548711355
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
using UnityEditor;
using UnityEngine;
namespace HighlightPlus {
[CustomEditor(typeof(HighlightTrigger))]
public class HighlightTriggerEditor : Editor {
SerializedProperty highlightOnHover, triggerMode, raycastCamera, raycastSource, minDistance, maxDistance, respectUI, volumeLayerMask;
SerializedProperty selectOnClick, selectedProfile, selectedAndHighlightedProfile, singleSelection, toggleOnClick;
HighlightTrigger trigger;
void OnEnable() {
highlightOnHover = serializedObject.FindProperty("highlightOnHover");
triggerMode = serializedObject.FindProperty("triggerMode");
raycastCamera = serializedObject.FindProperty("raycastCamera");
raycastSource = serializedObject.FindProperty("raycastSource");
minDistance = serializedObject.FindProperty("minDistance");
maxDistance = serializedObject.FindProperty("maxDistance");
respectUI = serializedObject.FindProperty("respectUI");
volumeLayerMask = serializedObject.FindProperty("volumeLayerMask");
selectOnClick = serializedObject.FindProperty("selectOnClick");
selectedProfile = serializedObject.FindProperty("selectedProfile");
selectedAndHighlightedProfile = serializedObject.FindProperty("selectedAndHighlightedProfile");
singleSelection = serializedObject.FindProperty("singleSelection");
toggleOnClick = serializedObject.FindProperty("toggle");
trigger = (HighlightTrigger)target;
trigger.Init();
}
public override void OnInspectorGUI() {
serializedObject.Update();
if (trigger.triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) {
if (trigger.colliders == null || trigger.colliders.Length == 0) {
EditorGUILayout.HelpBox("No collider found on this object or any of its children. Add colliders to allow automatic highlighting.", MessageType.Warning);
}
} else {
#if ENABLE_INPUT_SYSTEM
if (trigger.triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) {
EditorGUILayout.HelpBox("This trigger mode is not compatible with the new input system.", MessageType.Error);
}
#endif
if (trigger.GetComponent<Collider>() == null) {
EditorGUILayout.HelpBox("No collider found on this object. Add a collider to allow automatic highlighting.", MessageType.Error);
}
}
EditorGUILayout.PropertyField(triggerMode);
switch (trigger.triggerMode) {
case TriggerMode.RaycastOnThisObjectAndChildren:
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(raycastCamera);
EditorGUILayout.PropertyField(raycastSource);
EditorGUILayout.PropertyField(minDistance);
EditorGUILayout.PropertyField(maxDistance);
EditorGUI.indentLevel--;
break;
case TriggerMode.Volume:
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(volumeLayerMask);
EditorGUI.indentLevel--;
break;
}
if (trigger.triggerMode != TriggerMode.Volume) {
EditorGUILayout.PropertyField(respectUI);
}
EditorGUILayout.PropertyField(highlightOnHover);
EditorGUILayout.PropertyField(selectOnClick);
if (selectOnClick.boolValue) {
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(selectedProfile);
EditorGUILayout.PropertyField(selectedAndHighlightedProfile);
EditorGUILayout.PropertyField(singleSelection);
EditorGUILayout.PropertyField(toggleOnClick);
EditorGUILayout.HelpBox("To deselect any object by clicking outside, add a Highlight Manager to the scene.", MessageType.Info);
EditorGUI.indentLevel--;
}
if (serializedObject.ApplyModifiedProperties()) {
trigger.Init();
}
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: eaf7f56fbcfa343efb5081d4309cb76b
timeCreated: 1548711355
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,132 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEditor;
namespace HighlightPlus {
public class TransparentWithDepth {
static Material bmDepthOnly;
static Material bmDepthClipping;
[MenuItem ("GameObject/Effects/Highlight Plus/Add Depth To Transparent Object", false, 100)]
static void AddDepthOption () {
Renderer renderer = GetRenderer ();
if (renderer == null)
return;
if (!EditorUtility.DisplayDialog("Add Depth to Transparent Object", "This option will force the transparent object to write to the depth buffer by adding a new special material to the renderer (existing materials are preserved) so it can occlude and allow See-Through effect.\nOnly use on transparent objects.\n\nProceed?", "Yes", "No")) {
return;
}
Material[] materials = renderer.sharedMaterials;
for (int k = 0; k < materials.Length; k++) {
if (materials [k] == bmDepthOnly) {
EditorUtility.DisplayDialog ("Depth Support", "Already set! Nothing to do.", "Ok");
return;
}
}
if (materials == null) {
renderer.sharedMaterial = bmDepthOnly;
} else {
List<Material> newMaterials = new List<Material> (materials);
newMaterials.Insert (0, bmDepthOnly);
renderer.sharedMaterials = newMaterials.ToArray ();
}
}
[MenuItem("GameObject/Effects/Highlight Plus/Make Transparent Object Compatible with Depth Clipping", false, 101)]
static void AddDepthClippingOption() {
Renderer renderer = GetRenderer();
if (renderer == null)
return;
if (!EditorUtility.DisplayDialog("Make Transparent Object Compatible with Depth Clipping", "This option will force the transparent object to write to _CameraDepthBuffer which is used by depth clip option (existing materials are preserved) so it can occlude outline and glow effects in High Quality mode.\nOnly use on transparent objects which need to occlude other outline / glow effects in high quality mode.\n\nProceed?", "Yes", "No")) {
return;
}
Material[] materials = renderer.sharedMaterials;
for (int k = 0; k < materials.Length; k++) {
if (materials[k] == bmDepthClipping) {
EditorUtility.DisplayDialog("Depth Clipping Support", "Already set! Nothing to do.", "Ok");
return;
}
}
if (materials == null) {
renderer.sharedMaterial = bmDepthClipping;
} else {
List<Material> newMaterials = new List<Material>(materials);
newMaterials.Insert(0, bmDepthClipping);
renderer.sharedMaterials = newMaterials.ToArray();
}
}
[MenuItem("GameObject/Effects/Highlight Plus/Remove Depth Compatibility", false, 102)]
static void RemoveDepthOption() {
Renderer renderer = GetRenderer();
if (renderer == null)
return;
bool found = false;
Material[] materials = renderer.sharedMaterials;
for (int k = 0; k < materials.Length; k++) {
if (materials[k] == bmDepthOnly || materials[k] == bmDepthClipping) {
materials[k] = null;
found = true;
}
}
if (found) {
List<Material> newMaterials = new List<Material>();
for (int k = 0; k < materials.Length; k++) {
if (materials[k] != null) {
newMaterials.Add(materials[k]);
}
}
renderer.sharedMaterials = newMaterials.ToArray();
return;
}
EditorUtility.DisplayDialog("Depth Support", "This object was not previously modified! Nothing to do.", "Ok");
}
static Renderer GetRenderer() {
if (Selection.activeGameObject == null) {
EditorUtility.DisplayDialog("Depth Support", "This option can only be used on GameObjects.", "Ok");
return null;
}
Renderer renderer = Selection.activeGameObject.GetComponent<Renderer>();
if (renderer == null) {
EditorUtility.DisplayDialog("Depth Support", "This option can only be used on GameObjects with a Renderer component attached.", "Ok");
return null;
}
if (bmDepthOnly == null) {
bmDepthOnly = Resources.Load<Material>("HighlightPlus/HighlightPlusDepthWrite");
if (bmDepthOnly == null) {
EditorUtility.DisplayDialog("Depth Support", "HighlightPlusDepthWrite material not found!", "Ok");
return null;
}
}
if (bmDepthClipping == null) {
bmDepthClipping = Resources.Load<Material>("HighlightPlus/HighlightPlusDepthClipComp");
if (bmDepthClipping == null) {
EditorUtility.DisplayDialog("Depth Clipping Support", "HighlightPlusDepthClipComp material not found!", "Ok");
return null;
}
}
return renderer;
}
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: be6e3be6d17ed49a3bd16d816815d6fd
timeCreated: 1515683694
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,47 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.XR;
namespace HighlightPlus {
public static class VRCheck {
#if UNITY_2019_3_OR_NEWER
static List<XRDisplaySubsystemDescriptor> displaysDescs = new List<XRDisplaySubsystemDescriptor>();
static List<XRDisplaySubsystem> displays = new List<XRDisplaySubsystem>();
public static bool IsActive() {
displaysDescs.Clear();
SubsystemManager.GetSubsystemDescriptors(displaysDescs);
// If there are registered display descriptors that is a good indication that VR is most likely "enabled"
return displaysDescs.Count > 0;
}
public static bool IsVrRunning() {
bool vrIsRunning = false;
displays.Clear();
SubsystemManager.GetInstances(displays);
foreach (var displaySubsystem in displays) {
if (displaySubsystem.running) {
vrIsRunning = true;
break;
}
}
return vrIsRunning;
}
#else
public static bool IsActive() {
return PlayerSettings.virtualRealitySupported;
}
public static bool IsVrRunning() {
return Application.isPlaying && PlayerSettings.virtualRealitySupported;
}
#endif
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e692cbce37dc14e29b436d0c876f45dc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,451 @@
**************************************
* HIGHLIGHT PLUS *
* Created by Ramiro Oliva (Kronnect) *
* README FILE *
**************************************
Quick help: how to use this asset?
----------------------------------
1) Highlighting specific objects: add HighlightEffect.cs script to any GameObject. Customize the appearance options.
In the Highlight Effect inspector, you can specify which objects, in addition to this one, are also affected by the effect:
a) Only this object
b) This object and its children
c) All objects from the root to the children
d) All objects belonging to a layer
2) Control highlight effect when mouse is over:
Add HighlightTrigger.cs script to the GameObject. It will activate highlight on the gameobject when mouse pass over it.
3) Highlighting any object in the scene:
Select top menu GameObject -> Effects -> Highlight Plus -> Create Manager.
Customize appearance and behaviour of Highlight Manager. Those settings are default settings for all objects. If you want different settings for certain objects just add another HighlightEffect script to each different object. The manager will use those settings.
4) Make transparent shaders compatible with See-Through effect:
If you want the See-Through effect be seen through other transparent objects, they need to be modified so they write to depth buffer (by default transparent objects do not write to z-buffer).
To do so, select top menu GameObject -> Effects -> Highlight Plus -> Add Depth To Transparent Object.
5) Static batching:
Objects marked as "static" need a MeshCollider in order to be highlighted. This is because Unity combines the meshes of static objects so it's not possible to highlight individual objects if their meshes are combined.
To allow highlighting static objects make sure they have a MeshCollider attached (the MeshCollider can be disabled).
Help & Support Forum
--------------------
Check the Documentation (PDF) for detailed instructions:
Have any question or issue?
* Support Forum: https://kronnect.com/support
* Twitter: @Kronnect
* Email (non support): contact@kronnect.com
If you like Highlight Plus, please rate it on the Asset Store. It encourages us to keep improving it! Thanks!
Universal Rendering Pipeline
----------------------------
Customers can download a specific version of Highlight Plus designed for Universal Rendering Pipeline for free from our support forum on https://kronnect.com
Please sign up on the forum and send a pm to "Kronnect" or email to contact@kronnect.com to get access to the private board.
The Unity Asset Store currently does not allow you to select which package according to the pipeline to download so we have to offer this way so you can download it.
Future updates
--------------
All our assets follow an incremental development process by which a few beta releases are published on our support forum (kronnect.com).
We encourage you to signup and engage our forum. The forum is the primary support and feature discussions medium.
Of course, all updates of Highlight Plus will be eventually available on the Asset Store.
More Cool Assets!
-----------------
Check out our other assets here:
https://assetstore.unity.com/publishers/15018
Version history
---------------
Current version
- Added "Camera Distance Fade" option
- Improved see-through accurate method which now takes into account multi-part meshes from compound parents
- [Fix] Fixed glow/outline aspect ratio in Single Pass Instanced VR mode
Version 8.5
- Improved outline effect when combining "Independent" option with many elements in "Children" selection
- Improved see-through border only effect
Version 8.4
- Added "Border Only" option to See-Through effect
- Outline/glow shape now properly cuts when partially occluded (instead of following the shape of the occluder)
- Adding a Highlight Effect component to a parent no longer deactivates highlighted children
Version 8.3
- Upgraded to Unity 2020.3.16
- [Fix] Fixed outline/glow render issue when MSAA is enabled
Version 8.2
- Added "Ignore Mask" option to glow. Can be used to render the glow effect alone
- [Fix] Fixed issue with new input system and highlight manager/trigger if no Event System is present in the scene
- [Fix] Fixed glow passes UI overlap in Unity 2021.3.3 due to reorderable array bug
Version 8.1
- Selection state is now visible in inspector (used only by trigger and manager components)
- [Fix] Fixed mobile input using the new input system
- [Fix] Fixed outline settings mismatch when using a combination of Highlight Trigger and Manager
Version 8.0
- Added SelectObject / ToggleObject / UnselectObject methods to Highlight Manager
- Added ability to control rendering order of effects (check documentation: Custom sorting section)
Version 7.9.1
- Default values for all effects are now 0 (disabled) except outline so desired effects must be enabled. This option allows you to ensure no extra/undesired effects are activated by mistake
- Redesigned Highlight Plus Profile editor interface
- Removed dependency of HighlightManager
Version 7.8
- Added outer glow blend mode option
- API: added OnObjectHighlightStart/End events to HighlightTrigger (check documentation for differences with similar events on Highlight Effect main script)
- [Fix] API: Fixed specific issues with SetTarget method when used on shader graph based materials that don't use standard texture names
Version 7.7.2
- [Fix] Fixed fade in/out issue when disabling/enabling objects
Version 7.7
- Added support for the new Input System
- [Fix] Fixes to the align to ground option of target fx effect
Version 7.6.2
- [Fix] VR: fixed target effect "Align to Ground" issue with Single Pass Instanced
Version 7.6.1
- [Fix] Fixed overlay animation speed issue
Version 7.6
- Added "Target FX Align to Ground" option
- Added isSeeThroughOccluded(camera). Is true when any see-through occluder using raycast mode is blocking the see-through effect
- All shader keywords are now of local type reducing global keyword usage
- Fixes and improvements to see-through when combined with outline/outer glow
Version 7.5.2
- [Fix] See-through is now visible when using glow/outline/inner glow with Always Visible option
Version 7.5
- Added new HitFX style: "Local Hit"
- Added new demo scene showcasing the HitFx variations
- Added "Overlay Texture" option
- Added "Min Distance" option to Highlight Manager and Highlight Trigger
- Added support for "Domain Reload" disabled option
- API: added OnObjectHighlightStart, OnObjectHighlightEnd events to HighlightManager
- [Fix] Fixed inner glow and overlay issue when MaterialPropertyBlock is used on the character material
Version 7.1
- Added "Respect UI" to Highlight Manager and Trigger which blocks interaction if pointer is over an UI element
Version 7.0.2
- Memory optimizations
Version 7.0.1
- [Fix] Highest quality outline/glow fixes on mobile
Version 7.0
- Added support for Single Pass Instanced
- Internal improvements and fixes
Version 6.9
- Internal improvements to see-through
Version 6.8
- Changed see-through effect rendering order to improve support with other stencil effects
- [Fix] Fixed properties not being reflected in scene immediately when invoking Undo
Version 6.7
- Added "SeeThrough Max Depth" option. Limits the visibility of the see-through effect to certain distance from the occluders
- Added "SeeThrough Check Individual Objects" option. If enabled, occlusion test is performed for each individual child of the object, instead of using combined bounds
Version 6.6
- Added "SeeThrough Depth Offset" option. This option allows you to control the minimum distance from the occluder to the object before showing the see-through effect
- Added "SeeThrough Non Overlap" option. Enable it only if the see-through effect produces flickering due to overlapping geometry in the hidden object
- [Fix] Fixed properties not being reflected in scene immediately when invoking Undo
Version 6.5.1
- Calling ProfileLoad() method will now assign that profile to the highlight effect component in addition to loading its values
- Prevents _Time overflow which can cause glitching on some Android devices
Version 6.5
- Name filter now is ignored when effect group is set to Only This Object
- New shader "HighlightPlus/Geometry/UIMask" to cancel highlight effects when rendering through a UI Canvas (see documentation)
Version 6.4
- Added "Cameras Layer Mask" to specify which cameras can render the effects
- Hit FX color in Highlight Profile now exposes HDR color options
Version 6.3.1
- Added "Single Selection" option to Highlight Manager/Trigger
- Added "Toggle" option to Highlight Manager/Trigger
- Selection is cleared now when clicking anywhere in the scene (requires Highlight Manager)
- API: added SetGlowColor
- Improved Highlight Manager inspector
Version 6.2
- Added TargetFX Scale To Object Bounds (defaults to false)
- Added support for HDR color to Hit FX color field
- Option to list occluders in the inspector when See Through Occluder Mask "Accurate" option is enabled
Version 6.1
- Added more accurate occluder layer system ("Accurate" option)
- Added default hit fx settings to inspector & profile
- Added hit fx modes (overlay or inner glow)
Version 6.0
- Added Selection feature
- Inspector: sections can be now collapsed to reduce screen space
- API: added OnObjectSelected / OnObjectUnSelected events
Version 5.5
- Added "Planar" mode to Normals option. Best choice for highlighting 2D meshes (quad/planes)
Version 5.4 5/Feb/2021
- Added Visibility option to targete effect
- Stencil mask is no longer computed when only overlay or inner glow is used improving performance
Version 5.3.5 22/Jan/2021
- Added "CustomVertexTransform.cginc" file which can be used to include user-defined vertex transformations
- Optimizations to material setters
Version 5.3.4
- Improvements to combine meshes option
Version 5.3.3
- Effects now reflect object transform changes when combines meshes option is enabled
Version 5.3.2
- Memory optimizations
Version 5.3.1
- Optimizations and fixes
Version 5.3
- Added "Combine Meshes" option to profile
Version 5.2
- Added "Object Name Filter" option to profile
Version 5.0
- API: added "TargetFX" method to programmatically start the target effect
- [Fix] Depth Clip option can now be used on mobile even with visibility set to Always On Top
Version 4.9
- Added "Medium" quality level
Version 4.8.1
- [Fix] Fixed outline/glow issue on iOS when using Highest Quality mode in Unity 2010.1
Version 4.8
- Added "Outer Glow Blend Passes" option
- Added support for HDR colors
Version 4.7
- Added "Normals Option" with Smooth, Preserve and Reorient variants to improve results
- Target effect now only renders once per gameobject if a specific target transform is specified
- API: added OnTargetAnimates. Allows you to override center, rotation and scale of target effect on a per-frame basis.
Version 4.6
- Added "SubMesh Mask" which allows to exclude certain submeshes
- [Fix] Fixed shader compilation issue with Single Pass Instanced mode enabled
Version 4.5
- Added "Preserve Original Mesh" option to inspector and profile
Version 4.4
- Added HitFX effect
- Improved quality of outer glow when using Highest Quality mode
- Improvements to SeeThrough Occluder when Detection Mode is set to RayCast
- API: added SetTargets(transform, renderers)
- API: added static method HighlightEffect.DrawEffectsNow() to force render all effects on demand
Version 4.2
- Added GPU Instancing support for outline / glow effects
- Highlight Trigger: added volume collision detection
Version 4.1.1
- [Fix] Fixed issue with grouped objects when independent option is enabled and Highest Quality outer glow or outline is used
Version 4.1
- Improved "Outline Independent" option for Highest Quality Mode
- Consistency: enabling "Outline Independent" in Highest Quality Mode now also affects Outer Glow is used
Version 4.0
- Start up peformance & memory allocation optimizations
- Added "Independent" support to outline in Highest Quality mode
- Added "Make Transparent Object Compatible With Depth Clip" option
Version 3.9
- Added "Depth Clip" option (only applies to HQ outline/glow effects)
Version 3.8
- Glow/Outline downsampling and glow blend mode option added to profiles
- [Fix] Fixed an issue which marked the scene as dirty
- [Fix] Removed VR API usage console warning
Version 3.7
- See Through: added "Occluder Mask" option. When set to a custom layer, it performs a BoxCast check to ensure only objects in the specific layers are occluding the target. Customize this behaviour using the Radius Threshold and Check Interval settings.
- Added "Max Distance" to Highlight Trigger
- Reduced allocations when averaging normals
- [Fix] Fixed flickering of outer glow when used in Highest quality with thin objects
Version 3.6
- Added "Outline Independent" option. Shows full outline regardless of any other highlighted object behind.
Version 3.5
- Improved quality of Outline effect when quality level is set to Highest
- Added "SeeThrough Border" feature
- Added "Blend Mode" option to Outer Glow for highest quality level
- [Fix] Fixed issue during Prefab editor mode
Version 3.4.4
- Added option in occluder script to use raycast instead of stencil buffer to cancel see-through (useful for avoiding terrain triggering see-through effect)
- [Fix] Fixed see-through in deferred rendering path
Version 3.4.2
- [Fix] Fixed an issue when adding the effect at runtime with outline/glow in higuest quality
Version 3.4.1
- [Fix] Fixed occluder objects removing glow effect when placed in the background
- [Fix] Added missing SeeThrough noise option to Highlight Profile asset
Version 3.4
- Added LayerInChildren option to "Include" filter
- Improved occluder system
- [Fix] Prevent an error when the mesh normals count does not match the vertex count
Version 3.3
- Outline, Glow and Inner Glow "Always On Top" option expanded to "Normal", "Always On Top" or "Only When Occluded"
- Added Noise slider to See-Through effect
Version 3.2.4
- [Fix] Fixed flickering issue when combining mesh & skinned mesh renderers
Version 3.2.3
- General improvements and fixes
Version 3.2.2
- [Fix] Fixed issue when trying to read normals from a non-readable mesh
Version 3.2.1
- [Fix] Fixed glow disappearing when object crosses camera near clip
Version 3.2
- Added "Reflection Probes" option
- Internal improvements and fixes
Version 3.1
- Added "Constant Width" option to Glow/Outline in Fastest/High quality level
- Added "Optimal Blit" option to Glow/Outline with Debug View
Version 3.0.2
- API: added proxy methods ProfileLoad, ProfileReload, ProfileSaveChanges to load/store profile settings at runtime. You can also load/save changes between effect and profile using the Load/Save methods on the profile object itself.
Version 3.0.1
- [Fix] Fixed an exception when glow was enabled, outline disabled in highest quality level
Version 3.0
- Added HQ Highest quality glow and outline options
- Added "Include" option to choose which objects are affected by the effects (same gameobject, children, root to children, or many objects in layer)
- Added "Alpha CutOff"
Version 2.6.1
- Minor internal improvements
Version 2.6
- Added Target effect
- Improved performance on Skinned Mesh Renderers. Slightly improved performance on normal renderers.
Version 2.5.2
- [Fix] Fixed issue with HQ Outer Glow not showing when there's multiple selected objects parented to the same object
Version 2.5.1
- Added support for orthographic camera
Version 2.5
- Added support for VR Single Pass Instanced
- Minor improvements and fixes
Version 2.4
- New HighlightSeeThroughOccluder script. Add it to any object to cancel any see-through effect
- Added "Fade In Duration" / "Fade Out Duration" to create smooth transition states
- Added "Glow HQ" to produce better outer glow on certain shapes
- Added "OnRendererHighlightStart" event
- API: added "OverlayOnShot" method for impact effects
Version 2.3
- Added "Raycast Source" to Highlight Trigger and Manager components
- Added "Skinned Mesh Bake Mode" to optimize highlight on many models
Version 2.2
- Added "Always On Top" option to Outline, Outer and Inner Glow
- Added "Trigger Mode" to Highlight Trigger to support complex objects
Version 2.1
- Added "Outline HQ" to inspector. Creates a better outline on certain shapes
- Added "Ignore Object Visibility" to enable effects on disabled renderers or hidden objects
Version 2.0
- Profiles. Store/load/share settings across different objects.
- [Fix] Fixed issue when copying component values between two objects
- [Fix] Fixed effects ignoring culling mask on additional cameras
Version 1.5
- Added "Inner Glow" effect
Version 1.4
- Added "Overlay Min Intensity" and "Overlay Blending" options
- Added "Ignore" option
- Minor improvements & fixes
Version 1.3
- Added option to add depth compatibility for transparent shaders
Version 1.2.4
- [Fix] Fix for multiple skinned models
- [Fix] Fix for scaled skinned models
Version 1.2.3
- [Fix] Fixes for Steam VR
Version 1.2.1
- Internal improvements and fixes
Version 1.2.1
- [Fix] Fixed script execution order issue with scripts changing transform in LateUpdate()
Version 1.2
- Support for LOD groups
Version 1.1
- Redesigned editor inspector
- Minor improvements
Version 1.0.4
- Supports meshes with negative scales
Version 1.0.3
- Support for multiple submeshes
Version 1.0.2
- [Fix] Fixed scale issue with grouped objects
Version 1.0.1
- Supports combined meshes
Version 1.0 - Nov/2018
- Initial release

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 53265a9967ed548efaf71f5807638781
timeCreated: 1542901568
licenseType: Pro
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3a476022645d74299b862c36d0daa1df
folderAsset: yes
timeCreated: 1542876301
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6bd97436761b94109a0785ed6823647c
folderAsset: yes
timeCreated: 1542893576
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
#ifndef CUSTOM_VERTEX_TRANSFORM_INCLUDED
#define CUSTOM_VERTEX_TRANSFORM_INCLUDED
float4 ComputeVertexPosition(float4 vertex) {
// Add here any custom vertex transform
float4 pos = UnityObjectToClipPos(vertex);
return pos;
}
#endif

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e25b1281ec6724b028e33a5df5a3f266
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,49 @@
Shader "HighlightPlus/Geometry/JustDepth"
{
Properties
{
}
SubShader
{
Tags { "RenderType"="Opaque" }
ColorMask 0
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "CustomVertexTransform.cginc"
struct appdata
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = ComputeVertexPosition(v.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return 0;
}
ENDCG
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 058a572e30b2d446bade2dda32bcef0f
timeCreated: 1515682635
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
Shader "HighlightPlus/Geometry/DepthClipComp"
{
Properties
{
}
SubShader
{
Pass {
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_shadowcaster
#pragma multi_compile_instancing
#include "UnityCG.cginc"
struct v2f {
V2F_SHADOW_CASTER;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert( appdata_base v ) {
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
TRANSFER_SHADOW_CASTER_NORMALOFFSET(o)
return o;
}
float4 frag( v2f i ) : SV_Target {
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0917f634da79a4983ad78bac83d5a715
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,158 @@
Shader "HighlightPlus/Geometry/BlurGlow" {
Properties {
_MainTex ("Texture", Any) = "white" {}
_Color ("Color", Color) = (1,1,0) // not used; dummy property to avoid inspector warning "material has no _Color property"
_BlurScale("Blur Scale", Float) = 2.0
_Speed("Speed", Float) = 1
}
SubShader
{
ZTest Always
ZWrite Off
Cull Off
CGINCLUDE
#include "UnityCG.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex);
float4 _MainTex_TexelSize;
float4 _MainTex_ST;
float _BlurScale, _Speed;
struct appdata {
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2fCross {
float4 pos : SV_POSITION;
float2 uv: TEXCOORD0;
float2 uv1: TEXCOORD1;
float2 uv2: TEXCOORD2;
float2 uv3: TEXCOORD3;
float2 uv4: TEXCOORD4;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2fCross vertCross(appdata v) {
v2fCross o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0) {
// Texture is inverted WRT the main texture
v.texcoord.y = 1.0 - v.texcoord.y;
}
#endif
o.uv = v.texcoord;
float3 offsets = _MainTex_TexelSize.xyx * float3(1,1,-1);
o.uv1 = v.texcoord - offsets.xy;
o.uv2 = v.texcoord - offsets.zy;
o.uv3 = v.texcoord + offsets.zy;
o.uv4 = v.texcoord + offsets.xy;
return o;
}
v2fCross vertBlurH(appdata v) {
v2fCross o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0) {
// Texture is inverted WRT the main texture
v.texcoord.y = 1.0 - v.texcoord.y;
}
#endif
float animatedWidth = _BlurScale * (1.0 + 0.25 * sin(_Time.w * _Speed));
o.uv = v.texcoord;
float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * animatedWidth, 0);
o.uv1 = v.texcoord - inc;
o.uv2 = v.texcoord + inc;
float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * animatedWidth, 0);
o.uv3 = v.texcoord - inc2;
o.uv4 = v.texcoord + inc2;
return o;
}
v2fCross vertBlurV(appdata v) {
v2fCross o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0) {
// Texture is inverted WRT the main texture
v.texcoord.y = 1.0 - v.texcoord.y;
}
#endif
float animatedWidth = _BlurScale * (1.0 + 0.25 * sin(_Time.w * _Speed));
o.uv = v.texcoord;
float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * animatedWidth);
o.uv1 = v.texcoord - inc;
o.uv2 = v.texcoord + inc;
float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * animatedWidth);
o.uv3 = v.texcoord - inc2;
o.uv4 = v.texcoord + inc2;
return o;
}
float4 fragBlur (v2fCross i): SV_Target {
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv) * 0.2270270270
+ (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2)) * 0.3162162162
+ (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4)) * 0.0702702703;
return pixel;
}
float4 fragResample(v2fCross i) : SV_Target {
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1);
float4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2);
float4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3);
float4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4);
return (c1+c2+c3+c4) * 0.25;
}
ENDCG
Pass {
CGPROGRAM
#pragma vertex vertBlurH
#pragma fragment fragBlur
#pragma fragmentoption ARB_precision_hint_fastest
#pragma target 3.0
ENDCG
}
Pass {
CGPROGRAM
#pragma vertex vertBlurV
#pragma fragment fragBlur
#pragma fragmentoption ARB_precision_hint_fastest
#pragma target 3.0
ENDCG
}
Pass {
CGPROGRAM
#pragma vertex vertCross
#pragma fragment fragResample
#pragma fragmentoption ARB_precision_hint_fastest
#pragma target 3.0
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 84c84ee93ec484bdda371ffbdebfcc7c
timeCreated: 1556874239
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,156 @@
Shader "HighlightPlus/Geometry/BlurOutline" {
Properties {
_MainTex ("Texture", Any) = "white" {}
_Color ("Color", Color) = (1,1,0) // not used; dummy property to avoid inspector warning "material has no _Color property"
_BlurScale("Blur Scale", Float) = 2.0
}
SubShader
{
Tags { "Queue"="Transparent+100" "RenderType"="Transparent" }
ZTest Always
ZWrite Off
Cull Off
CGINCLUDE
#include "UnityCG.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex);
float4 _MainTex_TexelSize;
float4 _MainTex_ST;
float _BlurScale;
struct appdata {
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2fCross {
float4 pos : SV_POSITION;
float2 uv: TEXCOORD0;
float2 uv1: TEXCOORD1;
float2 uv2: TEXCOORD2;
float2 uv3: TEXCOORD3;
float2 uv4: TEXCOORD4;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2fCross vertCross(appdata v) {
v2fCross o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0) {
// Texture is inverted WRT the main texture
v.texcoord.y = 1.0 - v.texcoord.y;
}
#endif
o.uv = v.texcoord;
float3 offsets = _MainTex_TexelSize.xyx * float3(1,1,-1);
o.uv1 = v.texcoord - offsets.xy;
o.uv2 = v.texcoord - offsets.zy;
o.uv3 = v.texcoord + offsets.zy;
o.uv4 = v.texcoord + offsets.xy;
return o;
}
v2fCross vertBlurH(appdata v) {
v2fCross o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0) {
// Texture is inverted WRT the main texture
v.texcoord.y = 1.0 - v.texcoord.y;
}
#endif
o.uv = v.texcoord;
float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * _BlurScale, 0);
o.uv1 = v.texcoord - inc;
o.uv2 = v.texcoord + inc;
float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * _BlurScale, 0);
o.uv3 = v.texcoord - inc2;
o.uv4 = v.texcoord + inc2;
return o;
}
v2fCross vertBlurV(appdata v) {
v2fCross o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0) {
// Texture is inverted WRT the main texture
v.texcoord.y = 1.0 - v.texcoord.y;
}
#endif
o.uv = v.texcoord;
float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * _BlurScale);
o.uv1 = v.texcoord - inc;
o.uv2 = v.texcoord + inc;
float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * _BlurScale);
o.uv3 = v.texcoord - inc2;
o.uv4 = v.texcoord + inc2;
return o;
}
float4 fragBlur (v2fCross i): SV_Target {
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv) * 0.2270270270
+ (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2)) * 0.3162162162
+ (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4)) * 0.0702702703;
return pixel;
}
float4 fragResample(v2fCross i) : SV_Target {
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1);
float4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2);
float4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3);
float4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4);
return (c1+c2+c3+c4) * 0.25;
}
ENDCG
Pass {
CGPROGRAM
#pragma vertex vertBlurH
#pragma fragment fragBlur
#pragma fragmentoption ARB_precision_hint_fastest
#pragma target 3.0
ENDCG
}
Pass {
CGPROGRAM
#pragma vertex vertBlurV
#pragma fragment fragBlur
#pragma fragmentoption ARB_precision_hint_fastest
#pragma target 3.0
ENDCG
}
Pass {
CGPROGRAM
#pragma vertex vertCross
#pragma fragment fragResample
#pragma fragmentoption ARB_precision_hint_fastest
#pragma target 3.0
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 74f3491dcf1224f0c91238381c035439
timeCreated: 1556874239
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,95 @@
Shader "HighlightPlus/ClearStencil"
{
Properties
{
}
SubShader
{
Stencil {
Ref 2
Comp Always
Pass zero
}
ZTest Always
ZWrite Off
Cull Off
ColorMask 0
Pass // Ordered full screen
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = float4(v.vertex.xy, 0, 0.5);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return 0;
}
ENDCG
}
Pass // Ordered object-space
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "CustomVertexTransform.cginc"
struct appdata
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = ComputeVertexPosition(v.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return 0;
}
ENDCG
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 632d26701d1f14d9ab2950021e6fed87
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,147 @@
Shader "HighlightPlus/Geometry/ComposeGlow" {
Properties {
_MainTex ("Texture", Any) = "black" {}
_Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property"
[HideInInspector] _Cull ("Cull Mode", Int) = 2
[HideInInspector] _ZTest ("ZTest Mode", Int) = 0
[HideInInspector] _Flip("Flip", Vector) = (0, 1, 0)
[HideInInspector] _BlendSrc("Blend Src", Int) = 1
[HideInInspector] _BlendDst("Blend Dst", Int) = 1
_Debug("Debug Color", Color) = (0,0,0,0)
[HideInInspector] _GlowStencilComp ("Stencil Comp", Int) = 6
}
SubShader
{
Tags { "Queue"="Transparent+102" "RenderType"="Transparent" }
Blend [_BlendSrc] [_BlendDst]
// Compose effect on camera target
Pass
{
ZWrite Off
ZTest [_ZTest]
Cull Off //[_Cull]
Stencil {
Ref 2
Comp [_GlowStencilComp]
Pass keep
ReadMask 2
WriteMask 2
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeGlowFinal);
fixed4 _Color;
float3 _Flip;
fixed4 _Debug;
struct appdata
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos: SV_POSITION;
float4 scrPos: TEXCOORD0;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
o.scrPos = ComputeScreenPos(o.pos);
o.scrPos.y = o.scrPos.w * _Flip.x + o.scrPos.y * _Flip.y;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fixed4 glow = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPComposeGlowFinal, i.scrPos.xy/i.scrPos.w);
fixed4 color = _Color;
color *= glow.r;
color += _Debug;
color.a = saturate(color.a);
return color;
}
ENDCG
}
// Compose effect on camera target (full-screen blit)
Pass
{
ZWrite Off
ZTest Always //[_ZTest]
Cull Off //[_Cull]
Stencil {
Ref 2
Comp NotEqual
Pass keep
ReadMask 2
WriteMask 2
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex);
float4 _MainTex_ST;
fixed4 _Color;
float3 _Flip;
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos: SV_POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = UnityStereoScreenSpaceUVAdjust(v.uv, _MainTex_ST);
o.uv.y = _Flip.x + o.uv.y * _Flip.y;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fixed4 glow = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv);
fixed4 color = _Color;
color *= glow.r;
color.a = saturate(color.a);
return color;
}
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 975a91ee935da4d9c8a3e807fecd8047
timeCreated: 1544699251
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,144 @@
Shader "HighlightPlus/Geometry/ComposeOutline" {
Properties {
_MainTex ("Texture", Any) = "black" {}
_Color("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property"
_Cull("Cull Mode", Int) = 2
_ZTest("ZTest Mode", Int) = 0
_Flip("Flip", Vector) = (0, 1, 0)
_Debug("Debug Color", Color) = (0,0,0,0)
}
SubShader
{
Tags { "Queue" = "Transparent+120" "RenderType" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
// Compose effect on camera target (optimal quad blit)
Pass
{
ZWrite Off
ZTest [_ZTest]
Cull Off // [_Cull]
Stencil {
Ref 2
Comp NotEqual
Pass keep
ReadMask 2
WriteMask 2
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal);
fixed4 _Color;
float3 _Flip;
fixed4 _Debug;
struct appdata
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos: SV_POSITION;
float4 scrPos: TEXCOORD0;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
o.scrPos = ComputeScreenPos(o.pos);
o.scrPos.y = o.scrPos.w * _Flip.x + o.scrPos.y * _Flip.y;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fixed4 outline = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal, i.scrPos.xy/i.scrPos.w);
fixed4 color = _Color;
color.a *= outline.r;
color += _Debug;
color.a = saturate(color.a);
return color;
}
ENDCG
}
// Compose effect on camera target (full-screen blit)
Pass
{
ZWrite Off
ZTest Always // [_ZTest]
Cull Off // [_Cull]
Stencil {
Ref 2
Comp NotEqual
Pass keep
ReadMask 2
WriteMask 2
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex);
float4 _MainTex_ST;
fixed4 _Color;
float3 _Flip;
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos: SV_POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = UnityStereoScreenSpaceUVAdjust(v.uv, _MainTex_ST);
o.uv.y = _Flip.x + o.uv.y * _Flip.y;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fixed4 outline = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv);
fixed4 color = _Color;
color.a *= outline.r;
color = saturate(color);
return color;
}
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0a6de74b6cfa9440182f8f56e4a0e4f1
timeCreated: 1544699251
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HighlightGlow
m_Shader: {fileID: 4800000, guid: 049d9e75e07674a78a703cf1203c07dd, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _ConstantWidth: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _GlowZTest: 4
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Glow: {r: 1, g: 0.025, b: 0.75, a: 0.5}
- _Glow2: {r: 0.01, g: 1, b: 0.5, a: 0}
- _GlowColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowDirection: {r: 1, g: 1, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 60e964940a24547a585c3ffff7e52e9b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,114 @@
Shader "HighlightPlus/Geometry/Glow" {
Properties {
_MainTex ("Texture", Any) = "white" {}
_Glow ("Glow", Vector) = (1, 0.025, 0.75, 0.5)
_Glow2 ("Glow2", Vector) = (0.01, 1, 0.5, 0)
_GlowColor ("Glow Color", Color) = (1,1,1)
_Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property"
_GlowDirection("GlowDir", Vector) = (1,1,0)
_Cull ("Cull Mode", Int) = 2
_ConstantWidth ("Constant Width", Float) = 1
_GlowZTest ("ZTest", Int) = 4
_GlowStencilOp ("Stencil Operation", Int) = 0
_GlowStencilComp ("Stencil Comp", Int) = 6
}
SubShader
{
Tags { "Queue"="Transparent+102" "RenderType"="Transparent" "DisableBatching"="True" }
// Glow passes
Pass
{
Stencil {
Ref 2
Comp [_GlowStencilComp]
Pass [_GlowStencilOp]
ReadMask 2
WriteMask 2
}
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
Cull [_Cull]
ZTest [_GlowZTest]
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#include "UnityCG.cginc"
#include "CustomVertexTransform.cginc"
struct appdata
{
float4 vertex : POSITION;
float3 normal : NORMAL;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
fixed4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
//float4 _Glow; // x = intensity, y = width, z = magic number 1, w = magic number 2
float3 _Glow2; // x = outline width, y = glow speed, z = dither on/off
float _ConstantWidth;
UNITY_INSTANCING_BUFFER_START(Props)
UNITY_DEFINE_INSTANCED_PROP(float4, _GlowColor)
UNITY_DEFINE_INSTANCED_PROP(float4, _Glow)
UNITY_DEFINE_INSTANCED_PROP(float4, _GlowDirection)
UNITY_INSTANCING_BUFFER_END(Props)
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
float4 glowDirection = UNITY_ACCESS_INSTANCED_PROP(Props, _GlowDirection);
#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(SINGLE_PASS_STEREO)
glowDirection.x *= 2.0;
#endif
v.vertex.xyz += v.normal * glowDirection.z;
float4 pos = ComputeVertexPosition(v.vertex);
float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal);
float2 offset = TransformViewToProjection(normalize(norm.xy));
offset += glowDirection.xy;
float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(pos.z), 2.0, UNITY_MATRIX_P[3][3]);
z = _ConstantWidth * (z - 2.0) + 2.0;
float outlineWidth = _Glow2.x;
float4 glow = UNITY_ACCESS_INSTANCED_PROP(Props, _Glow);
float animatedWidth = glow.y * (1.0 + 0.25 * sin(_Time.w * _Glow2.y));
offset *= z * (outlineWidth + animatedWidth);
pos.xy += offset;
o.pos = pos;
o.color = UNITY_ACCESS_INSTANCED_PROP(Props, _GlowColor);
o.color.a = glow.x;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
fixed4 color = i.color;
float4 glow = UNITY_ACCESS_INSTANCED_PROP(Props, _Glow);
float2 screenPos = floor( i.pos.xy * glow.z ) * glow.w;
color.a *= saturate(_Glow2.z + frac(screenPos.x + screenPos.y));
return color;
}
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 049d9e75e07674a78a703cf1203c07dd
timeCreated: 1544699250
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,95 @@
Shader "HighlightPlus/Geometry/InnerGlow" {
Properties {
_MainTex ("Texture", Any) = "white" {}
_Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property"
_InnerGlowColor ("Inner Glow Color", Color) = (1,1,1,1)
_InnerGlowWidth ("Width", Float) = 1.0
_CutOff("CutOff", Float ) = 0.5
_Cull ("Cull Mode", Int) = 2
_InnerGlowZTest ("ZTest", Int) = 4
}
SubShader
{
Tags { "Queue"="Transparent+122" "RenderType"="Transparent" "DisableBatching"="True" }
// Inner Glow
Pass
{
Stencil {
Ref 4
ReadMask 4
Comp NotEqual
Pass keep
}
Blend SrcAlpha One
ZWrite Off
ZTest [_InnerGlowZTest]
Cull [_Cull]
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_local _ HP_ALPHACLIP
#include "UnityCG.cginc"
#include "CustomVertexTransform.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
float3 normal : NORMAL;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
float3 wpos : TEXCOORD1;
float3 normal : NORMAL;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
float4 _MainTex_ST;
fixed _CutOff;
fixed4 _InnerGlowColor;
fixed _InnerGlowWidth;
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = ComputeVertexPosition(v.vertex);
#if UNITY_REVERSED_Z
o.pos.z += 0.0001;
#else
o.pos.z -= 0.0001;
#endif
o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz;
o.normal = UnityObjectToWorldNormal(v.normal);
o.uv = TRANSFORM_TEX (v.uv, _MainTex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
#if HP_ALPHACLIP
fixed4 color = tex2D(_MainTex, i.uv);
clip(color.a - _CutOff);
#endif
float3 viewDir = normalize(i.wpos - _WorldSpaceCameraPos.xyz);
fixed dx = saturate(_InnerGlowWidth - abs(dot(viewDir, normalize(i.normal)))) / _InnerGlowWidth;
fixed4 col = _InnerGlowColor * dx;
return col;
}
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e5a069457bd344391acd5af227c0ce11
timeCreated: 1544699250
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,138 @@
Shader "HighlightPlus/Geometry/Mask" {
Properties {
_MainTex ("Texture", Any) = "white" {}
_Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property"
_CutOff("CutOff", Float ) = 0.5
_Cull ("Cull Mode", Int) = 2
_ZTest ("ZTest", Int) = 4
}
SubShader
{
Tags { "Queue"="Transparent+100" "RenderType"="Transparent" "DisableBatching"="True" }
CGINCLUDE
#include "UnityCG.cginc"
#include "CustomVertexTransform.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _MainTex_TexelSize;
fixed _CutOff;
UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos: SV_POSITION;
float2 uv : TEXCOORD0;
#if HP_DEPTHCLIP
float4 scrPos : TEXCOORD1;
float depth : TEXCOORD2;
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = ComputeVertexPosition(v.vertex);
o.uv = TRANSFORM_TEX (v.uv, _MainTex);
#if HP_DEPTHCLIP
o.scrPos = ComputeScreenPos(o.pos);
COMPUTE_EYEDEPTH(o.depth);
#endif
#if UNITY_REVERSED_Z
o.pos.z += 0.0001;
#else
o.pos.z -= 0.0001;
#endif
return o;
}
float GetEyeDepth(float rawDepth) {
float persp = LinearEyeDepth(rawDepth);
float ortho = (_ProjectionParams.z-_ProjectionParams.y)*(1-rawDepth)+_ProjectionParams.y;
return lerp(persp,ortho,unity_OrthoParams.w);
}
fixed4 frag (v2f i) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
#if HP_ALPHACLIP
fixed4 col = tex2D(_MainTex, i.uv);
clip(col.a - _CutOff);
#endif
#if HP_DEPTHCLIP
float sceneZ = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(i.scrPos.xy / i.scrPos.w));
float sceneDepth = GetEyeDepth(sceneZ);
clip(sceneDepth - i.depth * 0.999);
#endif
return 0;
}
ENDCG
// Create mask
Pass
{
Name "Mask"
Stencil {
Ref 2
Comp always
Pass replace
WriteMask 2
ReadMask 2
}
ColorMask 0
ZWrite Off
Cull [_Cull] // default Cull Back improves glow in high quality)
ZTest [_ZTest]
CGPROGRAM
#pragma multi_compile_local _ HP_ALPHACLIP
#pragma multi_compile_local _ HP_DEPTHCLIP
#pragma vertex vert
#pragma fragment frag
ENDCG
}
// Create mask for see-through (the only difference is the ZTest)
Pass
{
Name "See-through Mask"
Stencil {
Ref 2
Comp always
Pass replace
WriteMask 2
ReadMask 2
}
ColorMask 0
ZWrite Off
Cull [_Cull] // default Cull Back improves glow in high quality)
ZTest LEqual
CGPROGRAM
#pragma multi_compile_local _ HP_ALPHACLIP
#pragma multi_compile_local _ HP_DEPTHCLIP
#pragma vertex vert
#pragma fragment frag
ENDCG
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e694fa934b6db4a00b8d4b9887115332
timeCreated: 1544699251
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,62 @@
Shader "HighlightPlus/Geometry/SeeThroughOccluder" {
Properties {
_MainTex ("Texture", Any) = "white" {}
_Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property"
}
SubShader
{
Tags { "Queue"="Transparent+100" "RenderType"="Transparent" "DisableBatching"="True" }
// Create mask
Pass
{
Stencil {
Ref 2
Comp always
Pass DecrWrap
}
ColorMask 0
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.pos = UnityObjectToClipPos(v.vertex);
#if UNITY_REVERSED_Z
o.pos.z += 0.0001;
#else
o.pos.z -= 0.0001;
#endif
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return 0;
}
ENDCG
}
}
}

Some files were not shown because too many files have changed in this diff Show More