diff --git a/Assets/AssetRaw/Resources/So/Shelf/shelfConfig_1.asset b/Assets/AssetRaw/Resources/So/Shelf/shelfConfig_1.asset index af08c4a..90083ec 100644 --- a/Assets/AssetRaw/Resources/So/Shelf/shelfConfig_1.asset +++ b/Assets/AssetRaw/Resources/So/Shelf/shelfConfig_1.asset @@ -21,7 +21,7 @@ MonoBehaviour: - {fileID: 7400000, guid: e9fa085935da61b4ba9a30d5b095cb45, type: 2} - {fileID: 7400000, guid: c7c24aeb0ca291d4583b5e28baf58f80, type: 2} - {fileID: 7400000, guid: b5ae0aa7adc17f54988962e81404e636, type: 2} - - {fileID: 7400000, guid: d933409f8eec3814bad938a7aad0ab37, type: 2} + - {fileID: 7400000, guid: 3661f80aa7a090c4f9b88bc9390468d6, type: 2} SerializedBytesString: Prefab: {fileID: 0} PrefabModificationsReferencedUnityObjects: [] diff --git a/Assets/AssetRaw/model/model/materials/AGV轨道2.mat b/Assets/AssetRaw/model/model/materials/AGV轨道2.mat index 51ec532..1b02022 100644 --- a/Assets/AssetRaw/model/model/materials/AGV轨道2.mat +++ b/Assets/AssetRaw/model/model/materials/AGV轨道2.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/Pallet.mat b/Assets/AssetRaw/model/model/materials/Pallet.mat index de9b6c7..6323966 100644 --- a/Assets/AssetRaw/model/model/materials/Pallet.mat +++ b/Assets/AssetRaw/model/model/materials/Pallet.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/YIFI-buxiugang.mat b/Assets/AssetRaw/model/model/materials/YIFI-buxiugang.mat index 8488f2a..abb905e 100644 --- a/Assets/AssetRaw/model/model/materials/YIFI-buxiugang.mat +++ b/Assets/AssetRaw/model/model/materials/YIFI-buxiugang.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/agv轨道1.mat b/Assets/AssetRaw/model/model/materials/agv轨道1.mat index dad5c21..fdb59be 100644 --- a/Assets/AssetRaw/model/model/materials/agv轨道1.mat +++ b/Assets/AssetRaw/model/model/materials/agv轨道1.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/black_metallic.mat b/Assets/AssetRaw/model/model/materials/black_metallic.mat index f607ed1..dd45569 100644 --- a/Assets/AssetRaw/model/model/materials/black_metallic.mat +++ b/Assets/AssetRaw/model/model/materials/black_metallic.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.1703628, g: 0.1703628, b: 0.1703628, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/black_tube.mat b/Assets/AssetRaw/model/model/materials/black_tube.mat index 15d9577..712f303 100644 --- a/Assets/AssetRaw/model/model/materials/black_tube.mat +++ b/Assets/AssetRaw/model/model/materials/black_tube.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.07281975, g: 0.07281975, b: 0.07281975, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/dark_green_matte.001.mat b/Assets/AssetRaw/model/model/materials/dark_green_matte.001.mat index 3a7ff09..59017ac 100644 --- a/Assets/AssetRaw/model/model/materials/dark_green_matte.001.mat +++ b/Assets/AssetRaw/model/model/materials/dark_green_matte.001.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0, g: 0.290352, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/dark_green_matte.mat b/Assets/AssetRaw/model/model/materials/dark_green_matte.mat index 8029148..b726ab3 100644 --- a/Assets/AssetRaw/model/model/materials/dark_green_matte.mat +++ b/Assets/AssetRaw/model/model/materials/dark_green_matte.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0, g: 0.290352, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/defaultMat.mat b/Assets/AssetRaw/model/model/materials/defaultMat.mat index ce081ec..0e4fb99 100644 --- a/Assets/AssetRaw/model/model/materials/defaultMat.mat +++ b/Assets/AssetRaw/model/model/materials/defaultMat.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.9576408, g: 0.9576408, b: 0.9576408, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/green.mat b/Assets/AssetRaw/model/model/materials/green.mat index ad243e6..37ba1e1 100644 --- a/Assets/AssetRaw/model/model/materials/green.mat +++ b/Assets/AssetRaw/model/model/materials/green.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.17386547, g: 0.6088438, b: 0.15875623, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/grey.mat b/Assets/AssetRaw/model/model/materials/grey.mat index d9b9456..a5d8c94 100644 --- a/Assets/AssetRaw/model/model/materials/grey.mat +++ b/Assets/AssetRaw/model/model/materials/grey.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.6173389, g: 0.6173389, b: 0.6173389, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/medium_grey.mat b/Assets/AssetRaw/model/model/materials/medium_grey.mat index c35010f..a62ed77 100644 --- a/Assets/AssetRaw/model/model/materials/medium_grey.mat +++ b/Assets/AssetRaw/model/model/materials/medium_grey.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.78203547, g: 0.78203547, b: 0.78203547, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/orange_metallic.mat b/Assets/AssetRaw/model/model/materials/orange_metallic.mat index 9e5e44f..4bc8d7b 100644 --- a/Assets/AssetRaw/model/model/materials/orange_metallic.mat +++ b/Assets/AssetRaw/model/model/materials/orange_metallic.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.8048414, g: 0.5038671, b: 0.01773916, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/red.mat b/Assets/AssetRaw/model/model/materials/red.mat index b419e8a..b87e8ce 100644 --- a/Assets/AssetRaw/model/model/materials/red.mat +++ b/Assets/AssetRaw/model/model/materials/red.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.79573995, g: 0.124208994, b: 0.124208994, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/yellow.mat b/Assets/AssetRaw/model/model/materials/yellow.mat index b675c90..dcf78e1 100644 --- a/Assets/AssetRaw/model/model/materials/yellow.mat +++ b/Assets/AssetRaw/model/model/materials/yellow.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 0.8918479, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/一层地图.mat b/Assets/AssetRaw/model/model/materials/一层地图.mat index 5af4993..1eb9d79 100644 --- a/Assets/AssetRaw/model/model/materials/一层地图.mat +++ b/Assets/AssetRaw/model/model/materials/一层地图.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.5377358, g: 0.5199804, b: 0.5199804, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/三层地图.mat b/Assets/AssetRaw/model/model/materials/三层地图.mat index ff87ec2..cd37497 100644 --- a/Assets/AssetRaw/model/model/materials/三层地图.mat +++ b/Assets/AssetRaw/model/model/materials/三层地图.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/二层地图.mat b/Assets/AssetRaw/model/model/materials/二层地图.mat index 1196373..358977c 100644 --- a/Assets/AssetRaw/model/model/materials/二层地图.mat +++ b/Assets/AssetRaw/model/model/materials/二层地图.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/人造塑料杆.mat b/Assets/AssetRaw/model/model/materials/人造塑料杆.mat index 35f4ebe..09b96d8 100644 --- a/Assets/AssetRaw/model/model/materials/人造塑料杆.mat +++ b/Assets/AssetRaw/model/model/materials/人造塑料杆.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.37673548, g: 0.6847945, b: 0.9622642, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/哑光塑料.001.mat b/Assets/AssetRaw/model/model/materials/哑光塑料.001.mat index 6357682..f8fd8ca 100644 --- a/Assets/AssetRaw/model/model/materials/哑光塑料.001.mat +++ b/Assets/AssetRaw/model/model/materials/哑光塑料.001.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.341877, g: 0.026612, b: 0.026612, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/哑光塑料.mat b/Assets/AssetRaw/model/model/materials/哑光塑料.mat index 0473c4d..d581cd1 100644 --- a/Assets/AssetRaw/model/model/materials/哑光塑料.mat +++ b/Assets/AssetRaw/model/model/materials/哑光塑料.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/堆垛机.mat b/Assets/AssetRaw/model/model/materials/堆垛机.mat index a8b090f..de30c97 100644 --- a/Assets/AssetRaw/model/model/materials/堆垛机.mat +++ b/Assets/AssetRaw/model/model/materials/堆垛机.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/安全黄线.mat b/Assets/AssetRaw/model/model/materials/安全黄线.mat index 633192e..16032ce 100644 --- a/Assets/AssetRaw/model/model/materials/安全黄线.mat +++ b/Assets/AssetRaw/model/model/materials/安全黄线.mat @@ -15,7 +15,7 @@ Material: - _PARALLAXMAP m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -82,3 +82,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/屏幕.mat b/Assets/AssetRaw/model/model/materials/屏幕.mat index b60fb6f..f7685d5 100644 --- a/Assets/AssetRaw/model/model/materials/屏幕.mat +++ b/Assets/AssetRaw/model/model/materials/屏幕.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.077008, g: 0.077008, b: 0.077008, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/拉丝不锈钢 1.mat b/Assets/AssetRaw/model/model/materials/拉丝不锈钢 1.mat index 93cc2a0..8b1485e 100644 --- a/Assets/AssetRaw/model/model/materials/拉丝不锈钢 1.mat +++ b/Assets/AssetRaw/model/model/materials/拉丝不锈钢 1.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.79773766, g: 0.7821242, b: 0.7699052, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/拉丝不锈钢 2.mat b/Assets/AssetRaw/model/model/materials/拉丝不锈钢 2.mat index b8b1e40..d862c5a 100644 --- a/Assets/AssetRaw/model/model/materials/拉丝不锈钢 2.mat +++ b/Assets/AssetRaw/model/model/materials/拉丝不锈钢 2.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.79773766, g: 0.7821242, b: 0.7699052, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/拉丝不锈钢.mat b/Assets/AssetRaw/model/model/materials/拉丝不锈钢.mat index ac2adba..58bbf1d 100644 --- a/Assets/AssetRaw/model/model/materials/拉丝不锈钢.mat +++ b/Assets/AssetRaw/model/model/materials/拉丝不锈钢.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.6, g: 0.573971, b: 0.554069, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/材质.009.mat b/Assets/AssetRaw/model/model/materials/材质.009.mat index e1140be..b818f82 100644 --- a/Assets/AssetRaw/model/model/materials/材质.009.mat +++ b/Assets/AssetRaw/model/model/materials/材质.009.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.8787614, g: 0.6386944, b: 0.34939724, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/白色塑料.mat b/Assets/AssetRaw/model/model/materials/白色塑料.mat index df8611d..66f339e 100644 --- a/Assets/AssetRaw/model/model/materials/白色塑料.mat +++ b/Assets/AssetRaw/model/model/materials/白色塑料.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/红玻璃.mat b/Assets/AssetRaw/model/model/materials/红玻璃.mat index ddb6134..8fc9175 100644 --- a/Assets/AssetRaw/model/model/materials/红玻璃.mat +++ b/Assets/AssetRaw/model/model/materials/红玻璃.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/纸箱白.mat b/Assets/AssetRaw/model/model/materials/纸箱白.mat index 931f1cb..07036e6 100644 --- a/Assets/AssetRaw/model/model/materials/纸箱白.mat +++ b/Assets/AssetRaw/model/model/materials/纸箱白.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.878914, g: 0.878914, b: 0.878914, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/蓝色托盘 1.mat b/Assets/AssetRaw/model/model/materials/蓝色托盘 1.mat index 4dcd171..e439f0a 100644 --- a/Assets/AssetRaw/model/model/materials/蓝色托盘 1.mat +++ b/Assets/AssetRaw/model/model/materials/蓝色托盘 1.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.38227215, g: 0.38227215, b: 0.38227215, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/蓝色托盘.mat b/Assets/AssetRaw/model/model/materials/蓝色托盘.mat index 1d8ad3b..dea2f6a 100644 --- a/Assets/AssetRaw/model/model/materials/蓝色托盘.mat +++ b/Assets/AssetRaw/model/model/materials/蓝色托盘.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.120781, g: 0.120781, b: 0.120781, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/蓝边发光.mat b/Assets/AssetRaw/model/model/materials/蓝边发光.mat index 153723b..f5103f1 100644 --- a/Assets/AssetRaw/model/model/materials/蓝边发光.mat +++ b/Assets/AssetRaw/model/model/materials/蓝边发光.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/轨道.mat b/Assets/AssetRaw/model/model/materials/轨道.mat index c3f1e8e..570002c 100644 --- a/Assets/AssetRaw/model/model/materials/轨道.mat +++ b/Assets/AssetRaw/model/model/materials/轨道.mat @@ -15,7 +15,7 @@ Material: - _ALPHABLEND_ON m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: 3000 stringTagMap: @@ -83,3 +83,4 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 0} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/钢 1.mat b/Assets/AssetRaw/model/model/materials/钢 1.mat index 55f9519..5d6f43d 100644 --- a/Assets/AssetRaw/model/model/materials/钢 1.mat +++ b/Assets/AssetRaw/model/model/materials/钢 1.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/钢.mat b/Assets/AssetRaw/model/model/materials/钢.mat index 1c49510..0f7a819 100644 --- a/Assets/AssetRaw/model/model/materials/钢.mat +++ b/Assets/AssetRaw/model/model/materials/钢.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/黑色塑料.001.mat b/Assets/AssetRaw/model/model/materials/黑色塑料.001.mat index 4b4efe5..08c6f13 100644 --- a/Assets/AssetRaw/model/model/materials/黑色塑料.001.mat +++ b/Assets/AssetRaw/model/model/materials/黑色塑料.001.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.06, g: 0.06, b: 0.06, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/AssetRaw/model/model/materials/黑色塑料.002.mat b/Assets/AssetRaw/model/model/materials/黑色塑料.002.mat index 065a3f5..cd41666 100644 --- a/Assets/AssetRaw/model/model/materials/黑色塑料.002.mat +++ b/Assets/AssetRaw/model/model/materials/黑色塑料.002.mat @@ -14,7 +14,7 @@ Material: m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -81,3 +81,4 @@ Material: - _Color: {r: 0.3073321, g: 0.3073321, b: 0.3073321, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/HighlightPlus.meta b/Assets/HighlightPlus.meta new file mode 100644 index 0000000..a4805b0 --- /dev/null +++ b/Assets/HighlightPlus.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5db7164e964ae4c6b82d2283320ad13d +folderAsset: yes +timeCreated: 1557315954 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo.meta b/Assets/HighlightPlus/Demo.meta new file mode 100644 index 0000000..5604e49 --- /dev/null +++ b/Assets/HighlightPlus/Demo.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b0c676f447c26429db5c9404720e279c +folderAsset: yes +timeCreated: 1542876294 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Demo1_HighlightExample.unity b/Assets/HighlightPlus/Demo/Demo1_HighlightExample.unity new file mode 100644 index 0000000..698bc03 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Demo1_HighlightExample.unity @@ -0,0 +1,2114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.4471771, g: 0.4970975, b: 0.57515424, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 1 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000014, guid: 039bfaf33d1112a4d904b7d393a6e9bb, + type: 2} + m_UseShadowmask: 0 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &165230857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 102722, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165230858} + m_Layer: 0 + m_Name: CalibrationWalls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165230858 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 431536, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165230857} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165184421} + - {fileID: 181859161} + - {fileID: 1435719952} + - {fileID: 1525858954} + m_Father: {fileID: 1694850532} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &181859160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 125776, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 181859161} + - component: {fileID: 181859164} + - component: {fileID: 181859163} + - component: {fileID: 181859162} + m_Layer: 0 + m_Name: CalibrationWallRearRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &181859161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494730, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} + m_LocalPosition: {x: -2.5, y: 2.5, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &181859162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2304408, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &181859163 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6442406, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &181859164 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3378452, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &271039439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 271039440} + m_Layer: 0 + m_Name: --- Other Scene Stuff --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &271039440 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 271039439} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &472769855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472769856} + - component: {fileID: 472769857} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472769856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_LocalRotation: {x: 0.4144551, y: -0.7420336, z: 0.5253307, w: -0.040507175} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &472769857 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 10800000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.9885849, b: 0.95686275, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.01 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &567592204 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 567592205} + - component: {fileID: 567592208} + - component: {fileID: 567592207} + - component: {fileID: 567592206} + m_Layer: 0 + m_Name: SmallWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &567592205 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_LocalRotation: {x: 0, y: 0.34513432, z: 0, w: 0.93855333} + m_LocalPosition: {x: 1.42, y: 0.34, z: -0.77} + m_LocalScale: {x: 2, y: 1, z: 0.2} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 40.38, z: 0} +--- !u!23 &567592206 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &567592207 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &567592208 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &613470776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 613470777} + - component: {fileID: 613470779} + - component: {fileID: 613470778} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &613470777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1605869163} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.1} + m_AnchorMax: {x: 1, y: 0.9} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &613470778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 90 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HIGHLIGHT PLUS (OUTLINE, GLOW AND SEE-THROUGH) DEMO + + Click + or hover spheres to show effect. Press C to randomize glow color on gold sphere.' +--- !u!222 &613470779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_CullTransparentMesh: 0 +--- !u!1 &617211756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 195550, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617211757} + - component: {fileID: 617211762} + - component: {fileID: 617211761} + - component: {fileID: 617211760} + - component: {fileID: 617211759} + - component: {fileID: 617211758} + m_Layer: 1 + m_Name: SilkSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &617211757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 403562, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &617211758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.5 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1 + glowWidth: 0.89 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 1, g: 0.52205884, b: 0.52205884, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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.79 + 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} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 2 + targetFXEndScale: 1.1 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &617211759 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &617211760 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319362, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3134ae80e55101b468fe9ea362327f28, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 617211757} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &617211761 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13518414, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &617211762 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3336432, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &640476129 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 640476130} + m_Layer: 0 + m_Name: --- Sample Spheres --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &640476130 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 640476129} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &656694097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 158430, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656694098} + - component: {fileID: 656694104} + - component: {fileID: 656694103} + - component: {fileID: 656694102} + - component: {fileID: 656694101} + - component: {fileID: 656694100} + - component: {fileID: 656694099} + m_Layer: 1 + m_Name: GoldSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &656694098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494476, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.85, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: + - {fileID: 1837449480} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &656694099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36aa3934b8f65413188fabe723ded4da, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &656694100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 1 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 18 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0.5 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.78 + glowWidth: 3.42 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 0.2 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 1 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &656694101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &656694102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5b12cf4be3e7c5149a5f24108ee6a551, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &656694103 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13548954, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &656694104 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3351936, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &965526239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965526244} + - component: {fileID: 965526243} + - component: {fileID: 965526240} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &965526240 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 8100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 +--- !u!20 &965526243 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2000000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.25, g: 0.25, b: 0.25, a: 0.003921569} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294963199 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &965526244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_LocalRotation: {x: 0.0010074005, y: 0.91790915, z: 0.0024223588, w: -0.39678213} + m_LocalPosition: {x: 2.4200273, y: 0.72167146, z: 2.4644732} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1165184420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 182018, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165184421} + - component: {fileID: 1165184424} + - component: {fileID: 1165184423} + - component: {fileID: 1165184422} + m_Layer: 0 + m_Name: CalibrationWallRearLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1165184421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 464034, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 2.5, z: -2.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165184422 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2391912, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1165184423 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6494426, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1165184424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3305810, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1179472412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179472413} + - component: {fileID: 1179472416} + - component: {fileID: 1179472415} + - component: {fileID: 1179472414} + m_Layer: 0 + m_Name: CalibrationFloor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1179472413 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1179472414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1179472415 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1179472416 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1392572690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 145214, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392572691} + - component: {fileID: 1392572696} + - component: {fileID: 1392572695} + - component: {fileID: 1392572694} + - component: {fileID: 1392572693} + - component: {fileID: 1392572692} + m_Layer: 1 + m_Name: PlasticSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392572691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 473706, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.325, z: 1} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1392572692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 1 + fadeOutDuration: 1 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 1, g: 1, b: 1, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.32 + glowWidth: 3 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 0.19117647, g: 0.36409733, b: 1, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 2 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 0 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1392572693 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &1392572694 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2375834, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 958abb01761e1dc4ebf9ffdf8252d20e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &1392572695 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13564548, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1392572696 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3335484, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1435719951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1435719952} + - component: {fileID: 1435719955} + - component: {fileID: 1435719954} + - component: {fileID: 1435719953} + m_Layer: 0 + m_Name: CalibrationWallFrontLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1435719952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_LocalRotation: {x: 0.5000003, y: -0.5000001, z: -0.49999964, w: -0.50000006} + m_LocalPosition: {x: 2.4999998, y: 2.5, z: 0} + m_LocalScale: {x: 0.4999999, y: 1, z: 0.4999999} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1435719953 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1435719954 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1435719955 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1525858953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525858954} + - component: {fileID: 1525858957} + - component: {fileID: 1525858956} + - component: {fileID: 1525858955} + m_Layer: 0 + m_Name: CalibrationWallFrontRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1525858954 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_LocalRotation: {x: 0.70710695, y: 0.0000002682209, z: 0.00000021584746, w: -0.7071066} + m_LocalPosition: {x: 0, y: 2.500002, z: 2.5000014} + m_LocalScale: {x: 0.49999997, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1525858955 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1525858956 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1525858957 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1605869162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1605869163} + - component: {fileID: 1605869165} + - component: {fileID: 1605869164} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1605869163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 613470777} + m_Father: {fileID: 1819248545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1605869164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.641} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1605869165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_CullTransparentMesh: 0 +--- !u!1 &1694850531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694850532} + m_Layer: 0 + m_Name: StaticGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!4 &1694850532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694850531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1179472413} + - {fileID: 165230858} + - {fileID: 567592205} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1819248541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1819248545} + - component: {fileID: 1819248544} + - component: {fileID: 1819248543} + - component: {fileID: 1819248542} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1819248542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1819248543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1819248544 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1819248545 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1605869163} + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1837449479 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1837449480} + - component: {fileID: 1837449481} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1837449480 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 656694098} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!215 &1837449481 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 1 + m_RefreshMode: 1 + m_TimeSlicingMode: 0 + m_Resolution: 512 + m_UpdateFrequency: 0 + m_BoxSize: {x: 5, y: 5, z: 5} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 20 + m_ShadowDistance: 20 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967293 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 0 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} diff --git a/Assets/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta b/Assets/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta new file mode 100644 index 0000000..ee3f98e --- /dev/null +++ b/Assets/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b18a9c16bcd174b1683d370384a8cab7 +timeCreated: 1542877475 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Demo2_SelectionExample.unity b/Assets/HighlightPlus/Demo/Demo2_SelectionExample.unity new file mode 100644 index 0000000..2e6914e --- /dev/null +++ b/Assets/HighlightPlus/Demo/Demo2_SelectionExample.unity @@ -0,0 +1,2075 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44717664, g: 0.49709702, b: 0.5751535, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 1 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000014, guid: 039bfaf33d1112a4d904b7d393a6e9bb, + type: 2} + m_LightingSettings: {fileID: 2001289354} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &165230857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 102722, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165230858} + m_Layer: 0 + m_Name: CalibrationWalls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165230858 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 431536, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165230857} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165184421} + - {fileID: 181859161} + - {fileID: 1435719952} + - {fileID: 1525858954} + m_Father: {fileID: 1694850532} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &181859160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 125776, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 181859161} + - component: {fileID: 181859164} + - component: {fileID: 181859163} + - component: {fileID: 181859162} + m_Layer: 0 + m_Name: CalibrationWallRearRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &181859161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494730, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} + m_LocalPosition: {x: -2.5, y: 2.5, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &181859162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2304408, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &181859163 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6442406, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &181859164 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3378452, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &472769855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472769856} + - component: {fileID: 472769857} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472769856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_LocalRotation: {x: 0.4144551, y: -0.7420336, z: 0.5253307, w: -0.040507175} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &472769857 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 10800000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.9885849, b: 0.95686275, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.01 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &500965638 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 500965640} + - component: {fileID: 500965639} + m_Layer: 0 + m_Name: ManualSelectionExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &500965639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 500965638} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae556bec7040546f0a8bcc625513a0d2, type: 3} + m_Name: + m_EditorClassIdentifier: + objectToSelect: {fileID: 656694098} +--- !u!4 &500965640 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 500965638} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &613470776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 613470777} + - component: {fileID: 613470779} + - component: {fileID: 613470778} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &613470777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1605869163} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.1} + m_AnchorMax: {x: 1, y: 0.9} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &613470778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 90 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HIGHLIGHT PLUS SELECTION DEMO (USES HIGHLIGHT MANAGER) + + Click + on spheres to select them. Press 1/2/3 keys to select, toggle and unselect gold + sphere.' +--- !u!222 &613470779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_CullTransparentMesh: 0 +--- !u!1 &617211756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 195550, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617211757} + - component: {fileID: 617211762} + - component: {fileID: 617211761} + - component: {fileID: 617211760} + m_Layer: 1 + m_Name: SilkSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &617211757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 403562, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.17, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: [] + m_Father: {fileID: 1202089666} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &617211760 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319362, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3134ae80e55101b468fe9ea362327f28, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 617211757} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &617211761 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13518414, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &617211762 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3336432, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &656694097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 158430, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656694098} + - component: {fileID: 656694104} + - component: {fileID: 656694103} + - component: {fileID: 656694102} + m_Layer: 1 + m_Name: GoldSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &656694098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494476, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.85, y: 0.325, z: 0} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: + - {fileID: 1837449480} + m_Father: {fileID: 1202089666} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &656694102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5b12cf4be3e7c5149a5f24108ee6a551, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &656694103 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13548954, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &656694104 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3351936, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &790488496 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 790488497} + m_Layer: 0 + m_Name: --- SAMPLE SCRIPTS --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &790488497 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 790488496} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.34594363, y: 11.744718, z: -2.455723} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &965526239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965526244} + - component: {fileID: 965526243} + - component: {fileID: 965526240} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &965526240 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 8100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 +--- !u!20 &965526243 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2000000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.25, g: 0.25, b: 0.25, a: 0.003921569} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294963199 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &965526244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_LocalRotation: {x: 0.0010074005, y: 0.91790915, z: 0.0024223588, w: -0.39678213} + m_LocalPosition: {x: 2.4200273, y: 0.72167146, z: 2.4644732} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &965747734 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965747736} + - component: {fileID: 965747735} + m_Layer: 0 + m_Name: EventsExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &965747735 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965747734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e03a4fb11e1844a42b2becf08e18b9e2, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &965747736 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965747734} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 199.50073, y: 46.180042, z: 195.3383} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1016798143 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1016798146} + - component: {fileID: 1016798145} + - component: {fileID: 1016798144} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1016798144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1016798143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1016798145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1016798143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1016798146 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1016798143} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1044967304 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1044967305} + m_Layer: 0 + m_Name: --- HIGHLIGHT MANAGER --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1044967305 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1044967304} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.34594363, y: 11.744718, z: -2.455723} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1165184420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 182018, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165184421} + - component: {fileID: 1165184424} + - component: {fileID: 1165184423} + - component: {fileID: 1165184422} + m_Layer: 0 + m_Name: CalibrationWallRearLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1165184421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 464034, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 2.5, z: -2.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165184422 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2391912, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1165184423 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6494426, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1165184424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3305810, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1179472412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179472413} + - component: {fileID: 1179472416} + - component: {fileID: 1179472415} + - component: {fileID: 1179472414} + m_Layer: 0 + m_Name: CalibrationFloor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1179472413 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1179472414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1179472415 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1179472416 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1202089665 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 190392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1202089666} + m_Layer: 0 + m_Name: SampleSpheres + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1202089666 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 470018, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202089665} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1392572691} + - {fileID: 656694098} + - {fileID: 617211757} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1392572690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 145214, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392572691} + - component: {fileID: 1392572696} + - component: {fileID: 1392572695} + - component: {fileID: 1392572694} + m_Layer: 1 + m_Name: PlasticSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392572691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 473706, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.325, z: 1} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1202089666} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1392572694 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2375834, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 958abb01761e1dc4ebf9ffdf8252d20e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!135 &1392572695 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 13564548, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1392572696 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3335484, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1435719951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1435719952} + - component: {fileID: 1435719955} + - component: {fileID: 1435719954} + - component: {fileID: 1435719953} + m_Layer: 0 + m_Name: CalibrationWallFrontLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1435719952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_LocalRotation: {x: 0.5000003, y: -0.5000001, z: -0.49999964, w: -0.50000006} + m_LocalPosition: {x: 2.4999998, y: 2.5, z: 0} + m_LocalScale: {x: 0.4999999, y: 1, z: 0.4999999} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1435719953 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1435719954 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1435719955 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1525858953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525858954} + - component: {fileID: 1525858957} + - component: {fileID: 1525858956} + - component: {fileID: 1525858955} + m_Layer: 0 + m_Name: CalibrationWallFrontRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1525858954 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_LocalRotation: {x: 0.70710695, y: 0.0000002682209, z: 0.00000021584746, w: -0.7071066} + m_LocalPosition: {x: 0, y: 2.500002, z: 2.5000014} + m_LocalScale: {x: 0.49999997, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1525858955 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1525858956 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1525858957 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1605869162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1605869163} + - component: {fileID: 1605869165} + - component: {fileID: 1605869164} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1605869163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 613470777} + m_Father: {fileID: 1819248545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1605869164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.641} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1605869165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_CullTransparentMesh: 0 +--- !u!1 &1669838390 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1669838393} + - component: {fileID: 1669838392} + - component: {fileID: 1669838391} + m_Layer: 0 + m_Name: HighlightPlusManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1669838391 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669838390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: af4d46fd89b9543e5be2358ac0c9ced0, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + layerMask: + serializedVersion: 2 + m_Bits: 2 + raycastCamera: {fileID: 0} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + selectOnClick: 1 + selectedProfile: {fileID: 11400000, guid: e6e74f38237364260b68bef0cd1b8795, type: 2} + selectedAndHighlightedProfile: {fileID: 11400000, guid: 77128a10e40704023952e72c2046e685, + type: 2} + singleSelection: 0 + toggle: 0 + keepSelection: 0 +--- !u!114 &1669838392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669838390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayVisibility: 0 + outline: 0 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.45 + outlineQuality: 3 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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} + glowIgnoreMask: 0 + 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} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + rmsCount: 0 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!4 &1669838393 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669838390} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1694850531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694850532} + m_Layer: 0 + m_Name: StaticGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!4 &1694850532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694850531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1179472413} + - {fileID: 165230858} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1819248541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1819248545} + - component: {fileID: 1819248544} + - component: {fileID: 1819248543} + - component: {fileID: 1819248542} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1819248542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1819248543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1819248544 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1819248545 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1605869163} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1837449479 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1837449480} + - component: {fileID: 1837449481} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1837449480 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 656694098} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!215 &1837449481 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837449479} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 1 + m_RefreshMode: 1 + m_TimeSlicingMode: 0 + m_Resolution: 512 + m_UpdateFrequency: 0 + m_BoxSize: {x: 5, y: 5, z: 5} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 20 + m_ShadowDistance: 20 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967293 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 0 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!850595691 &2001289354 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 3 + m_GIWorkflowMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 +--- !u!1 &2017446011 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017446012} + m_Layer: 0 + m_Name: --- SCENE --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &2017446012 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017446011} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta b/Assets/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta new file mode 100644 index 0000000..4faa1fb --- /dev/null +++ b/Assets/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 96cd4e40d2f234b9e95987f9f953d17c +timeCreated: 1542877475 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Demo3_HitFXExample.unity b/Assets/HighlightPlus/Demo/Demo3_HitFXExample.unity new file mode 100644 index 0000000..28d0db1 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Demo3_HitFXExample.unity @@ -0,0 +1,2093 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.4471771, g: 0.4970975, b: 0.57515424, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 1 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000014, guid: 039bfaf33d1112a4d904b7d393a6e9bb, + type: 2} + m_UseShadowmask: 0 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &165230857 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 102722, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165230858} + m_Layer: 0 + m_Name: CalibrationWalls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &165230858 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 431536, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165230857} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165184421} + - {fileID: 181859161} + - {fileID: 1435719952} + - {fileID: 1525858954} + m_Father: {fileID: 1694850532} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &181859160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 125776, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 181859161} + - component: {fileID: 181859164} + - component: {fileID: 181859163} + - component: {fileID: 181859162} + m_Layer: 0 + m_Name: CalibrationWallRearRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &181859161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494730, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} + m_LocalPosition: {x: -2.5, y: 2.5, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &181859162 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2304408, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &181859163 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6442406, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &181859164 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3378452, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181859160} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &271039439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 271039440} + m_Layer: 0 + m_Name: --- Other Scene Stuff --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &271039440 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 271039439} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &472769855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472769856} + - component: {fileID: 472769857} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472769856 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_LocalRotation: {x: 0.4144551, y: -0.7420336, z: 0.5253307, w: -0.040507175} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &472769857 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 10800000, guid: e11f662626928b14e8f57acb029360b9, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.9885849, b: 0.95686275, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.01 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &567592204 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 567592205} + - component: {fileID: 567592208} + - component: {fileID: 567592207} + - component: {fileID: 567592206} + m_Layer: 0 + m_Name: SmallWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &567592205 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_LocalRotation: {x: 0, y: 0.34513432, z: 0, w: 0.93855333} + m_LocalPosition: {x: 1.42, y: 0.34, z: -0.77} + m_LocalScale: {x: 2, y: 1, z: 0.2} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 40.38, z: 0} +--- !u!23 &567592206 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &567592207 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &567592208 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 567592204} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &613470776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 613470777} + - component: {fileID: 613470779} + - component: {fileID: 613470778} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &613470777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1605869163} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.1} + m_AnchorMax: {x: 1, y: 0.9} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &613470778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 90 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HIGHLIGHT PLUS HIT FX DEMO + + Click on + any capsule to trigger the effect.' +--- !u!222 &613470779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 613470776} + m_CullTransparentMesh: 0 +--- !u!1 &617211756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 195550, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617211757} + - component: {fileID: 617211762} + - component: {fileID: 617211760} + - component: {fileID: 617211759} + - component: {fileID: 617211758} + - component: {fileID: 617211761} + m_Layer: 1 + m_Name: Target 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &617211757 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 403562, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.97, y: 0.65, z: -0.97} + m_LocalScale: {x: 0.65, y: 0.65, z: 0.65} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &617211758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.5 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.5 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1 + glowWidth: 0.89 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 1, g: 0.52205884, b: 0.52205884, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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.79 + 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} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 2 + targetFXEndScale: 1.1 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 0.83026266, b: 0, a: 1} + hitFxRadius: 0.5 +--- !u!114 &617211759 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &617211760 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319362, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3134ae80e55101b468fe9ea362327f28, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 617211757} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &617211761 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &617211762 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3336432, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 617211756} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &640476129 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 640476130} + m_Layer: 0 + m_Name: --- Sample Targets --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &640476130 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 640476129} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &656694097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 158430, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 656694098} + - component: {fileID: 656694104} + - component: {fileID: 656694102} + - component: {fileID: 656694101} + - component: {fileID: 656694100} + - component: {fileID: 656694099} + - component: {fileID: 656694103} + m_Layer: 1 + m_Name: Target 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &656694098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 494476, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.85, y: 0.5, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &656694099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36aa3934b8f65413188fabe723ded4da, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &656694100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 1 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 18 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0.5 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.01 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 2800000, guid: 6f4d7782c600f4fa1859b8f3c092189d, type: 3} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.78 + glowWidth: 3.42 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 0.2 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 30 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + seeThrough: 1 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 2 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 0.93333334, g: 1.1058824, b: 2, a: 1} + hitFxRadius: 0.1 +--- !u!114 &656694101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &656694102 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2319392, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5b12cf4be3e7c5149a5f24108ee6a551, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &656694103 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &656694104 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3351936, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 656694097} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &965526239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 965526244} + - component: {fileID: 965526243} + - component: {fileID: 965526240} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &965526240 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 8100000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 +--- !u!20 &965526243 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2000000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.25, g: 0.25, b: 0.25, a: 0.003921569} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294963199 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &965526244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: 97b34cadc45c6d94abd78dfc533fc3b2, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_LocalRotation: {x: 0.0010074005, y: 0.91790915, z: 0.0024223588, w: -0.39678213} + m_LocalPosition: {x: 2.4200273, y: 0.72167146, z: 2.4644732} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1165184420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 182018, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165184421} + - component: {fileID: 1165184424} + - component: {fileID: 1165184423} + - component: {fileID: 1165184422} + m_Layer: 0 + m_Name: CalibrationWallRearLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1165184421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 464034, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 2.5, z: -2.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165184422 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2391912, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1165184423 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6494426, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1165184424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3305810, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165184420} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1179472412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1179472413} + - component: {fileID: 1179472416} + - component: {fileID: 1179472415} + - component: {fileID: 1179472414} + m_Layer: 0 + m_Name: CalibrationFloor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1179472413 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400006, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 1694850532} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1179472414 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1179472415 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1179472416 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1179472412} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1392572690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 145214, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1392572691} + - component: {fileID: 1392572696} + - component: {fileID: 1392572694} + - component: {fileID: 1392572693} + - component: {fileID: 1392572692} + - component: {fileID: 1392572695} + m_Layer: 1 + m_Name: Target 2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1392572691 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 473706, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.49, z: 1} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1392572692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 1 + previewInEditor: 1 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + depthClip: 0 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 1 + fadeOutDuration: 1 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 1, g: 1, b: 1, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + outlineOptimalBlit: 1 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.32 + glowWidth: 3 + glowQuality: 2 + glowDownsampling: 2 + glowHQColor: {r: 0.19117647, g: 0.36409733, b: 1, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowOptimalBlit: 1 + glowBlitDebug: 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 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 2800000, guid: 1de3c566a6c8c405b9f6f453137273ec, type: 3} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 2 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + targetFXVisibility: 1 + seeThrough: 0 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + 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 + seeThroughOrdered: 0 + rmsCount: 1 + hitFxInitialIntensity: 1 + hitFxMode: 2 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &1392572693 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3} + m_Name: + m_EditorClassIdentifier: + highlightOnHover: 1 + triggerMode: 1 + raycastCamera: {fileID: 965526243} + raycastSource: 0 + minDistance: 0 + maxDistance: 0 + respectUI: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 0 + selectOnClick: 0 + selectedProfile: {fileID: 0} + selectedAndHighlightedProfile: {fileID: 0} + singleSelection: 0 + toggle: 0 +--- !u!23 &1392572694 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2375834, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 3 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 958abb01761e1dc4ebf9ffdf8252d20e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &1392572695 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1392572696 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3335484, guid: d7720c2417695eb45bd70f6d10a17068, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1392572690} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1435719951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1435719952} + - component: {fileID: 1435719955} + - component: {fileID: 1435719954} + - component: {fileID: 1435719953} + m_Layer: 0 + m_Name: CalibrationWallFrontLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1435719952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_LocalRotation: {x: 0.5000003, y: -0.5000001, z: -0.49999964, w: -0.50000006} + m_LocalPosition: {x: 2.4999998, y: 2.5, z: 0} + m_LocalScale: {x: 0.4999999, y: 1, z: 0.4999999} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1435719953 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1435719954 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1435719955 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300002, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1435719951} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1525858953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525858954} + - component: {fileID: 1525858957} + - component: {fileID: 1525858956} + - component: {fileID: 1525858955} + m_Layer: 0 + m_Name: CalibrationWallFrontRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 65 + m_IsActive: 1 +--- !u!4 &1525858954 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_LocalRotation: {x: 0.70710695, y: 0.0000002682209, z: 0.00000021584746, w: -0.7071066} + m_LocalPosition: {x: 0, y: 2.500002, z: 2.5000014} + m_LocalScale: {x: 0.49999997, y: 1, z: 0.5} + m_Children: [] + m_Father: {fileID: 165230858} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1525858955 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 2300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0062779a7c303451ab69ea6fc7893dc8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1525858956 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 6400000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1525858957 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 3300000, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525858953} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1605869162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1605869163} + - component: {fileID: 1605869165} + - component: {fileID: 1605869164} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1605869163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 613470777} + m_Father: {fileID: 1819248545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1605869164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.641} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1605869165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1605869162} + m_CullTransparentMesh: 0 +--- !u!1 &1694850531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 100004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694850532} + m_Layer: 0 + m_Name: StaticGeometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!4 &1694850532 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 400004, guid: a3244c08ab4d16f45b564401c17e84d4, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694850531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1179472413} + - {fileID: 165230858} + - {fileID: 567592205} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1819248541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1819248545} + - component: {fileID: 1819248544} + - component: {fileID: 1819248543} + - component: {fileID: 1819248542} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1819248542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1819248543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1819248544 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1819248545 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1819248541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1605869163} + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &2118005892 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2118005894} + - component: {fileID: 2118005893} + m_Layer: 0 + m_Name: HitFx Script + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2118005893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2118005892} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 53883b254655d44479b3d33caba0be58, type: 3} + m_Name: + m_EditorClassIdentifier: + hitSound: {fileID: 8300000, guid: 0cf993a8419a44000883892928cbdd4d, type: 3} +--- !u!4 &2118005894 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2118005892} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.729038, y: -3.3103254, z: -4.729038} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta b/Assets/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta new file mode 100644 index 0000000..d1b4947 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1c609762d2aa646c7a9fe426b06d8eee +timeCreated: 1542877475 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Materials.meta b/Assets/HighlightPlus/Demo/Materials.meta new file mode 100644 index 0000000..e3f2752 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d4f7bf313cad54255a94a5340731a311 +folderAsset: yes +timeCreated: 1542877572 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Materials/Floor.mat b/Assets/HighlightPlus/Demo/Materials/Floor.mat new file mode 100644 index 0000000..7bf73bc --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Floor.mat @@ -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} diff --git a/Assets/HighlightPlus/Demo/Materials/Floor.mat.meta b/Assets/HighlightPlus/Demo/Materials/Floor.mat.meta new file mode 100644 index 0000000..9218940 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Floor.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d681c1d72c3c16149abd2f0f25ca628c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/HighlightPlus/Demo/Materials/Gold.mat b/Assets/HighlightPlus/Demo/Materials/Gold.mat new file mode 100644 index 0000000..1b93eb9 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Gold.mat @@ -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} diff --git a/Assets/HighlightPlus/Demo/Materials/Gold.mat.meta b/Assets/HighlightPlus/Demo/Materials/Gold.mat.meta new file mode 100644 index 0000000..dd5d382 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Gold.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 5b12cf4be3e7c5149a5f24108ee6a551 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/HighlightPlus/Demo/Materials/PlasticGlossy.mat b/Assets/HighlightPlus/Demo/Materials/PlasticGlossy.mat new file mode 100644 index 0000000..734c564 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/PlasticGlossy.mat @@ -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} diff --git a/Assets/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta b/Assets/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta new file mode 100644 index 0000000..e0d7375 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 958abb01761e1dc4ebf9ffdf8252d20e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/HighlightPlus/Demo/Materials/Silk.mat b/Assets/HighlightPlus/Demo/Materials/Silk.mat new file mode 100644 index 0000000..a598850 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Silk.mat @@ -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} diff --git a/Assets/HighlightPlus/Demo/Materials/Silk.mat.meta b/Assets/HighlightPlus/Demo/Materials/Silk.mat.meta new file mode 100644 index 0000000..6bc0ff4 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Silk.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3134ae80e55101b468fe9ea362327f28 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/HighlightPlus/Demo/Materials/Wall.mat b/Assets/HighlightPlus/Demo/Materials/Wall.mat new file mode 100644 index 0000000..ff651fb --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Wall.mat @@ -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} diff --git a/Assets/HighlightPlus/Demo/Materials/Wall.mat.meta b/Assets/HighlightPlus/Demo/Materials/Wall.mat.meta new file mode 100644 index 0000000..4eee5df --- /dev/null +++ b/Assets/HighlightPlus/Demo/Materials/Wall.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0062779a7c303451ab69ea6fc7893dc8 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/HighlightPlus/Demo/Profiles.meta b/Assets/HighlightPlus/Demo/Profiles.meta new file mode 100644 index 0000000..c031e7e --- /dev/null +++ b/Assets/HighlightPlus/Demo/Profiles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ea7a654ed5444ecd828eb05ba66a572 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Profiles/Selected.asset b/Assets/HighlightPlus/Demo/Profiles/Selected.asset new file mode 100644 index 0000000..8ccdb84 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Profiles/Selected.asset @@ -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 diff --git a/Assets/HighlightPlus/Demo/Profiles/Selected.asset.meta b/Assets/HighlightPlus/Demo/Profiles/Selected.asset.meta new file mode 100644 index 0000000..01010cd --- /dev/null +++ b/Assets/HighlightPlus/Demo/Profiles/Selected.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6e74f38237364260b68bef0cd1b8795 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset b/Assets/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset new file mode 100644 index 0000000..27ff791 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset @@ -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 diff --git a/Assets/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta b/Assets/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta new file mode 100644 index 0000000..8235df4 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77128a10e40704023952e72c2046e685 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Scripts.meta b/Assets/HighlightPlus/Demo/Scripts.meta new file mode 100644 index 0000000..914c5e0 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0748038d48d9c48fc9f35f5d32dc985a +folderAsset: yes +timeCreated: 1544692068 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Scripts/HitFxDemo.cs b/Assets/HighlightPlus/Demo/Scripts/HitFxDemo.cs new file mode 100644 index 0000000..b042385 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/HitFxDemo.cs @@ -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(); + if (effect == null) return; + AudioSource.PlayClipAtPoint(hitSound, hitInfo.point); + effect.HitFX(hitInfo.point); + } + + } + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta b/Assets/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta new file mode 100644 index 0000000..d786bcb --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 53883b254655d44479b3d33caba0be58 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs b/Assets/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs new file mode 100644 index 0000000..4ef44f4 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using HighlightPlus; + +namespace HighlightPlus.Demos { + + public class ManualSelectionDemo : MonoBehaviour { + + HighlightManager hm; + + public Transform objectToSelect; + + void Start() { + hm = Misc.FindObjectOfType(); + } + + 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); + } + } + } +} diff --git a/Assets/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta b/Assets/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta new file mode 100644 index 0000000..2020a5a --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae556bec7040546f0a8bcc625513a0d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs b/Assets/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs new file mode 100644 index 0000000..09300bd --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs @@ -0,0 +1,40 @@ +using UnityEngine; +using HighlightPlus; + +namespace HighlightPlus.Demos { + + public class SphereHighlightEventExample : MonoBehaviour { + + HighlightEffect effect; + + void Start() { + effect = GetComponent (); + 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)); + } + + } + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta b/Assets/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta new file mode 100644 index 0000000..1e37e81 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 36aa3934b8f65413188fabe723ded4da +timeCreated: 1544692056 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs b/Assets/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs new file mode 100644 index 0000000..76d0dd5 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs @@ -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; + } + + + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta b/Assets/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta new file mode 100644 index 0000000..46cd1db --- /dev/null +++ b/Assets/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e03a4fb11e1844a42b2becf08e18b9e2 +timeCreated: 1544692056 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Sounds.meta b/Assets/HighlightPlus/Demo/Sounds.meta new file mode 100644 index 0000000..88d6e31 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Sounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 952080b4610a343de8a56483df1aaf6b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Sounds/metalHit.wav b/Assets/HighlightPlus/Demo/Sounds/metalHit.wav new file mode 100644 index 0000000..405c853 Binary files /dev/null and b/Assets/HighlightPlus/Demo/Sounds/metalHit.wav differ diff --git a/Assets/HighlightPlus/Demo/Sounds/metalHit.wav.meta b/Assets/HighlightPlus/Demo/Sounds/metalHit.wav.meta new file mode 100644 index 0000000..862ac00 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Sounds/metalHit.wav.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures.meta b/Assets/HighlightPlus/Demo/Textures.meta new file mode 100644 index 0000000..9442ca0 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 13783dcd57d4d4977b6fa46c1be6a21d +folderAsset: yes +timeCreated: 1542901861 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png new file mode 100644 index 0000000..05469a0 Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta new file mode 100644 index 0000000..74e9e45 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png new file mode 100644 index 0000000..9bbac77 Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta new file mode 100644 index 0000000..6ec877c --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures/overlaySampleTex.png b/Assets/HighlightPlus/Demo/Textures/overlaySampleTex.png new file mode 100644 index 0000000..32099ab Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/overlaySampleTex.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta b/Assets/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta new file mode 100644 index 0000000..866a0a0 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png new file mode 100644 index 0000000..e4491ca Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta new file mode 100644 index 0000000..d6db09d --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png new file mode 100644 index 0000000..1f5d926 Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta new file mode 100644 index 0000000..9988515 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png new file mode 100644 index 0000000..1d80ba8 Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta new file mode 100644 index 0000000..ebd4111 --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png new file mode 100644 index 0000000..10e299c Binary files /dev/null and b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png differ diff --git a/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta new file mode 100644 index 0000000..025f6ed --- /dev/null +++ b/Assets/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta @@ -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: diff --git a/Assets/HighlightPlus/Documentation.meta b/Assets/HighlightPlus/Documentation.meta new file mode 100644 index 0000000..f8522e0 --- /dev/null +++ b/Assets/HighlightPlus/Documentation.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0b800828db32d4d3db02036d0637b878 +folderAsset: yes +timeCreated: 1578838656 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Documentation/Documentation Online.url b/Assets/HighlightPlus/Documentation/Documentation Online.url new file mode 100644 index 0000000..e6b8bab --- /dev/null +++ b/Assets/HighlightPlus/Documentation/Documentation Online.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://kronnect.com/guides/highlight-plus-introduction/ \ No newline at end of file diff --git a/Assets/HighlightPlus/Documentation/Documentation Online.url.meta b/Assets/HighlightPlus/Documentation/Documentation Online.url.meta new file mode 100644 index 0000000..0bc6abd --- /dev/null +++ b/Assets/HighlightPlus/Documentation/Documentation Online.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 899987610c54a424e9ac505dc0a45531 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Documentation/Documentation PDF.url b/Assets/HighlightPlus/Documentation/Documentation PDF.url new file mode 100644 index 0000000..48ce08b --- /dev/null +++ b/Assets/HighlightPlus/Documentation/Documentation PDF.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.dropbox.com/s/17j7os3sc3isa8l/Documentation.pdf?dl=0 \ No newline at end of file diff --git a/Assets/HighlightPlus/Documentation/Documentation PDF.url.meta b/Assets/HighlightPlus/Documentation/Documentation PDF.url.meta new file mode 100644 index 0000000..6456c50 --- /dev/null +++ b/Assets/HighlightPlus/Documentation/Documentation PDF.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 52b0de8482472475eb8e29133fba0545 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Documentation/Kronnect Assets.url b/Assets/HighlightPlus/Documentation/Kronnect Assets.url new file mode 100644 index 0000000..d477291 --- /dev/null +++ b/Assets/HighlightPlus/Documentation/Kronnect Assets.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://kronnect.com \ No newline at end of file diff --git a/Assets/HighlightPlus/Documentation/Kronnect Assets.url.meta b/Assets/HighlightPlus/Documentation/Kronnect Assets.url.meta new file mode 100644 index 0000000..184fbf3 --- /dev/null +++ b/Assets/HighlightPlus/Documentation/Kronnect Assets.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 97fe6a32d03144aa798ad26d2f213191 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor.meta b/Assets/HighlightPlus/Editor.meta new file mode 100644 index 0000000..39a01a2 --- /dev/null +++ b/Assets/HighlightPlus/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c1cfaabf0583f44b4871807a898aaf31 +folderAsset: yes +timeCreated: 1542886534 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor/HighlightEffectEditor.cs b/Assets/HighlightPlus/Editor/HighlightEffectEditor.cs new file mode 100644 index 0000000..f7ff300 --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightEffectEditor.cs @@ -0,0 +1,839 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightEffect))] + [CanEditMultipleObjects] + public class HighlightEffectEditor : UnityEditor.Editor { + +#pragma warning disable 0618 + + SerializedProperty profile, profileSync, camerasLayerMask, ignoreObjectVisibility, reflectionProbes, GPUInstancing, optimizeSkinnedMesh; + SerializedProperty ignore, previewInEditor, effectGroup, effectGroupLayer, effectNameFilter, effectNameUseRegEx, effectTarget, combineMeshes, alphaCutOff, cullBackFaces, padding, depthClip, normalsOption, subMeshMask; + SerializedProperty highlighted, fadeInDuration, fadeOutDuration, flipY, constantWidth, minimumWidth, extraCoveragePixels; + SerializedProperty overlay, overlayMode, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayBlending, overlayTexture, overlayTextureUVSpace, overlayTextureScale, overlayTextureScrolling, overlayVisibility; + SerializedProperty outline, outlineColor, outlineColorStyle, outlineGradient, outlineGradientInLocalSpace, outlineWidth, outlineBlurPasses, outlineQuality, outlineEdgeMode, outlineEdgeThreshold, outlineDownsampling, outlineVisibility, outlineOptimalBlit, outlineBlitDebug, outlineIndependent, outlineContourStyle, outlineSharpness; + SerializedProperty glow, glowWidth, glowQuality, glowBlurMethod, glowDownsampling, glowHQColor, glowDithering, glowDitheringStyle, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed, glowBlendPasses, glowPasses, glowVisibility, glowBlendMode, glowOptimalBlit, glowBlitDebug, glowIgnoreMask; + SerializedProperty innerGlow, innerGlowWidth, innerGlowColor, innerGlowBlendMode, innerGlowVisibility; + SerializedProperty iconFX, iconFXCenter, iconFXMesh, iconFXLightColor, iconFXDarkColor, iconFXRotationSpeed, iconFXAnimationOption, iconFXAnimationAmount, iconFXAnimationSpeed, iconFXScale, iconFXScaleToRenderBounds, iconFXOffset, iconFXTransitionDuration, iconFXStayDuration; + SerializedProperty seeThrough, seeThroughOccluderMask, seeThroughOccluderMaskAccurate, seeThroughOccluderThreshold, seeThroughOccluderCheckInterval, seeThroughOccluderCheckIndividualObjects, seeThroughDepthOffset, seeThroughMaxDepth; + SerializedProperty seeThroughIntensity, seeThroughTintAlpha, seeThroughTintColor, seeThroughNoise, seeThroughBorder, seeThroughBorderWidth, seeThroughBorderColor, seeThroughOrdered, seeThroughBorderOnly, seeThroughTexture, seeThroughTextureUVSpace, seeThroughTextureScale, seeThroughChildrenSortingMode; + SerializedProperty targetFX, targetFXTexture, targetFXColor, targetFXCenter, targetFXRotationSpeed, targetFXInitialScale, targetFXEndScale, targetFXScaleToRenderBounds, targetFXUseEnclosingBounds, targetFXOffset; + 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; + readonly List occluders = new List(); + + 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"); + optimizeSkinnedMesh = serializedObject.FindProperty("optimizeSkinnedMesh"); + 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"); + effectNameUseRegEx = serializedObject.FindProperty("effectNameUseRegEx"); + effectTarget = serializedObject.FindProperty("effectTarget"); + combineMeshes = serializedObject.FindProperty("combineMeshes"); + alphaCutOff = serializedObject.FindProperty("alphaCutOff"); + cullBackFaces = serializedObject.FindProperty("cullBackFaces"); + padding = serializedObject.FindProperty("padding"); + depthClip = serializedObject.FindProperty("depthClip"); + highlighted = serializedObject.FindProperty("_highlighted"); + fadeInDuration = serializedObject.FindProperty("fadeInDuration"); + fadeOutDuration = serializedObject.FindProperty("fadeOutDuration"); + flipY = serializedObject.FindProperty("flipY"); + constantWidth = serializedObject.FindProperty("constantWidth"); + extraCoveragePixels = serializedObject.FindProperty("extraCoveragePixels"); + minimumWidth = serializedObject.FindProperty("minimumWidth"); + + overlay = serializedObject.FindProperty("overlay"); + overlayMode = serializedObject.FindProperty("overlayMode"); + overlayColor = serializedObject.FindProperty("overlayColor"); + overlayAnimationSpeed = serializedObject.FindProperty("overlayAnimationSpeed"); + overlayMinIntensity = serializedObject.FindProperty("overlayMinIntensity"); + overlayBlending = serializedObject.FindProperty("overlayBlending"); + overlayTexture = serializedObject.FindProperty("overlayTexture"); + overlayTextureUVSpace = serializedObject.FindProperty("overlayTextureUVSpace"); + overlayTextureScale = serializedObject.FindProperty("overlayTextureScale"); + overlayTextureScrolling = serializedObject.FindProperty("overlayTextureScrolling"); + overlayVisibility = serializedObject.FindProperty("overlayVisibility"); + + outline = serializedObject.FindProperty("outline"); + outlineColor = serializedObject.FindProperty("outlineColor"); + outlineColorStyle = serializedObject.FindProperty("outlineColorStyle"); + outlineGradient = serializedObject.FindProperty("outlineGradient"); + outlineGradientInLocalSpace = serializedObject.FindProperty("outlineGradientInLocalSpace"); + outlineWidth = serializedObject.FindProperty("outlineWidth"); + outlineBlurPasses = serializedObject.FindProperty("outlineBlurPasses"); + outlineQuality = serializedObject.FindProperty("outlineQuality"); + outlineEdgeMode = serializedObject.FindProperty("outlineEdgeMode"); + outlineEdgeThreshold = serializedObject.FindProperty("outlineEdgeThreshold"); + outlineSharpness = serializedObject.FindProperty("outlineSharpness"); + outlineDownsampling = serializedObject.FindProperty("outlineDownsampling"); + outlineVisibility = serializedObject.FindProperty("outlineVisibility"); + outlineOptimalBlit = serializedObject.FindProperty("outlineOptimalBlit"); + outlineBlitDebug = serializedObject.FindProperty("outlineBlitDebug"); + outlineIndependent = serializedObject.FindProperty("outlineIndependent"); + outlineContourStyle = serializedObject.FindProperty("outlineContourStyle"); + + glow = serializedObject.FindProperty("glow"); + glowWidth = serializedObject.FindProperty("glowWidth"); + glowQuality = serializedObject.FindProperty("glowQuality"); + glowBlurMethod = serializedObject.FindProperty("glowBlurMethod"); + glowDownsampling = serializedObject.FindProperty("glowDownsampling"); + glowHQColor = serializedObject.FindProperty("glowHQColor"); + glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed"); + glowBlendPasses = serializedObject.FindProperty("glowBlendPasses"); + glowDithering = serializedObject.FindProperty("glowDithering"); + glowDitheringStyle = serializedObject.FindProperty("glowDitheringStyle"); + 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"); + innerGlowBlendMode = serializedObject.FindProperty("innerGlowBlendMode"); + 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"); + seeThroughTexture = serializedObject.FindProperty("seeThroughTexture"); + seeThroughTextureScale = serializedObject.FindProperty("seeThroughTextureScale"); + seeThroughTextureUVSpace = serializedObject.FindProperty("seeThroughTextureUVSpace"); + seeThroughChildrenSortingMode = serializedObject.FindProperty("seeThroughChildrenSortingMode"); + + targetFX = serializedObject.FindProperty("targetFX"); + targetFXTexture = serializedObject.FindProperty("targetFXTexture"); + targetFXRotationSpeed = serializedObject.FindProperty("targetFXRotationSpeed"); + targetFXInitialScale = serializedObject.FindProperty("targetFXInitialScale"); + targetFXEndScale = serializedObject.FindProperty("targetFXEndScale"); + targetFXScaleToRenderBounds = serializedObject.FindProperty("targetFXScaleToRenderBounds"); + targetFXUseEnclosingBounds = serializedObject.FindProperty("targetFXUseEnclosingBounds"); + targetFXOffset = serializedObject.FindProperty("targetFXOffset"); + 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"); + + iconFX = serializedObject.FindProperty("iconFX"); + iconFXCenter = serializedObject.FindProperty("iconFXCenter"); + iconFXMesh = serializedObject.FindProperty("iconFXMesh"); + iconFXLightColor = serializedObject.FindProperty("iconFXLightColor"); + iconFXDarkColor = serializedObject.FindProperty("iconFXDarkColor"); + iconFXRotationSpeed = serializedObject.FindProperty("iconFXRotationSpeed"); + iconFXAnimationOption = serializedObject.FindProperty("iconFXAnimationOption"); + iconFXAnimationAmount = serializedObject.FindProperty("iconFXAnimationAmount"); + iconFXAnimationSpeed = serializedObject.FindProperty("iconFXAnimationSpeed"); + iconFXScale = serializedObject.FindProperty("iconFXScale"); + iconFXScaleToRenderBounds = serializedObject.FindProperty("iconFXScaleToRenderBounds"); + iconFXOffset = serializedObject.FindProperty("iconFXOffset"); + iconFXTransitionDuration = serializedObject.FindProperty("iconFXTransitionDuration"); + iconFXStayDuration = serializedObject.FindProperty("iconFXStayDuration"); + + 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(); + + bool isMeshObject = !thisEffect.spriteMode; + + 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); + + if (isMeshObject) { + EditorGUILayout.PropertyField(normalsOption); + } + EditorGUILayout.PropertyField(optimizeSkinnedMesh); + if (isMeshObject || optimizeSkinnedMesh.boolValue) { + 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 (!isMeshObject) { + GUILayout.Label(new GUIContent("SPRITE MODE", "Highlight Effect over sprites. Some effects are not available in sprite mode"), EditorStyles.centeredGreyMiniLabel); + } + 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) { + 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")); + if (effectNameUseRegEx.boolValue && !string.IsNullOrEmpty(thisEffect.lastRegExError)) { + EditorGUILayout.HelpBox(thisEffect.lastRegExError, MessageType.Error); + } + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(effectNameUseRegEx, new GUIContent("Use Regular Expressions", "If enabled, the Object Name Filter is a regular expression.")); + if (effectNameUseRegEx.boolValue) { + if (GUILayout.Button("Help", GUILayout.Width(50))) { + if (EditorUtility.DisplayDialog("Regular Expressions", "Check the online Microsoft documentation for regular expressions syntax. You can also use ChatGPT to obtain regular expressions patterns. Some examples:\n^[^A].* will match any name not starting with an A\n.*[^\\d]$ matches any name not ending in a number.", "Online Reference", "Close")) { + Application.OpenURL("https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference"); + } + } + } + EditorGUILayout.EndHorizontal(); + if (isMeshObject) { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(combineMeshes); + if (combineMeshes.boolValue) { + if (GUILayout.Button("Refresh", GUILayout.Width(70))) { + thisEffect.Refresh(true); + } + } + EditorGUILayout.EndHorizontal(); + } + EditorGUILayout.PropertyField(effectTarget, new GUIContent("Target", "The target object where the include option applies. By default, this same object.")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(alphaCutOff, new GUIContent("Alpha Cut Off", "Only for semi-transparent objects. Leave this to zero for normal opaque objects.")); + if (isMeshObject) { + EditorGUILayout.PropertyField(cullBackFaces); + } + EditorGUILayout.PropertyField(padding); + 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) { + GUI.enabled = false; + } + EditorGUILayout.PropertyField(depthClip); + GUI.enabled = true; + if (usesHQEffects) { + 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.")); + if (!constantWidth.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(minimumWidth); + EditorGUI.indentLevel--; + } + } + if (isMeshObject) { + EditorGUILayout.PropertyField(subMeshMask); + 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++; + if (isMeshObject) { + 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(outlineEdgeMode, new GUIContent("Edges")); + if (outlineEdgeMode.intValue == (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineEdgeThreshold, new GUIContent("Edge Detection Threshold")); + } + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(outlineBlurPasses, new GUIContent("Blur Passes")); + EditorGUILayout.PropertyField(outlineSharpness, new GUIContent("Sharpness")); + } + else { + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColorStyle, new GUIContent("Color Style")); + switch ((ColorStyle)outlineColorStyle.intValue) { + case ColorStyle.SingleColor: + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + break; + case ColorStyle.Gradient: + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(outlineGradient, new GUIContent("Gradient")); + EditorGUILayout.PropertyField(outlineGradientInLocalSpace, new GUIContent("In Local Space")); + EditorGUI.indentLevel--; + break; + } + } + if (outlineQuality.intValue == (int)QualityLevel.Highest && outlineEdgeMode.intValue != (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling")); + } + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + 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); + } + EditorGUILayout.PropertyField(extraCoveragePixels); + EditorGUI.indentLevel--; + } + } + + GUI.enabled = outlineQuality.intValue != (int)QualityLevel.Highest || CheckForwardMSAA(outlineVisibility.intValue == (int)Visibility.OnlyWhenOccluded); + 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++; + if (isMeshObject) { + 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(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(glowHQColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(glowBlurMethod, new GUIContent("Blur Method", "Gaussian: better quality. Kawase: faster.")); + EditorGUILayout.PropertyField(glowDownsampling, new GUIContent("Downsampling")); + 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); + } + EditorGUILayout.PropertyField(extraCoveragePixels); + EditorGUI.indentLevel--; + } + GUI.enabled = glowQuality.intValue != (int)QualityLevel.Highest || CheckForwardMSAA(glowVisibility.intValue == (int)Visibility.OnlyWhenOccluded); + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + EditorGUILayout.PropertyField(glowBlendMode, new GUIContent("Blend Mode")); + GUI.enabled = true; + } + else { + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + GUI.enabled = glowQuality.intValue != (int)QualityLevel.Highest || CheckForwardMSAA(false); + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + GUI.enabled = true; + EditorGUILayout.PropertyField(glowDithering, new GUIContent("Dithering")); + if (glowDithering.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(glowDitheringStyle, new GUIContent("Style")); + if (glowDitheringStyle.intValue == (int)GlowDitheringStyle.Pattern) { + 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(); + + if (isMeshObject) { + 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(innerGlowBlendMode, new GUIContent("Blend Mode")); + 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(overlayMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField(overlayColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(overlayTexture, new GUIContent("Texture")); + if (overlayTexture.objectReferenceValue != null) { + EditorGUILayout.PropertyField(overlayTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(overlayTextureScale, new GUIContent("Texture Scale")); + if ((TextureUVSpace)overlayTextureUVSpace.intValue != TextureUVSpace.Triplanar) { + EditorGUILayout.PropertyField(overlayTextureScrolling, new GUIContent("Texture Scrolling")); + } + } + EditorGUILayout.PropertyField(overlayBlending, new GUIContent("Blending")); + EditorGUILayout.PropertyField(overlayMinIntensity, new GUIContent("Min Intensity")); + EditorGUILayout.PropertyField(overlayAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(overlayVisibility, new GUIContent("Visibility")); + 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(targetFXUseEnclosingBounds, new GUIContent("Use Enclosing Bounds")); + if (!targetFXUseEnclosingBounds.boolValue) { + 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(targetFXOffset, new GUIContent("Offset")); + 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); + DrawSectionField(iconFX, "Icon", iconFX.boolValue); + if (iconFX.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(iconFXMesh, new GUIContent("Mesh")); + EditorGUILayout.PropertyField(iconFXLightColor, new GUIContent("Light Color")); + EditorGUILayout.PropertyField(iconFXDarkColor, new GUIContent("Dark Color")); + EditorGUILayout.PropertyField(iconFXCenter, new GUIContent("Center", "Optionally assign a transform. Icon will follow transform. If the object is skinned, you can also assign a bone to reflect currenct animation position.")); + EditorGUILayout.PropertyField(iconFXOffset, new GUIContent("Offset")); + EditorGUILayout.PropertyField(iconFXRotationSpeed, new GUIContent("Rotation Speed")); + EditorGUILayout.PropertyField(iconFXAnimationOption, new GUIContent("Animation")); + if (iconFXAnimationOption.intValue != 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(iconFXAnimationAmount, new GUIContent("Amount")); + EditorGUILayout.PropertyField(iconFXAnimationSpeed, new GUIContent("Speed")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(iconFXScale, new GUIContent("Scale")); + EditorGUILayout.PropertyField(iconFXScaleToRenderBounds, new GUIContent("Scale To Object Bounds")); + EditorGUILayout.PropertyField(iconFXTransitionDuration, new GUIContent("Transition Duration")); + EditorGUILayout.PropertyField(iconFXStayDuration, new GUIContent("Stay Duration")); + EditorGUI.indentLevel--; + } + EditorGUILayout.EndVertical(); + + if (isMeshObject) { + + 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; + h.GetOccluders(Camera.main, occluders); + 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(seeThroughTexture, new GUIContent("Texture")); + if (seeThroughTexture.objectReferenceValue != null) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(seeThroughTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(seeThroughTextureScale, new GUIContent("Texture Scale")); + EditorGUI.indentLevel--; + } + 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(seeThroughChildrenSortingMode, new GUIContent("Children Sorting Mode")); + 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")); + } + + 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--; + } + EditorGUI.indentLevel--; + } + + EditorGUILayout.EndVertical(); + + + if (serializedObject.ApplyModifiedProperties() || profileChanged || Event.current.commandName == "UndoRedoPerformed") { + if (thisEffect.profile != null) { + if (profileChanged) { + EditorUtility.SetDirty(target); + thisEffect.profile.Load(thisEffect); + profileChanged = false; + enableProfileApply = false; + } + else { + enableProfileApply = true; + } + } + + foreach (HighlightEffect effect in targets) { + effect.Refresh(); + effect.ResetHighlightStartTime(); + } + } + } + + 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 (bool alwaysWhenOccluded) { + if (QualitySettings.antiAliasing > 1) { + if (Camera.main != null && Camera.main.allowMSAA) { + if (alwaysWhenOccluded) { + EditorGUILayout.HelpBox("Visibility 'Always When Occluded' may not work with MSAA. You may need to disable MSAA in Quality Settings OR choose a different quality level.", MessageType.Info); + } + else if (!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(); + 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(); + 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 + + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Editor/HighlightEffectEditor.cs.meta b/Assets/HighlightPlus/Editor/HighlightEffectEditor.cs.meta new file mode 100644 index 0000000..7bceb10 --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightEffectEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: be287539f47634552a716f0705710448 +timeCreated: 1542886545 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor/HighlightManagerEditor.cs b/Assets/HighlightPlus/Editor/HighlightManagerEditor.cs new file mode 100644 index 0000000..02efb89 --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightManagerEditor.cs @@ -0,0 +1,71 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + [CustomEditor(typeof(HighlightManager))] + public class HighlightManagerEditor : UnityEditor.Editor { + + SerializedProperty highlightOnHover, layerMask, raycastCamera, raycastSource, minDistance, maxDistance, respectUI; + SerializedProperty selectOnClick, selectedProfile, selectedAndHighlightedProfile, singleSelection, toggleOnClick, keepSelection; + + 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"); + keepSelection = serializedObject.FindProperty("keepSelection"); + } + + 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); + EditorGUILayout.PropertyField(keepSelection); + EditorGUI.indentLevel--; + } + + serializedObject.ApplyModifiedProperties(); + } + + + [MenuItem("GameObject/Effects/Highlight Plus/Create Highlight Manager", false, 10)] + static void CreateManager(MenuCommand menuCommand) { + HighlightManager manager = Misc.FindObjectOfType(); + if (manager == null) { + GameObject managerGO = new GameObject("HighlightPlusManager"); + manager = managerGO.AddComponent(); + // Register root object for undo. + Undo.RegisterCreatedObjectUndo(manager, "Create Highlight Plus Manager"); + } + Selection.activeObject = manager; + } + + } + +} diff --git a/Assets/HighlightPlus/Editor/HighlightManagerEditor.cs.meta b/Assets/HighlightPlus/Editor/HighlightManagerEditor.cs.meta new file mode 100644 index 0000000..54195ce --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightManagerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ace58d1d278d649c98e5a2b5a066b3cd +timeCreated: 1548711355 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor/HighlightProfileEditor.cs b/Assets/HighlightPlus/Editor/HighlightProfileEditor.cs new file mode 100644 index 0000000..149088a --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightProfileEditor.cs @@ -0,0 +1,464 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightProfile))] + [CanEditMultipleObjects] + public class HighlightProfileEditor : UnityEditor.Editor { + + SerializedProperty effectGroup, effectGroupLayer, effectNameFilter, effectNameUseRegEx, combineMeshes, alphaCutOff, cullBackFaces, padding, depthClip, normalsOption; + SerializedProperty overlay, overlayMode, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayTexture, overlayTextureScale, overlayTextureScrolling, overlayTextureUVSpace, overlayBlending, overlayVisibility; + SerializedProperty fadeInDuration, fadeOutDuration, constantWidth, minimumWidth, extraCoveragePixels; + SerializedProperty outline, outlineColor, outlineColorStyle, outlineGradient, outlineGradientInLocalSpace, outlineWidth, outlineBlurPasses, outlineQuality, outlineEdgeMode, outlineEdgeThreshold, outlineDownsampling, outlineOptimalBlit, outlineVisibility, outlineIndependent, outlineContourStyle, outlineSharpness; + SerializedProperty glow, glowWidth, glowQuality, glowBlurMethod, glowOptimalBlit, glowDownsampling, glowHQColor, glowDithering, glowDitheringStyle, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed, glowVisibility, glowBlendMode, glowBlendPasses, glowPasses, glowIgnoreMask; + SerializedProperty innerGlow, innerGlowWidth, innerGlowColor, innerGlowBlendMode, innerGlowVisibility; + SerializedProperty targetFX, targetFXTexture, targetFXColor, targetFXRotationSpeed, targetFXInitialScale, targetFXEndScale, targetFXScaleToRenderBounds, targetFXUseEnclosingBounds, targetFXOffset; + SerializedProperty targetFXAlignToGround, targetFXFadePower, targetFXGroundMaxDistance, targetFXGroundLayerMask, targetFXTransitionDuration, targetFXStayDuration, targetFXVisibility; + SerializedProperty iconFX, iconFXMesh, iconFXLightColor, iconFXDarkColor, iconFXRotationSpeed, iconFXAnimationOption, iconFXAnimationAmount, iconFXAnimationSpeed, iconFXScale, iconFXScaleToRenderBounds, iconFXOffset, iconFXTransitionDuration, iconFXStayDuration; + SerializedProperty seeThrough, seeThroughOccluderMask, seeThroughOccluderMaskAccurate, seeThroughOccluderThreshold, seeThroughOccluderCheckInterval, seeThroughOccluderCheckIndividualObjects, seeThroughDepthOffset, seeThroughMaxDepth; + SerializedProperty seeThroughIntensity, seeThroughTintAlpha, seeThroughTintColor, seeThroughNoise, seeThroughBorder, seeThroughBorderWidth, seeThroughBorderColor, seeThroughOrdered, seeThroughBorderOnly, seeThroughTexture, seeThroughTextureUVSpace, seeThroughTextureScale, seeThroughChildrenSortingMode; + SerializedProperty hitFxInitialIntensity, hitFxMode, hitFxFadeOutDuration, hitFxColor, hitFxRadius; + SerializedProperty cameraDistanceFade, cameraDistanceFadeNear, cameraDistanceFadeFar; + + void OnEnable () { + effectGroup = serializedObject.FindProperty("effectGroup"); + effectGroupLayer = serializedObject.FindProperty("effectGroupLayer"); + effectNameFilter = serializedObject.FindProperty("effectNameFilter"); + effectNameUseRegEx = serializedObject.FindProperty("effectNameUseRegEx"); + combineMeshes = serializedObject.FindProperty("combineMeshes"); + alphaCutOff = serializedObject.FindProperty("alphaCutOff"); + cullBackFaces = serializedObject.FindProperty("cullBackFaces"); + padding = serializedObject.FindProperty("padding"); + depthClip = serializedObject.FindProperty("depthClip"); + normalsOption = serializedObject.FindProperty("normalsOption"); + fadeInDuration = serializedObject.FindProperty("fadeInDuration"); + fadeOutDuration = serializedObject.FindProperty("fadeOutDuration"); + constantWidth = serializedObject.FindProperty("constantWidth"); + extraCoveragePixels = serializedObject.FindProperty("extraCoveragePixels"); + minimumWidth = serializedObject.FindProperty("minimumWidth"); + + overlay = serializedObject.FindProperty("overlay"); + overlayMode = serializedObject.FindProperty("overlayMode"); + overlayColor = serializedObject.FindProperty("overlayColor"); + overlayAnimationSpeed = serializedObject.FindProperty("overlayAnimationSpeed"); + overlayMinIntensity = serializedObject.FindProperty("overlayMinIntensity"); + overlayBlending = serializedObject.FindProperty("overlayBlending"); + overlayVisibility = serializedObject.FindProperty("overlayVisibility"); + overlayTexture = serializedObject.FindProperty("overlayTexture"); + overlayTextureUVSpace = serializedObject.FindProperty("overlayTextureUVSpace"); + overlayTextureScale = serializedObject.FindProperty("overlayTextureScale"); + overlayTextureScrolling = serializedObject.FindProperty("overlayTextureScrolling"); + + outline = serializedObject.FindProperty("outline"); + outlineColor = serializedObject.FindProperty("outlineColor"); + outlineColorStyle = serializedObject.FindProperty("outlineColorStyle"); + outlineGradient = serializedObject.FindProperty("outlineGradient"); + outlineGradientInLocalSpace = serializedObject.FindProperty("outlineGradientInLocalSpace"); + outlineWidth = serializedObject.FindProperty("outlineWidth"); + outlineBlurPasses = serializedObject.FindProperty("outlineBlurPasses"); + outlineQuality = serializedObject.FindProperty("outlineQuality"); + outlineEdgeMode = serializedObject.FindProperty("outlineEdgeMode"); + outlineEdgeThreshold = serializedObject.FindProperty("outlineEdgeThreshold"); + outlineOptimalBlit = serializedObject.FindProperty("outlineOptimalBlit"); + outlineDownsampling = serializedObject.FindProperty("outlineDownsampling"); + outlineVisibility = serializedObject.FindProperty("outlineVisibility"); + outlineIndependent = serializedObject.FindProperty("outlineIndependent"); + outlineContourStyle = serializedObject.FindProperty("outlineContourStyle"); + outlineSharpness = serializedObject.FindProperty("outlineSharpness"); + + glow = serializedObject.FindProperty("glow"); + glowWidth = serializedObject.FindProperty("glowWidth"); + glowQuality = serializedObject.FindProperty("glowQuality"); + glowOptimalBlit = serializedObject.FindProperty("glowOptimalBlit"); + glowBlurMethod = serializedObject.FindProperty("glowBlurMethod"); + glowDownsampling = serializedObject.FindProperty("glowDownsampling"); + glowHQColor = serializedObject.FindProperty("glowHQColor"); + glowAnimationSpeed = serializedObject.FindProperty("glowAnimationSpeed"); + glowDithering = serializedObject.FindProperty("glowDithering"); + glowDitheringStyle = serializedObject.FindProperty("glowDitheringStyle"); + 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"); + innerGlowBlendMode = serializedObject.FindProperty("innerGlowBlendMode"); + 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"); + targetFXUseEnclosingBounds = serializedObject.FindProperty("targetFXUseEnclosingBounds"); + targetFXOffset = serializedObject.FindProperty("targetFXOffset"); + 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"); + + iconFX = serializedObject.FindProperty("iconFX"); + iconFXMesh = serializedObject.FindProperty("iconFXMesh"); + iconFXLightColor = serializedObject.FindProperty("iconFXLightColor"); + iconFXDarkColor = serializedObject.FindProperty("iconFXDarkColor"); + iconFXRotationSpeed = serializedObject.FindProperty("iconFXRotationSpeed"); + iconFXAnimationOption = serializedObject.FindProperty("iconFXAnimationOption"); + iconFXAnimationAmount = serializedObject.FindProperty("iconFXAnimationAmount"); + iconFXAnimationSpeed = serializedObject.FindProperty("iconFXAnimationSpeed"); + iconFXScale = serializedObject.FindProperty("iconFXScale"); + iconFXScaleToRenderBounds = serializedObject.FindProperty("iconFXScaleToRenderBounds"); + iconFXOffset = serializedObject.FindProperty("iconFXOffset"); + iconFXTransitionDuration = serializedObject.FindProperty("iconFXTransitionDuration"); + iconFXStayDuration = serializedObject.FindProperty("iconFXStayDuration"); + + 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"); + seeThroughTexture = serializedObject.FindProperty("seeThroughTexture"); + seeThroughTextureScale = serializedObject.FindProperty("seeThroughTextureScale"); + seeThroughTextureUVSpace = serializedObject.FindProperty("seeThroughTextureUVSpace"); + seeThroughChildrenSortingMode = serializedObject.FindProperty("seeThroughChildrenSortingMode"); + + 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(effectNameUseRegEx, new GUIContent("Use Regular Expressions")); + EditorGUILayout.PropertyField(combineMeshes); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(alphaCutOff); + EditorGUILayout.PropertyField(cullBackFaces); + EditorGUILayout.PropertyField(padding); + 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); + if (!constantWidth.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(minimumWidth); + EditorGUI.indentLevel--; + } + 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++; + HighlightEffectEditor.QualityPropertyField(outlineQuality); + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineEdgeMode, new GUIContent("Edges")); + if (outlineEdgeMode.intValue == (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineEdgeThreshold, new GUIContent("Edge Detection Threshold")); + } + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(outlineBlurPasses, new GUIContent("Blur Passes")); + EditorGUILayout.PropertyField(outlineSharpness, new GUIContent("Sharpness")); + } + else { + EditorGUILayout.PropertyField(outlineWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(outlineColorStyle, new GUIContent("Color Style")); + switch ((ColorStyle)outlineColorStyle.intValue) { + case ColorStyle.SingleColor: + EditorGUILayout.PropertyField(outlineColor, new GUIContent("Color")); + break; + case ColorStyle.Gradient: + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(outlineGradient, new GUIContent("Gradient")); + EditorGUILayout.PropertyField(outlineGradientInLocalSpace, new GUIContent("In Local Space")); + EditorGUI.indentLevel--; + break; + } + } + if (outlineQuality.intValue == (int)QualityLevel.Highest && outlineEdgeMode.intValue != (int)OutlineEdgeMode.Any) { + EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling")); + } + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + 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(extraCoveragePixels); + EditorGUI.indentLevel--; + } + } + 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++; + HighlightEffectEditor.QualityPropertyField(glowQuality); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineContourStyle, new GUIContent("Contour Style")); + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + EditorGUILayout.PropertyField(glowHQColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(glowBlurMethod, new GUIContent("Blur Method", "Gaussian: better quality. Kawase: faster.")); + EditorGUILayout.PropertyField(glowDownsampling, new GUIContent("Downsampling")); + 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(extraCoveragePixels); + EditorGUI.indentLevel--; + } + } + else { + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + } + 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.floatValue > 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(glowDitheringStyle, new GUIContent("Style")); + if (glowDitheringStyle.intValue == (int)GlowDitheringStyle.Pattern) { + 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(innerGlowBlendMode, new GUIContent("Blend Mode")); + 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(overlayMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField(overlayColor, new GUIContent("Color")); + EditorGUILayout.PropertyField(overlayTexture, new GUIContent("Texture")); + if (overlayTexture.objectReferenceValue != null) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(overlayTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(overlayTextureScale, new GUIContent("Texture Scale")); + if ((TextureUVSpace)overlayTextureUVSpace.intValue != TextureUVSpace.Triplanar) { + EditorGUILayout.PropertyField(overlayTextureScrolling, new GUIContent("Texture Scrolling")); + } + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(overlayBlending, new GUIContent("Blending")); + EditorGUILayout.PropertyField(overlayMinIntensity, new GUIContent("Min Intensity")); + EditorGUILayout.PropertyField(overlayAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(overlayVisibility, new GUIContent("Visibility")); + 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(targetFXUseEnclosingBounds, new GUIContent("Use Enclosing Bounds")); + EditorGUILayout.PropertyField(targetFXOffset, new GUIContent("Offset")); + 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); + DrawSectionField(iconFX, "Icon", iconFX.boolValue); + if (iconFX.boolValue) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(iconFXMesh, new GUIContent("Mesh")); + EditorGUILayout.PropertyField(iconFXLightColor, new GUIContent("Light Color")); + EditorGUILayout.PropertyField(iconFXDarkColor, new GUIContent("Dark Color")); + EditorGUILayout.PropertyField(iconFXOffset, new GUIContent("Offset")); + EditorGUILayout.PropertyField(iconFXRotationSpeed, new GUIContent("Rotation Speed")); + EditorGUILayout.PropertyField(iconFXAnimationOption, new GUIContent("Animation")); + if (iconFXAnimationOption.intValue != 0) { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(iconFXAnimationAmount, new GUIContent("Amount")); + EditorGUILayout.PropertyField(iconFXAnimationSpeed, new GUIContent("Speed")); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(iconFXScale, new GUIContent("Scale")); + EditorGUILayout.PropertyField(iconFXScaleToRenderBounds, new GUIContent("Scale To Object Bounds")); + EditorGUILayout.PropertyField(iconFXTransitionDuration, new GUIContent("Transition Duration")); + EditorGUILayout.PropertyField(iconFXStayDuration, new GUIContent("Stay Duration")); + 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(seeThroughTexture, new GUIContent("Texture")); + if (seeThroughTexture.objectReferenceValue != null) { + EditorGUILayout.PropertyField(seeThroughTextureUVSpace, new GUIContent("UV Space")); + EditorGUILayout.PropertyField(seeThroughTextureScale, new GUIContent("Texture Scale")); + } + 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(seeThroughChildrenSortingMode, new GUIContent("Children Sorting Mode")); + 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 = Misc.FindObjectsOfType(); + 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)); + } + + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Editor/HighlightProfileEditor.cs.meta b/Assets/HighlightPlus/Editor/HighlightProfileEditor.cs.meta new file mode 100644 index 0000000..ca1f349 --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightProfileEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b3b0e551d6f4f4f3987e8e5be2e89285 +timeCreated: 1542886545 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs b/Assets/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs new file mode 100644 index 0000000..53b604d --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs @@ -0,0 +1,33 @@ +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightSeeThroughOccluder))] + public class HighlightSeeThroughOccluderEditor : UnityEditor.Editor { + + SerializedProperty mode, detectionMethod; + + void OnEnable() { + mode = serializedObject.FindProperty("mode"); + detectionMethod = serializedObject.FindProperty("detectionMethod"); + } + + public override void OnInspectorGUI() { + + serializedObject.Update(); + + EditorGUILayout.PropertyField(mode); + if (mode.intValue == (int)OccluderMode.BlocksSeeThrough) { + EditorGUILayout.HelpBox("This object will occlude any see-through effect.", MessageType.Info); + EditorGUILayout.PropertyField(detectionMethod); + } else { + EditorGUILayout.HelpBox("This object will trigger see-through effect. Use only on objects that do not write to depth buffer normally, like sprites or transparent objects.", MessageType.Info); + } + + serializedObject.ApplyModifiedProperties(); + + } + } + +} diff --git a/Assets/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta b/Assets/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta new file mode 100644 index 0000000..c75b07a --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11e725ecbe4d74569b232e1a0d57efba +timeCreated: 1548711355 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor/HighlightTriggerEditor.cs b/Assets/HighlightPlus/Editor/HighlightTriggerEditor.cs new file mode 100644 index 0000000..f4a8d82 --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightTriggerEditor.cs @@ -0,0 +1,105 @@ +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + [CustomEditor(typeof(HighlightTrigger))] + public class HighlightTriggerEditor : UnityEditor.Editor { + + SerializedProperty highlightOnHover, triggerMode, raycastCamera, raycastSource, raycastLayerMask; + SerializedProperty minDistance, maxDistance, respectUI, volumeLayerMask; + SerializedProperty selectOnClick, selectedProfile, selectedAndHighlightedProfile, singleSelection, toggleOnClick, keepSelection; + HighlightTrigger trigger; + + void OnEnable() { + highlightOnHover = serializedObject.FindProperty("highlightOnHover"); + triggerMode = serializedObject.FindProperty("triggerMode"); + raycastCamera = serializedObject.FindProperty("raycastCamera"); + raycastSource = serializedObject.FindProperty("raycastSource"); + raycastLayerMask = serializedObject.FindProperty("raycastLayerMask"); + 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"); + keepSelection = serializedObject.FindProperty("keepSelection"); + trigger = (HighlightTrigger)target; + trigger.Init(); + } + + public override void OnInspectorGUI() { + + serializedObject.Update(); + + if (trigger.triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + if (!trigger.hasColliders && !trigger.hasColliders2D) { + 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() == null && trigger.GetComponent() == 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(raycastLayerMask); + 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); + if (trigger.triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(keepSelection); + if (EditorGUI.EndChangeCheck()) { + // Update all triggers + HighlightTrigger[] triggers = Misc.FindObjectsOfType(); + foreach(HighlightTrigger t in triggers) { + if (t.keepSelection != keepSelection.boolValue) { + t.keepSelection = keepSelection.boolValue; + EditorUtility.SetDirty(t); + } + } + } + } + EditorGUI.indentLevel--; + } + + if (serializedObject.ApplyModifiedProperties()) { + trigger.Init(); + } + } + + } + +} diff --git a/Assets/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta b/Assets/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta new file mode 100644 index 0000000..8ed2128 --- /dev/null +++ b/Assets/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eaf7f56fbcfa343efb5081d4309cb76b +timeCreated: 1548711355 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Editor/TransparentWithDepth.cs b/Assets/HighlightPlus/Editor/TransparentWithDepth.cs new file mode 100644 index 0000000..932f801 --- /dev/null +++ b/Assets/HighlightPlus/Editor/TransparentWithDepth.cs @@ -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 newMaterials = new List (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 newMaterials = new List(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 newMaterials = new List(); + 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(); + 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("HighlightPlus/HighlightPlusDepthWrite"); + if (bmDepthOnly == null) { + EditorUtility.DisplayDialog("Depth Support", "HighlightPlusDepthWrite material not found!", "Ok"); + return null; + } + } + + if (bmDepthClipping == null) { + bmDepthClipping = Resources.Load("HighlightPlus/HighlightPlusDepthClipComp"); + if (bmDepthClipping == null) { + EditorUtility.DisplayDialog("Depth Clipping Support", "HighlightPlusDepthClipComp material not found!", "Ok"); + return null; + } + } + + return renderer; + } + + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Editor/TransparentWithDepth.cs.meta b/Assets/HighlightPlus/Editor/TransparentWithDepth.cs.meta new file mode 100644 index 0000000..dcdeb20 --- /dev/null +++ b/Assets/HighlightPlus/Editor/TransparentWithDepth.cs.meta @@ -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: diff --git a/Assets/HighlightPlus/Editor/VRCheck.cs b/Assets/HighlightPlus/Editor/VRCheck.cs new file mode 100644 index 0000000..eccd899 --- /dev/null +++ b/Assets/HighlightPlus/Editor/VRCheck.cs @@ -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 displaysDescs = new List(); + static List displays = new List(); + + 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.GetSubsystems(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 + + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Editor/VRCheck.cs.meta b/Assets/HighlightPlus/Editor/VRCheck.cs.meta new file mode 100644 index 0000000..9ff75fa --- /dev/null +++ b/Assets/HighlightPlus/Editor/VRCheck.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e692cbce37dc14e29b436d0c876f45dc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/README.txt b/Assets/HighlightPlus/README.txt new file mode 100644 index 0000000..6a6aeea --- /dev/null +++ b/Assets/HighlightPlus/README.txt @@ -0,0 +1,569 @@ +************************************** +* 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 folder for detailed instructions: + +Have any question or issue? +* Support-Web: https://kronnect.com/support +* Support-Discord: https://discord.gg/EH2GMaM +* Email: contact@kronnect.com +* Twitter: @Kronnect + +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 +--------------- + +Version 22.1 +- Added "Target" option under Include +- Added "Extra Coverage Pixels" to avoid cuts when using cloth or vertex shaders that transform vertices positions + +Version 22.0.8 +- [Fix] Fixed see-through not rendering properly on flipped sprites + +Version 22.0.1 +- Added "Highlight Effect Blocker" component to cancel background outline/glow/overlay effects visible through transparent objects such as sprites + +Version 21.0 +- New effect: icon +- Improved "Combine Meshes" option which now supports meshes with 32 bit index format +- Added support for alpha clip to outline/glow in lower quality levels + +Version 12.3: +- Added "Padding" option: creates an empty space between the mesh and the objects +- Added "Minimum Width" option when constant width is disabled (affects outline/glow widths) +- OnObjectHighlightStart event no longer checks only once on a specific object +- API: added OnObjectHighlightStay to HighlightManager/HighlightTrigger event which can be used to cancel the highlight on the current object + +Version 12.2.1 +- See-through: improved Editor debug of occluders in non-accurate/collider based mode + +Version 12.2 +- Option to use RegEx for the Include Object Name Filter +- To avoid requiring the New Input System package, the "Old" input system is now used if "Both" option is enabled in Project Settings +- [Fix] Fixes for fast domain reload +- [Fix] Fixed: calling SelectObject while fading out from a previous UnSelectObject would fail + +Version 12.1 +- Added dithering style option to outer glow effect +- Added "use enclosing bounds" option to Target FX effect +- See-through border is now combined with multiple children + +Version 12.0 +- Upgraded to Unity 2021.3.16 +- Outline: added "Sharpness" property to control the bluriness of outline in Highest Quality mode +- API: added HighlightEffect.lastHighlighted and HighlightEffect.lastSelected static fields +- [Fix] API: fixes an issue with Unselect method of Highlight Plus manager + +Version 11.3 +- Overlay effect: added Texture Scrolling option for non-triplanar uv space mode. +- API: added "OnHighlightStateChange" event. This event triggers as soon as the highlight state changes, regardless of any fade in/out effect + +Version 11.2.2 +- [Fix] Fixed a Highlight Manager inspector issue + +Version 11.2.1 +- [Fix] Fixes for ordered see-through effect on Android + +Version 11.2 +- API: added HighlightEffect.useUnscaledTime option +- [Fix] Fixed fade out option issue with see-through effect + +Version 11.1 +- See-through: added "Children Sorting Mode" option +- [Fix] Fixed outline clipping issue in VR when near to camera + +Version 11.0.2 +- Added support for split screen cameras + +Version 11.0.1 +- [Fix] Fixed align to ground rendering issue on Android/iOS when MSAA is disabled + +Version 11.0 +- Outline improvements in highest quality mode +- Added Glow Blur Method option: Gaussian (higher quality, default) or Kawase (faster) +- Option to optimize skinned mesh data when using outline/outer glow with mesh-based rendering. Reduces draw calls significantly. + +Version 10.2.2 +- [Fix] Occluder system now ignores particle renderers + +Version 10.2 +- Added "Contour Style" option: 1) around visible parts, or 2) around object shape + +Version 10.1 +- Two outline edge modes are now available when Outline Quality is set to High, allowing to render interior edges +- Added "Inner Glow Blend Mode" option + +Version 10.0 +- Added support for sprites. Compatible effects: outline, glow, overlay, target and hit fx. +- Added "Overlay Visibility" option +- Fixes + +Version 9.6 +- Added new "UV Space" options to Overlay effect (now: triplanar, object space or screen space) +- Added mask texture and "UV Space" options to See-Through effect +- Camera Distance Fade now also affects the see-through effect + +Version 9.5 +- Outline: added Color Style property and new Gradient option +- Internal buffer for highest quality outline/glow format changed to R8 format to reduce memory and improve performance on mobile +- API: Refresh(discardCachedMeshes): added discardCachedMeshes optional parameter to force refresh of cached meshes (useful for combined meshes that have changed) + +Version 9.4 +- Highlight See Through Occluder: added mode for triggering the see-through offect on sprites and transparent objects +- [Fix] Fixed a problem on Quest 2 standalone when using with other render features (ie. Liquid Volume Pro 2 irregular topology) + +Version 9.3 +- Overlay: added "Mode" option (only when highlighted or always) +- Nested highlight effects are now included unless the 'Ignore' option is selected +- Cached meshes are now reconstructed when calling the Refresh() method + +Version 9.2 +- Improved shared mesh cache handling +- Improved see-through camera-layer based detection + +Version 9.1.2 +- [Fix] Fixed outline/glow distortion due to floating point math issues at distant positions from origin + +Version 9.1.1 +- Added support for Unity 2022 +- Added Layer Mask option to Highlight Trigger +- Added "Keep Selection" option in Highlight Manager and Highlight Trigger +- [Fix] Fixed a potential issue that could exceed the maximum 64k vertices when combining meshes + +Version 9.0 +- 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 diff --git a/Assets/HighlightPlus/README.txt.meta b/Assets/HighlightPlus/README.txt.meta new file mode 100644 index 0000000..66f5cba --- /dev/null +++ b/Assets/HighlightPlus/README.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53265a9967ed548efaf71f5807638781 +timeCreated: 1542901568 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources.meta b/Assets/HighlightPlus/Resources.meta new file mode 100644 index 0000000..7c6c2dc --- /dev/null +++ b/Assets/HighlightPlus/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3a476022645d74299b862c36d0daa1df +folderAsset: yes +timeCreated: 1542876301 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus.meta b/Assets/HighlightPlus/Resources/HighlightPlus.meta new file mode 100644 index 0000000..e3104c5 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6bd97436761b94109a0785ed6823647c +folderAsset: yes +timeCreated: 1542893576 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/CustomVertexTransform.cginc b/Assets/HighlightPlus/Resources/HighlightPlus/CustomVertexTransform.cginc new file mode 100644 index 0000000..e94e24a --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/CustomVertexTransform.cginc @@ -0,0 +1,22 @@ +#ifndef CUSTOM_VERTEX_TRANSFORM_INCLUDED +#define CUSTOM_VERTEX_TRANSFORM_INCLUDED + + +float GetEyeDepth(float rawDepth) { + float persp = LinearEyeDepth(rawDepth); + #if UNITY_REVERSED_Z + rawDepth = 1.0 - rawDepth; + #endif + float ortho = (_ProjectionParams.z - _ProjectionParams.y) * rawDepth + _ProjectionParams.y; + return lerp(persp,ortho,unity_OrthoParams.w); +} + + + +float4 ComputeVertexPosition(float4 v) { + // Add here any custom vertex transform + float4 pos = UnityObjectToClipPos(v); + return pos; +} + +#endif diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/CustomVertexTransform.cginc.meta b/Assets/HighlightPlus/Resources/HighlightPlus/CustomVertexTransform.cginc.meta new file mode 100644 index 0000000..62d91ea --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/CustomVertexTransform.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e25b1281ec6724b028e33a5df5a3f266 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepth.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepth.shader new file mode 100644 index 0000000..835a34c --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepth.shader @@ -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 + } + } +} diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepth.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepth.shader.meta new file mode 100644 index 0000000..123e669 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepth.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 058a572e30b2d446bade2dda32bcef0f +timeCreated: 1515682635 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepthClip.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepthClip.shader new file mode 100644 index 0000000..a7961f2 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepthClip.shader @@ -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 + + } + + } + +} + diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepthClip.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepthClip.shader.meta new file mode 100644 index 0000000..ad6f592 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightAddDepthClip.shader.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0917f634da79a4983ad78bac83d5a715 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat new file mode 100644 index 0000000..89387f5 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2752029129534311206 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HighlightBlockerOutlineAndGlow + m_Shader: {fileID: 4800000, guid: f65ebd3db9df34222b24b0b7b2b752b2, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + 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} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ColorMask: 15 + - _Cull: 2 + - _CutOff: 0.5 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Stencil: 2 + - _StencilComp: 2 + - _StencilOp: 0 + - _StencilReadMask: 2 + - _StencilWriteMask: 2 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat.meta new file mode 100644 index 0000000..c28b132 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a245bcf45ae04d589af91cc3ae2cdee +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOverlay.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOverlay.mat new file mode 100644 index 0000000..8542278 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOverlay.mat @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2752029129534311206 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HighlightBlockerOverlay + m_Shader: {fileID: 4800000, guid: f65ebd3db9df34222b24b0b7b2b752b2, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + 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} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ColorMask: 15 + - _Cull: 2 + - _CutOff: 0.5 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Stencil: 4 + - _StencilComp: 2 + - _StencilOp: 0 + - _StencilReadMask: 4 + - _StencilWriteMask: 4 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOverlay.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOverlay.mat.meta new file mode 100644 index 0000000..2c49c9c --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlockerOverlay.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a619b1dea405b4fbfaa0db42e87b8968 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurGlow.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurGlow.shader new file mode 100644 index 0000000..18636bf --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurGlow.shader @@ -0,0 +1,195 @@ +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; + float _ResampleScale; + + 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 vertCrossKawase(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 + _MainTex_TexelSize.xy * 0.5; + + float animatedWidth = _BlurScale * _ResampleScale * (0.75 + 0.25 * sin(_Time.w * _Speed)); + float3 offsets = _MainTex_TexelSize.xyx * float3(1,1,-1) * animatedWidth; + 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 { + Name "Gaussian Blur Horizontal" + CGPROGRAM + #pragma vertex vertBlurH + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Gaussian Blur Vertical" + CGPROGRAM + #pragma vertex vertBlurV + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Copy Resample" + CGPROGRAM + #pragma vertex vertCross + #pragma fragment fragResample + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Fast Blur" + CGPROGRAM + #pragma vertex vertCrossKawase + #pragma fragment fragResample + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurGlow.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurGlow.shader.meta new file mode 100644 index 0000000..365d4fc --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 84c84ee93ec484bdda371ffbdebfcc7c +timeCreated: 1556874239 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurOutline.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurOutline.shader new file mode 100644 index 0000000..5319633 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurOutline.shader @@ -0,0 +1,180 @@ +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 + _BlurScaleFirstHoriz("Blur Scale First Horiz", Float) = 4 +} + 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; + float _BlurScaleFirstHoriz; + 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 vertBlur(appdata v, float multiplier) { + 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 * multiplier, 0); + o.uv1 = v.texcoord - inc; + o.uv2 = v.texcoord + inc; + float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * multiplier, 0); + o.uv3 = v.texcoord - inc2; + o.uv4 = v.texcoord + inc2; + return o; + } + + v2fCross vertBlurH(appdata v) { + return vertBlur(v, _BlurScale); + } + + v2fCross vertBlurH2(appdata v) { + return vertBlur(v, _BlurScaleFirstHoriz); + } + + + 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 { + Name "Blur Horizontal" + CGPROGRAM + #pragma vertex vertBlurH + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Blur Vertical" + CGPROGRAM + #pragma vertex vertBlurV + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Resample" + CGPROGRAM + #pragma vertex vertCross + #pragma fragment fragResample + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + Pass { + Name "Blur Horizontalx2" + CGPROGRAM + #pragma vertex vertBlurH2 + #pragma fragment fragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #pragma target 3.0 + ENDCG + } + + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurOutline.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurOutline.shader.meta new file mode 100644 index 0000000..93ce1e8 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightBlurOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 74f3491dcf1224f0c91238381c035439 +timeCreated: 1556874239 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightClearStencil.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightClearStencil.shader new file mode 100644 index 0000000..99cc59e --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightClearStencil.shader @@ -0,0 +1,97 @@ +Shader "HighlightPlus/ClearStencil" +{ + Properties + { + } + SubShader + { + Stencil { + Ref 8 // bit 8 is used by HighlightUIMask shader to prevent Clear Stencil passes + Comp NotEqual + Pass zero + ReadMask 8 + WriteMask 6 + } + 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 + } + } +} diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightClearStencil.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightClearStencil.shader.meta new file mode 100644 index 0000000..d7237e9 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightClearStencil.shader.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 632d26701d1f14d9ab2950021e6fed87 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeGlow.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeGlow.shader new file mode 100644 index 0000000..28964aa --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeGlow.shader @@ -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 Always // [_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 + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeGlow.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeGlow.shader.meta new file mode 100644 index 0000000..685907e --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 975a91ee935da4d9c8a3e807fecd8047 +timeCreated: 1544699251 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeOutline.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeOutline.shader new file mode 100644 index 0000000..b4e2cdf --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeOutline.shader @@ -0,0 +1,163 @@ +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) + _OutlineStencilComp("Stencil Comp", Int) = 6 + _OutlineSharpness("Outline Sharpness", Float) = 1.0 +} +SubShader + { + Tags { "Queue" = "Transparent+120" "RenderType" = "Transparent" } + Blend SrcAlpha OneMinusSrcAlpha + + // Compose effect on camera target (optimal quad blit) + Pass + { + ZWrite Off + ZTest Always // [_ZTest] + Cull Off // [_Cull] + Stencil { + Ref 2 + Comp [_OutlineStencilComp] + Pass keep + ReadMask 2 + WriteMask 2 + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal); + + fixed4 _Color; + float3 _Flip; + fixed4 _Debug; + fixed _OutlineSharpness; + #if HP_ALL_EDGES + #define OUTLINE_SOURCE outline.g + #else + #define OUTLINE_SOURCE outline.r + #endif + + 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_SOURCE; + color += _Debug; + color.a = saturate(color.a); + color.a = pow(color.a, _OutlineSharpness); + + return color; + } + ENDCG + } + + // Compose effect on camera target (full-screen blit) + Pass + { + ZWrite Off + ZTest Always // [_ZTest] + Cull Off // [_Cull] + Stencil { + Ref 2 + Comp [_OutlineStencilComp] + Pass keep + ReadMask 2 + WriteMask 2 + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); + float4 _MainTex_ST; + fixed4 _Color; + float3 _Flip; + fixed _OutlineSharpness; + #if HP_ALL_EDGES + #define OUTLINE_SOURCE outline.g + #else + #define OUTLINE_SOURCE outline.r + #endif + + 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_SOURCE; + color = saturate(color); + color.a = pow(color.a, _OutlineSharpness); + return color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeOutline.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeOutline.shader.meta new file mode 100644 index 0000000..8d27750 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightComposeOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a6de74b6cfa9440182f8f56e4a0e4f1 +timeCreated: 1544699251 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.mat new file mode 100644 index 0000000..0bc042c --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.mat @@ -0,0 +1,93 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + 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_ValidKeywords: [] + m_InvalidKeywords: [] + 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} + - _NoiseTex: + m_Texture: {fileID: 2800000, guid: 12319e92c3b5b45d193b1fe41ed05a1f, type: 3} + 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_Ints: [] + m_Floats: + - _BumpScale: 1 + - _ConstantWidth: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _GlowStencilComp: 6 + - _GlowStencilOp: 0 + - _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} + m_BuildTextureStacks: [] diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.mat.meta new file mode 100644 index 0000000..4565bca --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60e964940a24547a585c3ffff7e52e9b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.shader new file mode 100644 index 0000000..a9b1ae7 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.shader @@ -0,0 +1,144 @@ +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 + _CutOff("CutOff", Float ) = 0.5 + _ConstantWidth ("Constant Width", Float) = 1 + _MinimumWidth ("Minimum Width", Float) = 0 + _GlowZTest ("ZTest", Int) = 4 + _GlowStencilOp ("Stencil Operation", Int) = 0 + _GlowStencilComp ("Stencil Comp", Int) = 6 + _NoiseTex("Noise Tex", 2D) = "white" {} +} + 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 + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DITHER_BLUENOISE + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 norm : NORMAL; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + fixed4 color : COLOR; + float2 uv : TEXCOORD0; + 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, _MinimumWidth; + sampler2D _NoiseTex; + float4 _NoiseTex_TexelSize; + + fixed _CutOff; + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + + 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.norm * glowDirection.z; + float4 pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.norm); + 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]); + float minWidth = lerp(2, z, _MinimumWidth); + z = lerp(minWidth, z, _ConstantWidth); + 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; + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + + fixed4 color = i.color; + float4 glow = UNITY_ACCESS_INSTANCED_PROP(Props, _Glow); + + #if HP_DITHER_BLUENOISE + float2 noiseUV = i.pos.xy * _NoiseTex_TexelSize.xy; + fixed dither = tex2D(_NoiseTex, noiseUV).r; + color.a *= saturate( 1.0 - _Glow2.z * dither); + #else + float2 screenPos = floor( i.pos.xy * glow.z ) * glow.w; + fixed dither = frac(screenPos.x + screenPos.y); + color.a *= saturate(1.0 - _Glow2.z + dither); + #endif + + return color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.shader.meta new file mode 100644 index 0000000..fe91538 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 049d9e75e07674a78a703cf1203c07dd +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightIconFX.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightIconFX.shader new file mode 100644 index 0000000..50e59bf --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightIconFX.shader @@ -0,0 +1,69 @@ +Shader "HighlightPlus/Geometry/IconFX" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + _Color ("Color", Color) = (1,1,1,1) + _DarkColor ("Dark Color", Color) = (0.5, 0.5, 0.5,1) + } + + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Transparent" } + LOD 200 + + Pass + { + ZWrite Off + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + half4 _Color, _DarkColor; + + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 color : COLOR; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + float3 normal : TEXCOORD1; + float4 color : COLOR; + float2 uv : TEXCOORD0; + }; + + v2f vert (appdata v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.normal = UnityObjectToWorldNormal(v.normal); + o.color = v.color; + o.uv = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 finalColor = i.color; + + // Basic Lambertian reflection (diffuse lighting) + float3 lightDir = normalize(_WorldSpaceLightPos0.xyz); + float lambert = max(dot(i.normal, lightDir), 0); + + // Apply lighting to final color + finalColor = lerp(_DarkColor, _Color, lambert); + + return finalColor; + } + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightIconFX.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightIconFX.shader.meta new file mode 100644 index 0000000..7ca9909 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightIconFX.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0b9b648786a684052b473b5f5fe2ed2c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightInnerGlow.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightInnerGlow.shader new file mode 100644 index 0000000..ac0a1ca --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightInnerGlow.shader @@ -0,0 +1,97 @@ +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 + _InnerGlowBlendMode("Blend Mode", Int) = 1 +} + SubShader + { + Tags { "Queue"="Transparent+122" "RenderType"="Transparent" "DisableBatching"="True" } + + // Inner Glow + Pass + { + Stencil { + Ref 4 + ReadMask 4 + Comp NotEqual + Pass keep + } + Blend SrcAlpha [_InnerGlowBlendMode] + 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 norm : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 wpos : TEXCOORD1; + float3 norm : 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.norm = UnityObjectToWorldNormal(v.norm); + 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.norm)))) / _InnerGlowWidth; + fixed4 col = _InnerGlowColor * dx; + + return col; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightInnerGlow.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightInnerGlow.shader.meta new file mode 100644 index 0000000..5f67e27 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightInnerGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e5a069457bd344391acd5af227c0ce11 +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightMask.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightMask.shader new file mode 100644 index 0000000..e5e7b60 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightMask.shader @@ -0,0 +1,140 @@ +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 + _ZShift("ZShift", Float) = 0.0001 + _Padding("Padding", Float) = 0 +} + SubShader + { + Tags { "Queue"="Transparent+100" "RenderType"="Transparent" "DisableBatching"="True" } + + CGINCLUDE + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + float _ZShift; + float _Padding; + 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); + v.vertex.xyz *= 1.0 + _Padding; + 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 += _ZShift; + #else + o.pos.z -= _ZShift; + #endif + return o; + } + + + 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] + Offset -1, -1 // avoid issues on Quest 2 standalone when using with other render features (ie. Liquid Volume Pro 2 irregular topology) + + 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 + Offset -1, -1 // avoid issues on Quest 2 standalone when using with other render features (ie. Liquid Volume Pro 2 irregular topology) + + CGPROGRAM + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTHCLIP + #pragma vertex vert + #pragma fragment frag + ENDCG + } + + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightMask.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightMask.shader.meta new file mode 100644 index 0000000..b550df4 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e694fa934b6db4a00b8d4b9887115332 +timeCreated: 1544699251 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOccluder.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOccluder.shader new file mode 100644 index 0000000..dd5bdf3 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOccluder.shader @@ -0,0 +1,63 @@ +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 3 + WriteMask 3 + Comp always + Pass replace + } + 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 + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOccluder.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOccluder.shader.meta new file mode 100644 index 0000000..47ef424 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOccluder.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 229baf997355a43cda580dd4cf86b71e +timeCreated: 1544699251 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.mat new file mode 100644 index 0000000..0bdabcf --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.mat @@ -0,0 +1,83 @@ +%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: HighlightOutline + m_Shader: {fileID: 4800000, guid: cbbf740e9c8644e8492d08b1a3fd0203, 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 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _OutlineWidth: 0.01 + - _OutlineZTest: 4 + - _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} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineDirection: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.mat.meta new file mode 100644 index 0000000..499962b --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57729312cdd6d4eb685a81a3b0bf8a5b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.shader new file mode 100644 index 0000000..45a226a --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.shader @@ -0,0 +1,191 @@ +Shader "HighlightPlus/Geometry/Outline" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineWidth ("Outline Offset", Float) = 0.01 + _OutlineDirection("Outline Direction", Vector) = (0,0,0) + _OutlineGradientTex("Outline Gradient Tex", 2D) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _Cull ("Cull Mode", Int) = 2 + _CutOff("CutOff", Float ) = 0.5 + _ConstantWidth ("Constant Width", Float) = 1 + _MinimumWidth("Minimum Width", Float) = 0 + _OutlineZTest("ZTest", Int) = 4 +} + SubShader + { + Tags { "Queue"="Transparent+120" "RenderType"="Transparent" "DisableBatching"="True" } + + Pass + { + Name "Outline" + Stencil { + Ref 2 + Comp NotEqual + Pass replace + ReadMask 2 + WriteMask 2 + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite On + Cull [_Cull] + ZTest [_OutlineZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_OUTLINE_GRADIENT_WS HP_OUTLINE_GRADIENT_LS + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 norm : NORMAL; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + fixed yt : TEXCOORD1; + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed _CutOff; + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + + fixed4 _OutlineColor; + sampler2D _OutlineGradientTex; + + float _OutlineWidth; + float _ConstantWidth, _MinimumWidth; + float _OutlineVertexWidth; + fixed2 _OutlineVertexData; + + UNITY_INSTANCING_BUFFER_START(Props) + UNITY_DEFINE_INSTANCED_PROP(float4, _OutlineDirection) + UNITY_INSTANCING_BUFFER_END(Props) + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #if HP_OUTLINE_GRADIENT_WS + float posy = mul(unity_ObjectToWorld, v.vertex).y; + o.yt = saturate( (posy - _OutlineVertexData.x) / _OutlineVertexData.y); + #else + o.yt = saturate( (v.vertex.y - _OutlineVertexData.x) / _OutlineVertexData.y); + #endif + + v.vertex.xyz += v.norm * _OutlineVertexWidth; + o.pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.norm); + float2 offset = TransformViewToProjection(normalize(norm.xy)); + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z), 2.0, UNITY_MATRIX_P[3][3]); + float minWidth = lerp(2, z, _MinimumWidth); + z = lerp(minWidth, z, _ConstantWidth); + + float4 outlineDirection = UNITY_ACCESS_INSTANCED_PROP(Props, _OutlineDirection); + #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(SINGLE_PASS_STEREO) + outlineDirection.x *= 2.0; + #endif + o.pos.xy += offset * z * _OutlineWidth + outlineDirection.xy * z; + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + + fixed4 frag (v2f i) : SV_Target + { + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + #if HP_OUTLINE_GRADIENT_WS || HP_OUTLINE_GRADIENT_LS + half4 color = tex2D(_OutlineGradientTex, float2(i.yt, 0)); + color.a *= _OutlineColor.a; + #else + half4 color = _OutlineColor; + #endif + return color; + } + ENDCG + } + + Pass + { + Name "Outline Clear Stencil" + Stencil { + Ref 8 // bit 8 is used by HighlightUIMask shader to prevent Clear Stencil passes + Comp NotEqual + Pass zero + ReadMask 8 + WriteMask 6 + } + + ColorMask 0 + ZWrite Off + Cull [_Cull] + ZTest Always + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 norm : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed4 _OutlineColor; + float _OutlineWidth; + float2 _OutlineDirection; + float _ConstantWidth, _MinimumWidth; + float _OutlineVertexWidth; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + v.vertex.xyz += v.norm * _OutlineVertexWidth; + o.pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.norm); + float2 offset = TransformViewToProjection(normalize(norm.xy)); + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z), 2.0, UNITY_MATRIX_P[3][3]); + float minWidth = lerp(2, z, _MinimumWidth); + z = lerp(minWidth, z, _ConstantWidth); + o.pos.xy += offset * z * _OutlineWidth + _OutlineDirection * z; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.shader.meta new file mode 100644 index 0000000..c1e26d2 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cbbf740e9c8644e8492d08b1a3fd0203 +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOverlay.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOverlay.shader new file mode 100644 index 0000000..305d2c7 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOverlay.shader @@ -0,0 +1,149 @@ +Shader "HighlightPlus/Geometry/Overlay" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _OverlayColor ("Overlay Color", Color) = (1,1,1,1) + _OverlayBackColor ("Overlay Back Color", Color) = (1,1,1,1) + _OverlayData("Overlay Data", Vector) = (1,0.5,1,1) + _OverlayHitPosData("Overlay Hit Pos Data", Vector) = (0,0,0,0) + _OverlayHitStartTime("Overlay Hit Start Time", Float) = 0 + _OverlayTexture("Overlay Texture", 2D) = "white" {} + _CutOff("CutOff", Float ) = 0.5 + _Cull ("Cull Mode", Int) = 2 + _OverlayZTest("ZTest", Int) = 4 +} + SubShader + { + Tags { "Queue"="Transparent+121" "RenderType"="Transparent" "DisableBatching"="True" } + + // Overlay + Pass + { + Name "Overlay" + Stencil { + Ref 4 + ReadMask 4 + Comp NotEqual + Pass keep + } + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + Cull [_Cull] + Offset -1, -1 // avoid issues on Quest 2 standalone when using with other render features (ie. Liquid Volume Pro 2 irregular topology) + ZTest [_OverlayZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_TEXTURE_TRIPLANAR HP_TEXTURE_SCREENSPACE HP_TEXTURE_OBJECTSPACE + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + float3 norm : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 wpos : TEXCOORD1; + #if HP_TEXTURE_TRIPLANAR + float3 wnorm : TEXCOORD2; + #endif + #if HP_TEXTURE_SCREENSPACE + float4 scrPos : TEXCOORD3; + #endif + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed4 _OverlayColor; + sampler2D _MainTex; + float4 _MainTex_ST; + fixed4 _OverlayBackColor; + fixed4 _OverlayData; // x = speed, y = MinIntensity, z = blend, w = texture scale + float4 _OverlayHitPosData; + float _OverlayHitStartTime; + fixed _CutOff; + sampler2D _OverlayTexture; + float2 _OverlayTextureScrolling; + + 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 HP_TEXTURE_SCREENSPACE + o.scrPos = ComputeScreenPos(o.pos); + o.scrPos.x *= _ScreenParams.x / _ScreenParams.y; + #endif + #if UNITY_REVERSED_Z + o.pos.z += 0.0001; + #else + o.pos.z -= 0.0001; + #endif + o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz; + #if HP_TEXTURE_TRIPLANAR + o.wnorm = UnityObjectToWorldNormal(v.norm); + #endif + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 color = tex2D(_MainTex, i.uv); + #if HP_ALPHACLIP + clip(color.a - _CutOff); + #endif + float time = _Time.y % 1000; + fixed t = _OverlayData.y + (1.0 - _OverlayData.y) * 2.0 * abs(0.5 - frac(time * _OverlayData.x)); + fixed4 col = lerp(_OverlayColor, color * _OverlayBackColor * _OverlayColor, _OverlayData.z); + col.a *= t; + + if (_OverlayHitPosData.w>0) { + float elapsed = _Time.y - _OverlayHitStartTime; + float hitDist = distance(i.wpos, _OverlayHitPosData.xyz); + float atten = saturate( min(elapsed, _OverlayHitPosData.w) / hitDist ); + col.a *= atten; + } + + #if HP_TEXTURE_TRIPLANAR + half3 triblend = saturate(pow(i.wnorm, 4)); + triblend /= max(dot(triblend, half3(1,1,1)), 0.0001); + + // triplanar uvs + float3 tpos = i.wpos * _OverlayData.w; + float2 uvX = tpos.zy; + float2 uvY = tpos.xz; + float2 uvZ = tpos.xy; + + // albedo textures + fixed4 colX = tex2D(_OverlayTexture, uvX); + fixed4 colY = tex2D(_OverlayTexture, uvY); + fixed4 colZ = tex2D(_OverlayTexture, uvZ); + fixed4 tex = colX * triblend.x + colY * triblend.y + colZ * triblend.z; + col *= tex; + #elif HP_TEXTURE_SCREENSPACE + float2 uvOffset = _OverlayTextureScrolling * _Time.y; + col *= tex2D(_OverlayTexture, (i.scrPos.xy / i.scrPos.w) * _OverlayData.w + uvOffset); + #elif HP_TEXTURE_OBJECTSPACE + float2 uvOffset = _OverlayTextureScrolling * _Time.y; + col *= tex2D(_OverlayTexture, i.uv * _OverlayData.w + uvOffset); + #endif + + return col; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOverlay.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOverlay.shader.meta new file mode 100644 index 0000000..5560e90 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightOverlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d17a98d19ada34bb7b4f86130e590159 +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthClipComp.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthClipComp.mat new file mode 100644 index 0000000..2822c39 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthClipComp.mat @@ -0,0 +1,76 @@ +%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: HighlightPlusDepthClipComp + m_Shader: {fileID: 4800000, guid: 0917f634da79a4983ad78bac83d5a715, type: 3} + m_ShaderKeywords: + 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} + - _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 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _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} diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthClipComp.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthClipComp.mat.meta new file mode 100644 index 0000000..9399349 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthClipComp.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94aad838a87c54e1b89e9ef47ecad5bf +timeCreated: 1546857910 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthWrite.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthWrite.mat new file mode 100644 index 0000000..a13e488 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthWrite.mat @@ -0,0 +1,76 @@ +%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: HighlightPlusDepthWrite + m_Shader: {fileID: 4800000, guid: 058a572e30b2d446bade2dda32bcef0f, type: 3} + m_ShaderKeywords: + 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} + - _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 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _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} diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta new file mode 100644 index 0000000..c02afaf --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 825cb444e111842cf97788cbb7583edd +timeCreated: 1546857910 +licenseType: Pro +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughBorder.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughBorder.shader new file mode 100644 index 0000000..0c9f6e1 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughBorder.shader @@ -0,0 +1,131 @@ +Shader "HighlightPlus/Geometry/SeeThroughBorder" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _SeeThroughBorderColor ("Outline Color", Color) = (0,0,0,1) + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _SeeThroughBorderWidth ("Outline Offset", Float) = 0.01 + _SeeThroughBorderConstantWidth ("Constant Width", Float) = 1 + _SeeThroughBorderMinimumWidth("Minimum Width", Float) = 0 + _SeeThroughStencilRef ("Stencil Ref", Int) = 2 + _SeeThroughStencilComp ("Stencil Comp", Int) = 5 + _SeeThroughDepthOffset ("Depth Offset", Float) = 0 + _SeeThroughMaxDepth("Max Depth", Float) = 0 + _SeeThroughStencilPassOp ("Stencil Pass Operation", Int) = 0 + _SeeThroughOrdered("Ordered", Int) = 1 + _ZTest("ZTest", Int) = 4 + _Cull ("Cull Mode", Int) = 2 +} + SubShader + { + Tags { "Queue"="Transparent+201" "RenderType"="Transparent" "DisableBatching"="True" } + + Pass + { + Name "See-through border" + Stencil { + ReadMask 3 + WriteMask 3 + Ref [_SeeThroughStencilRef] + Comp [_SeeThroughStencilComp] + Pass [_SeeThroughStencilPassOp] + Fail [_SeeThroughStencilPassOp] + } + + ZTest [_ZTest] + ZWrite On + Blend SrcAlpha OneMinusSrcAlpha + Cull [_Cull] // default Cull Back improves glow in high quality) + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTH_OFFSET + + #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; + #if HP_DEPTH_OFFSET + float4 scrPos : TEXCOORD1; + float depth : TEXCOORD2; + #endif + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + fixed4 _SeeThroughBorderColor; + fixed _CutOff; + float _SeeThroughDepthOffset; + float _SeeThroughMaxDepth; + int _SeeThroughOrdered; + float _SeeThroughBorderWidth; + float _SeeThroughBorderConstantWidth, _SeeThroughBorderMinimumWidth; + fixed _HP_Fade; + + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + + 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 HP_DEPTH_OFFSET + o.scrPos = ComputeScreenPos(o.pos); + COMPUTE_EYEDEPTH(o.depth); + #endif + + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal); + float2 offset = any(norm.xy)!=0 ? TransformViewToProjection(normalize(norm.xy)) : 0.0.xx; + float z = lerp(UNITY_Z_0_FAR_FROM_CLIPSPACE(o.pos.z), 2.0, UNITY_MATRIX_P[3][3]); + float minWidth = lerp(2, z, _SeeThroughBorderMinimumWidth); + z = lerp(minWidth, z, _SeeThroughBorderConstantWidth); + + o.pos.xy += offset * z * _SeeThroughBorderWidth; + + #if UNITY_REVERSED_Z + o.pos.z -= 0.0001; + o.pos.z = _SeeThroughOrdered ? o.pos.w - (o.pos.w - o.pos.z) * 0.001 : o.pos.z; + #else + o.pos.z += 0.0001; + o.pos.z = _SeeThroughOrdered ? -o.pos.w + ( o.pos.z + o.pos.w ) * 0.001 : o.pos.z; + #endif + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_DEPTH_OFFSET + float sceneZ = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.scrPos.xy / i.scrPos.w); + float sceneDepth = GetEyeDepth(sceneZ); + if (i.depth - sceneDepth - _SeeThroughDepthOffset < 0 || i.depth - sceneDepth > _SeeThroughMaxDepth) discard; + #endif + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + fixed4 res = _SeeThroughBorderColor; + res.a *= _HP_Fade; + return res; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta new file mode 100644 index 0000000..3009623 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 47198bbf0b2a44882aceef6af17a467d +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughInner.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughInner.shader new file mode 100644 index 0000000..fb71fcc --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughInner.shader @@ -0,0 +1,177 @@ +Shader "HighlightPlus/Geometry/SeeThroughInner" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _SeeThrough ("See Through", Range(0,1)) = 0.8 + _SeeThroughTintColor ("See Through Tint Color", Color) = (1,0,0,0.8) + _SeeThroughNoise("Noise", Float) = 1 + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _CutOff("CutOff", Float ) = 0.5 + _SeeThroughStencilRef ("Stencil Ref", Int) = 2 + _SeeThroughStencilComp ("Stencil Comp", Int) = 5 + _SeeThroughStencilPassOp ("Stencil Pass Operation", Int) = 0 + _SeeThroughDepthOffset ("Depth Offset", Float) = 0 + _SeeThroughMaxDepth("Max Depth", Float) = 0 + _SeeThroughOrdered("Ordered", Int) = 1 + _SeeThroughTexture("Mask Texture", 2D) = "white" {} + _SeeThroughTextureScale("Mask Texture Scale", Float) = 1.0 + _ZTest("ZTest", Int) = 4 + _Cull ("Cull Mode", Int) = 2 +} + SubShader + { + Tags { "Queue"="Transparent+201" "RenderType"="Transparent" "DisableBatching"="True" } + + // See through effect + Pass + { + Name "See-through" + Stencil { + ReadMask 3 + WriteMask 3 + Ref [_SeeThroughStencilRef] + Comp [_SeeThroughStencilComp] + Pass [_SeeThroughStencilPassOp] + Fail [_SeeThroughStencilPassOp] + } + + ZTest [_ZTest] + ZWrite On // Needs to be on so see-through border do not overlap +// Cull Off + Blend SrcAlpha OneMinusSrcAlpha + Cull [_Cull] // default Cull Back improves glow in high quality) + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTH_OFFSET + #pragma multi_compile_local _ HP_SEETHROUGH_ONLY_BORDER + #pragma multi_compile_local _ HP_TEXTURE_TRIPLANAR HP_TEXTURE_SCREENSPACE HP_TEXTURE_OBJECTSPACE + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 norm : NORMAL; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + #if HP_DEPTH_OFFSET || HP_TEXTURE_SCREENSPACE + float4 scrPos : TEXCOORD1; + #endif + #if HP_DEPTH_OFFSET + float depth : TEXCOORD2; + #endif + float3 wpos : TEXCOORD3; + #if HP_TEXTURE_TRIPLANAR + float3 wnorm : TEXCOORD4; + #endif + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + fixed _SeeThrough; + fixed4 _SeeThroughTintColor; + fixed _CutOff; + fixed _SeeThroughNoise; + float _SeeThroughDepthOffset; + float _SeeThroughMaxDepth; + int _SeeThroughOrdered; + fixed _HP_Fade; + sampler2D _SeeThroughTexture; + fixed _SeeThroughTextureScale; + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + + 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 HP_DEPTH_OFFSET || HP_TEXTURE_SCREENSPACE + o.scrPos = ComputeScreenPos(o.pos); + #endif + #if HP_DEPTH_OFFSET + COMPUTE_EYEDEPTH(o.depth); + #endif + o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz; + #if HP_TEXTURE_TRIPLANAR + o.wnorm = UnityObjectToWorldNormal(v.norm); + #endif + #if UNITY_REVERSED_Z + o.pos.z -= 0.0001; + o.pos.z = _SeeThroughOrdered ? o.pos.w - (o.pos.w - o.pos.z) * 0.001 : o.pos.z; + #else + o.pos.z += 0.0001; + o.pos.z = _SeeThroughOrdered ? -o.pos.w + ( o.pos.z + o.pos.w ) * 0.001 : o.pos.z; + #endif + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + + fixed4 frag (v2f i) : SV_Target + { + #if HP_SEETHROUGH_ONLY_BORDER + return 0; + #else + + #if HP_DEPTH_OFFSET + float sceneZ = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.scrPos.xy / i.scrPos.w); + float sceneDepth = GetEyeDepth(sceneZ); + if (i.depth - sceneDepth - _SeeThroughDepthOffset < 0 || i.depth - sceneDepth > _SeeThroughMaxDepth) discard; + #endif + fixed4 col = tex2D(_MainTex, i.uv); + #if HP_ALPHACLIP + clip(col.a - _CutOff); + #endif + col.rgb = lerp(col.rgb, _SeeThroughTintColor.rgb, _SeeThroughTintColor.a); + float scry = i.pos.y; + float time = _Time.w % 1.0; + col.rgb += _SeeThroughNoise *(frac( scry * time ) * 0.1); + col.a = _SeeThrough; + col.a = lerp(col.a, col.a * ( (scry % 2) - 1.0 ), _SeeThroughNoise); + col.a *= _HP_Fade; + + #if HP_TEXTURE_TRIPLANAR + half3 triblend = saturate(pow(i.wnorm, 4)); + triblend /= max(dot(triblend, half3(1,1,1)), 0.0001); + + // triplanar uvs + float3 tpos = i.wpos * _SeeThroughTextureScale; + float2 uvX = tpos.zy; + float2 uvY = tpos.xz; + float2 uvZ = tpos.xy; + + // albedo textures + fixed4 colX = tex2D(_SeeThroughTexture, uvX); + fixed4 colY = tex2D(_SeeThroughTexture, uvY); + fixed4 colZ = tex2D(_SeeThroughTexture, uvZ); + fixed4 tex = colX * triblend.x + colY * triblend.y + colZ * triblend.z; + col *= tex; + #elif HP_TEXTURE_SCREENSPACE + float2 uv = (i.scrPos.xy / i.scrPos.w); + uv.x *= _ScreenParams.x / _ScreenParams.y; + col *= tex2D(_SeeThroughTexture, uv * _SeeThroughTextureScale); + #elif HP_TEXTURE_OBJECTSPACE + col *= tex2D(_SeeThroughTexture, i.uv * _SeeThroughTextureScale); + #endif + + return col; + + #endif // HP_ONLY_BORDER + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughInner.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughInner.shader.meta new file mode 100644 index 0000000..01f6f33 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughInner.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f5e95a6a4248649f7ac2ac6127ca0dd1 +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughMask.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughMask.shader new file mode 100644 index 0000000..ea0166b --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughMask.shader @@ -0,0 +1,61 @@ +Shader "HighlightPlus/Geometry/SeeThroughMask" { +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+201" "RenderType"="Transparent" "DisableBatching"="True" } + + // See through effect + Pass + { + Stencil { + WriteMask 3 + Ref 1 + Comp always + Pass replace + } + + ZTest Always + ZWrite Off + ColorMask 0 + + 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 + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta new file mode 100644 index 0000000..b9b1fec --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 05afe1e2da9484c1f9317f48d5edb58c +timeCreated: 1544699251 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSolidColor.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSolidColor.shader new file mode 100644 index 0000000..a4f27cd --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSolidColor.shader @@ -0,0 +1,131 @@ +Shader "HighlightPlus/Geometry/SolidColor" { +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 + _ZShift("ZShift", Float) = 0.0001 + _EdgeThreshold("Edge Threshold", Float) = 0.995 + _Padding("Padding", Float) = 0 +} + SubShader + { + Tags { "Queue"="Transparent+100" "RenderType"="Transparent" } + + // Compose effect on camera target + Pass + { + ZWrite Off + Cull [_Cull] + ZTest [_ZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTHCLIP + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + float _ZShift; + float _Padding; + fixed _CutOff; + fixed4 _Color; + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + float4 _CameraDepthTexture_TexelSize;; + float _EdgeThreshold; + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : TEXCOORD0; + float4 scrPos : TEXCOORD1; + #if HP_DEPTHCLIP + 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); + v.vertex.xyz *= 1.0 + _Padding; + o.pos = ComputeVertexPosition(v.vertex); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + o.scrPos = ComputeScreenPos(o.pos); + #if HP_DEPTHCLIP + COMPUTE_EYEDEPTH(o.depth); + #endif + #if UNITY_REVERSED_Z + o.pos.z += _ZShift; + #else + o.pos.z -= _ZShift; + #endif + return o; + } + + float3 GetNormal(float depth, float depth1, float depth2, float2 offset1, float2 offset2) { + float3 p1 = float3(offset1, depth1 - depth); + float3 p2 = float3(offset2, depth2 - depth); + float3 norm = cross(p1, p2); + return normalize(norm); + } + + fixed ComputeDepthOutline(float2 uv) { + float3 uvInc = float3(_CameraDepthTexture_TexelSize.x, _CameraDepthTexture_TexelSize.y, 0); + float depthS = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv - uvInc.zy)); + float depthW = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv - uvInc.xz)); + float depthE = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv + uvInc.xz)); + float depthN = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv + uvInc.zy)); + float depth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv)); + float3 normalNW = GetNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, 0)); + float3 normalSE = GetNormal(depth, depthS, depthE, float2(0, -uvInc.y), uvInc.xz); + float dnorm = dot(normalNW, normalSE); + fixed outline = (fixed)(dnorm < _EdgeThreshold); + return outline; + } + + + 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 + float2 uv = UnityStereoTransformScreenSpaceTex(i.scrPos.xy / i.scrPos.w); + #if HP_DEPTHCLIP + float sceneZ = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv); + float sceneDepth = GetEyeDepth(sceneZ); + clip(sceneDepth - i.depth * 0.999); + #endif + #if HP_ALL_EDGES + return fixed4(1.0, ComputeDepthOutline(uv), 1.0, 1.0); + #else + return fixed4(1.0, 1.0, 1.0, 1.0); + #endif + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSolidColor.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSolidColor.shader.meta new file mode 100644 index 0000000..9afd1bb --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightSolidColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 77643996218224478a471439e0ea5fb4 +timeCreated: 1544699251 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightTarget.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightTarget.shader new file mode 100644 index 0000000..5627cac --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightTarget.shader @@ -0,0 +1,201 @@ +Shader "HighlightPlus/Geometry/Target" { +Properties { + _MainTex ("Texture", 2D) = "white" {} + _Color ("Color", Color) = (1,1,1,1) + _ZTest ("ZTest", Int) = 0 +} + + SubShader + { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent-1" "DisableBatching" = "True" } + + Pass + { + Name "Target FX Decal" + Stencil { + Ref 2 + Comp NotEqual + ReadMask 2 + } + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ZTest [_ZTest] + Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #include "UnityCG.cginc" + + struct appdata + { + float4 positionOS : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 positionCS : SV_POSITION; + float4 screenPos : TEXCOORD0; + float4 rayVS : TEXCOORD1; + float3 camPosVS : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + half4 _Color; + float4 _TargetFXRenderData; + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + float4 _CameraDepthTexture_TexelSize; + + #define GROUND_NORMAL _TargetFXRenderData.xyz + #define FADE_POWER _TargetFXRenderData.w + + #define UNITY_MATRIX_I_M unity_WorldToObject + + v2f vert(appdata input) + { + v2f o; + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.positionCS = UnityObjectToClipPos(input.positionOS); + o.screenPos = ComputeScreenPos(o.positionCS); + + float3 viewRay = UnityObjectToViewPos(input.positionOS); + o.rayVS.w = viewRay.z; + float4x4 viewToObject = mul(UNITY_MATRIX_I_M, UNITY_MATRIX_I_V); + o.rayVS.xyz = mul((float3x3)viewToObject, -viewRay); + o.camPosVS = mul(viewToObject, float4(0,0,0,1)).xyz; + return o; + } + + float GetRawDepth(float2 uv) { + return UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, uv)); + } + + float3 ViewSpacePosAtScreenUV(float2 uv) { + float3 viewSpaceRay = mul(unity_CameraInvProjection, float4(uv * 2.0 - 1.0, 1.0, 1.0) * _ProjectionParams.z); + float rawDepth = GetRawDepth(uv); + return viewSpaceRay * Linear01Depth(rawDepth); + } + + float3 ViewSpacePosAtPixelPosition(float2 vpos) { + float2 uv = vpos * _CameraDepthTexture_TexelSize.xy; + return ViewSpacePosAtScreenUV(uv); + } + + half3 ViewNormalAtPixelPosition(float2 vpos) { + half3 viewSpacePos_c = ViewSpacePosAtPixelPosition(vpos + float2( 0.0, 0.0)); + half3 viewSpacePos_r = ViewSpacePosAtPixelPosition(vpos + float2( 1.0, 0.0)); + half3 viewSpacePos_u = ViewSpacePosAtPixelPosition(vpos + float2( 0.0, 1.0)); + + half3 hDeriv = viewSpacePos_r - viewSpacePos_c; + half3 vDeriv = viewSpacePos_u - viewSpacePos_c; + + half3 viewNormal = normalize(cross(hDeriv, vDeriv)); + + return viewNormal; + } + + + float3 GetWorldNormal(float2 uv) { + float2 ipos = uv * _CameraDepthTexture_TexelSize.zw; + half3 viewNormal = ViewNormalAtPixelPosition(ipos); + half3 normalWS = mul((float3x3)unity_MatrixInvV, viewNormal); + return normalWS; + } + + half4 frag(v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 screenUV = i.screenPos.xy / i.screenPos.w; + float depth = GetRawDepth(screenUV); + float3 decalPos; + if(unity_OrthoParams.w) { + #if defined(UNITY_REVERSED_Z) + depth = 1.0 - depth; + #endif + float sceneDepthVS = lerp(_ProjectionParams.y, _ProjectionParams.z, depth); + float2 rayVSEnd = float2(unity_OrthoParams.xy * (i.screenPos.xy - 0.5) * 2.0); + float4 posVS = float4(rayVSEnd, -sceneDepthVS, 1); + float3 wpos = mul(UNITY_MATRIX_I_V, posVS).xyz; + decalPos = mul(UNITY_MATRIX_I_M, float4(wpos, 1)).xyz; + } else { + float depthEye = LinearEyeDepth(depth); + decalPos = i.camPosVS + (i.rayVS.xyz / i.rayVS.w) * depthEye; + } + clip(0.5 - abs(decalPos)); + + // check normal + float3 norm = GetWorldNormal(screenUV); + float slope = dot(norm, GROUND_NORMAL); + clip(slope - 0.01); + + float2 uv = decalPos.xz + 0.5; + half4 col = tex2D(_MainTex, uv); + col *= _Color; + + // atten with elevation + col.a /= 1.0 + pow(1.0 + max(0, decalPos.y - 0.1), FADE_POWER); + + return col; + } + ENDCG + } + + Pass + { + Name "Target FX Regular" + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ZTest [_ZTest] + Cull Off + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + fixed4 _Color; + + 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 = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return tex2D(_MainTex, i.uv) * _Color; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightTarget.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightTarget.shader.meta new file mode 100644 index 0000000..2d63221 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightTarget.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 54328cae8f89d442da972097ce4f23d9 +timeCreated: 1544699250 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.mat b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.mat new file mode 100644 index 0000000..9d5ed35 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.mat @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HighlightUIMask + m_Shader: {fileID: 4800000, guid: f65ebd3db9df34222b24b0b7b2b752b2, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + 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} + - _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_Ints: [] + m_Floats: + - _BumpScale: 1 + - _ColorMask: 15 + - _CutOff: 0.5 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Stencil: 14 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 14 + - _StencilWriteMask: 14 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.mat.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.mat.meta new file mode 100644 index 0000000..443f0fa --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e86e0b9dab6441b2a8c2787c90d22aa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.shader b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.shader new file mode 100644 index 0000000..144f016 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.shader @@ -0,0 +1,76 @@ +Shader "HighlightPlus/UI/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 + _Stencil("Stencil ID", Float) = 14 + _StencilWriteMask("Stencil Write Mask", Float) = 14 + _StencilReadMask("Stencil Read Mask", Float) = 14 +} + SubShader + { + Tags { "Queue"="Transparent" "RenderType"="Transparent" "IgnoreProjector" = "True" } + + // Create mask + Pass + { + Name "Highlight Plus UI Mask" + Stencil { + Ref [_Stencil] + Comp always + Pass replace + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + ZFail replace + } + ColorMask 0 + ZWrite Off + Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + fixed _CutOff; + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos: SV_POSITION; + float2 uv : 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 = ComputeVertexPosition(v.vertex); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + return 0; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.shader.meta b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.shader.meta new file mode 100644 index 0000000..b546bf7 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/HighlightUIMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f65ebd3db9df34222b24b0b7b2b752b2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/IconMesh.fbx b/Assets/HighlightPlus/Resources/HighlightPlus/IconMesh.fbx new file mode 100644 index 0000000..0e42ac6 Binary files /dev/null and b/Assets/HighlightPlus/Resources/HighlightPlus/IconMesh.fbx differ diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/IconMesh.fbx.meta b/Assets/HighlightPlus/Resources/HighlightPlus/IconMesh.fbx.meta new file mode 100644 index 0000000..7f3d2ec --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/IconMesh.fbx.meta @@ -0,0 +1,106 @@ +fileFormatVersion: 2 +guid: 0619ab933f4044ef7bca0b64517837b3 +ModelImporter: + serializedVersion: 21300 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 1 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 0.2 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 0.2 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/blueNoiseVL.png b/Assets/HighlightPlus/Resources/HighlightPlus/blueNoiseVL.png new file mode 100644 index 0000000..8229918 Binary files /dev/null and b/Assets/HighlightPlus/Resources/HighlightPlus/blueNoiseVL.png differ diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/blueNoiseVL.png.meta b/Assets/HighlightPlus/Resources/HighlightPlus/blueNoiseVL.png.meta new file mode 100644 index 0000000..ecbca92 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/blueNoiseVL.png.meta @@ -0,0 +1,135 @@ +fileFormatVersion: 2 +guid: 12319e92c3b5b45d193b1fe41ed05a1f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + 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 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + 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 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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: Server + 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 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/target.png b/Assets/HighlightPlus/Resources/HighlightPlus/target.png new file mode 100644 index 0000000..f9fadf8 Binary files /dev/null and b/Assets/HighlightPlus/Resources/HighlightPlus/target.png differ diff --git a/Assets/HighlightPlus/Resources/HighlightPlus/target.png.meta b/Assets/HighlightPlus/Resources/HighlightPlus/target.png.meta new file mode 100644 index 0000000..43c03a4 --- /dev/null +++ b/Assets/HighlightPlus/Resources/HighlightPlus/target.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 1de3c566a6c8c405b9f6f453137273ec +timeCreated: 1555360741 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 1 + 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 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts.meta b/Assets/HighlightPlus/Scripts.meta new file mode 100644 index 0000000..3294e59 --- /dev/null +++ b/Assets/HighlightPlus/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 89ce39cd6bb34454bbaf48f1d111f236 +folderAsset: yes +timeCreated: 1542876305 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightEffect.cs b/Assets/HighlightPlus/Scripts/HighlightEffect.cs new file mode 100644 index 0000000..267d308 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffect.cs @@ -0,0 +1,3479 @@ +/// +/// Highlight Plus - (c) Kronnect Technologies SL +/// + +using System; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using UnityEngine; +using UnityEngine.Rendering; + +namespace HighlightPlus { + + public delegate bool OnObjectHighlightEvent (GameObject obj); + public delegate bool OnObjectHighlightStateEvent (GameObject obj, bool state); + public delegate bool OnObjectSelectionEvent (GameObject obj); + public delegate bool OnRendererHighlightEvent (Renderer renderer); + + /// + /// Triggers when target effect animation occurs + /// + /// A value from 0 to 1 that represent the animation time from start to end, based on target duration and start time + public delegate void OnAnimateEvent (ref Vector3 center, ref Quaternion rotation, ref Vector3 scale, float t); + + public enum NormalsOption { + Smooth = 0, + PreserveOriginal = 1, + Reorient = 2, + Planar = 3 + } + + public enum SeeThroughMode { + WhenHighlighted = 0, + AlwaysWhenOccluded = 1, + Never = 2 + } + + public enum SeeThroughSortingMode { + Default = 0, + SortByMaterialsRenderQueue = 1, + SortByMaterialsRenderQueueInverted = 2 + } + + public enum OverlayMode { + WhenHighlighted = 0, + Always = 10 + } + + public enum TextureUVSpace { + Triplanar = 0, + ObjectSpace = 1, + ScreenSpace = 2 + } + + public enum QualityLevel { + Fastest = 0, + High = 1, + Highest = 2, + Medium = 3 + } + + public enum TargetOptions { + Children, + OnlyThisObject, + RootToChildren, + LayerInScene, + LayerInChildren, + Scripting + } + + public enum Visibility { + Normal, + AlwaysOnTop, + OnlyWhenOccluded + } + + public enum ColorStyle { + SingleColor, + Gradient + } + + public enum OutlineEdgeMode { + Exterior, + Any + } + + public enum ContourStyle { + AroundVisibleParts, + AroundObjectShape + } + + public enum GlowBlendMode { + Additive, + AlphaBlending + } + + public enum GlowDitheringStyle { + Pattern, + Noise + } + + public enum InnerGlowBlendMode { + Additive, + AlphaBlending + } + + public enum BlurMethod { + Gaussian, + Kawase + } + + public enum IconAnimationOption { + None, + VerticalBounce = 10 + } + + public static class QualityLevelExtensions { + public static bool UsesMultipleOffsets (this QualityLevel qualityLevel) { + return qualityLevel == QualityLevel.Medium || qualityLevel == QualityLevel.High; + } + } + + [Serializable] + public struct GlowPassData { + public float offset; + public float alpha; + public Color color; + } + + [ExecuteAlways] + [HelpURL("https://kronnect.com/guides/highlight-plus-introduction/")] + public partial class HighlightEffect : MonoBehaviour { + + /// + /// Gets or sets the current profile. To load a profile and apply its settings at runtime, please use ProfileLoad() method. + /// + [Tooltip("The current profile (optional). A profile let you store Highlight Plus settings and apply those settings easily to many objects. You can also load a profile and apply its settings at runtime, using the ProfileLoad() method of the Highlight Effect component.")] + public HighlightProfile profile; + + /// + /// Sets if changes to the original profile should propagate to this effect. + /// + [Tooltip("If enabled, settings from the profile will be applied to this component automatically when game starts or when any profile setting is updated.")] + public bool profileSync; + + /// + /// Makes the effects visible in the SceneView. + /// + [Tooltip("If enabled, effects will be visible also when not in Play mode.")] + public bool previewInEditor = true; + + /// + /// Which cameras can render the effects + /// + [Tooltip("Which cameras can render the effect.")] + public LayerMask camerasLayerMask = -1; + + /// + /// Specifies which objects are affected by this effect. + /// + [Tooltip("Different options to specify which objects are affected by this Highlight Effect component.")] + public TargetOptions effectGroup = TargetOptions.Children; + + /// + /// The target object where the include option applies + /// + [Tooltip("The target object to highlight.")] + public Transform effectTarget; + + /// + /// The layer that contains the affected objects by this effect when effectGroup is set to LayerMask. + /// + [Tooltip("The layer that contains the affected objects by this effect when effectGroup is set to LayerMask.")] + public LayerMask effectGroupLayer = -1; + + /// + /// Optional object name filter + /// + [Tooltip("Only include objects whose names contains this text.")] + public string effectNameFilter; + + /// + /// Optional object name exclusion filter + /// + [Tooltip("Use RegEx to determine if an object name matches the effectNameFilter.")] + public bool effectNameUseRegEx; + + /// + /// Combine objects into a single mesh + /// + [Tooltip("Combine meshes of all objects in this group affected by Highlight Effect reducing draw calls.")] + public bool combineMeshes; + + /// + /// The alpha threshold for transparent cutout objects. Pixels with alpha below this value will be discarded. + /// + [Tooltip("The alpha threshold for transparent cutout objects. Pixels with alpha below this value will be discarded.")] + [Range(0, 1)] + public float alphaCutOff; + + /// + /// If back facing triangles are ignored. Backfaces triangles are not visible but you may set this property to false to force highlight effects to act on those triangles as well. + /// + [Tooltip("If back facing triangles are ignored.Backfaces triangles are not visible but you may set this property to false to force highlight effects to act on those triangles as well.")] + public bool cullBackFaces = true; + + [Tooltip("Adds a empty margin between the mesh and the effects")] + public float padding; + + /// + /// Show highlight effects even if the object is currently not visible. This option is useful if the affected objects are rendered using GPU instancing tools which render directly to the GPU without creating real game object geometry in CPU. + /// + [Tooltip("Show highlight effects even if the object is not visible. If this object or its children use GPU Instancing tools, the MeshRenderer can be disabled although the object is visible. In this case, this option is useful to enable highlighting.")] + public bool ignoreObjectVisibility; + + /// + /// Enable to support reflection probes + /// + [Tooltip("Support reflection probes. Enable only if you want the effects to be visible in reflections.")] + public bool reflectionProbes; + + /// + /// Enable to support reflection probes + /// + [Tooltip("Enables GPU instancing. Reduces draw calls in outline and outer glow effects on platforms that support GPU instancing. Should be enabled by default.")] + public bool GPUInstancing = true; + + /// + /// Enable to support reflection probes + /// + [Tooltip("Bakes skinned mesh to leverage GPU instancing when using outline/outer glow with mesh-based rendering. Reduces draw calls significantly on skinned meshes.")] + public bool optimizeSkinnedMesh = true; + + /// + /// Enabled depth buffer flip in HQ + /// + [Tooltip("Enables depth buffer clipping. Only applies to outline or outer glow in High Quality mode.")] + public bool depthClip; + + [Tooltip("Fades out effects based on distance to camera")] + public bool cameraDistanceFade; + + [Tooltip("The closest distance particles can get to the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeNear; + + [Tooltip("The farthest distance particles can get away from the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeFar = 1000; + + [Tooltip("Normals handling option:\nPreserve original: use original mesh normals.\nSmooth: average normals to produce a smoother outline/glow mesh based effect.\nReorient: recomputes normals based on vertex direction to centroid.\nPlanar: same than reorient but renders outline and glow in an optimized way for 2D or planar meshes like quads or planes.")] + public NormalsOption normalsOption; + + /// + /// Ignores highlight effects on this object. + /// + [Tooltip("Ignore highlighting on this object.")] + public bool ignore; + + [SerializeField] + bool _highlighted; + + public bool highlighted { get { return _highlighted; } set { SetHighlighted(value); } } + + public float fadeInDuration; + public float fadeOutDuration; + + public bool flipY; + + [Tooltip("Keeps the outline/glow size unaffected by object distance.")] + public bool constantWidth = true; + + [Tooltip("Increases the screen coverage for the outline/glow to avoid cuts when using cloth or vertex shader that transform mesh vertices")] + public int extraCoveragePixels; + + [Tooltip("Minimum width when the constant width option is not used")] + [Range(0, 1)] + public float minimumWidth; + + [Tooltip("Mask to include or exclude certain submeshes. By default, all submeshes are included.")] + public int subMeshMask = -1; + + [Range(0, 1)] + [Tooltip("Intensity of the overlay effect. A value of 0 disables the overlay completely.")] + public float overlay; + public OverlayMode overlayMode = OverlayMode.WhenHighlighted; + [ColorUsage(true, true)] public Color overlayColor = Color.yellow; + public float overlayAnimationSpeed = 1f; + [Range(0, 1)] + public float overlayMinIntensity = 0.5f; + [Range(0, 1)] + [Tooltip("Controls the blending or mix of the overlay color with the natural colors of the object.")] + public float overlayBlending = 1.0f; + [Tooltip("Optional overlay texture.")] + public Texture2D overlayTexture; + public TextureUVSpace overlayTextureUVSpace; + public float overlayTextureScale = 1f; + public Vector2 overlayTextureScrolling; + public Visibility overlayVisibility = Visibility.Normal; + + [Range(0, 1)] + [Tooltip("Intensity of the outline. A value of 0 disables the outline completely.")] + public float outline = 1f; + [ColorUsage(true, true)] public Color outlineColor = Color.black; + public ColorStyle outlineColorStyle = ColorStyle.SingleColor; + [GradientUsage(hdr: true, ColorSpace.Linear)] public Gradient outlineGradient; + public bool outlineGradientInLocalSpace; + public float outlineWidth = 0.45f; + [Range(1, 3)] + public int outlineBlurPasses = 2; + public QualityLevel outlineQuality = QualityLevel.Medium; + public OutlineEdgeMode outlineEdgeMode = OutlineEdgeMode.Exterior; + public float outlineEdgeThreshold = 0.995f; + public float outlineSharpness = 1f; + [Range(1, 8)] + [Tooltip("Reduces the quality of the outline but improves performance a bit.")] + public int outlineDownsampling = 1; + public Visibility outlineVisibility = Visibility.Normal; + public GlowBlendMode glowBlendMode = GlowBlendMode.Additive; + public bool outlineOptimalBlit = true; + public bool outlineBlitDebug; + [Tooltip("If enabled, this object won't combine the outline with other objects.")] + public bool outlineIndependent; + public ContourStyle outlineContourStyle = ContourStyle.AroundVisibleParts; + + [Range(0, 5)] + [Tooltip("The intensity of the outer glow effect. A value of 0 disables the glow completely.")] + public float glow; + public float glowWidth = 0.4f; + public QualityLevel glowQuality = QualityLevel.Medium; + public BlurMethod glowBlurMethod = BlurMethod.Gaussian; + [Range(1, 8)] + [Tooltip("Reduces the quality of the glow but improves performance a bit.")] + public int glowDownsampling = 2; + [ColorUsage(true, true)] public Color glowHQColor = new Color(0.64f, 1f, 0f, 1f); + [Tooltip("When enabled, outer glow renders with dithering. When disabled, glow appears as a solid color.")] + [Range(0, 1)] + public float glowDithering = 1f; + public GlowDitheringStyle glowDitheringStyle = GlowDitheringStyle.Pattern; + [Tooltip("Seed for the dithering effect")] + public float glowMagicNumber1 = 0.75f; + [Tooltip("Another seed for the dithering effect that combines with first seed to create different patterns")] + public float glowMagicNumber2 = 0.5f; + public float glowAnimationSpeed = 1f; + public Visibility glowVisibility = Visibility.Normal; + [Tooltip("Performs a blit to screen only over the affected area, instead of a full-screen pass")] + public bool glowOptimalBlit = true; + public bool glowBlitDebug; + [Tooltip("Blends glow passes one after another. If this option is disabled, glow passes won't overlap (in this case, make sure the glow pass 1 has a smaller offset than pass 2, etc.)")] + public bool glowBlendPasses = true; +#if UNITY_2020_2_OR_NEWER + [NonReorderable] +#endif + public GlowPassData[] glowPasses; + [Tooltip("If enabled, glow effect will not use a stencil mask. This can be used to render the glow effect alone.")] + public bool glowIgnoreMask; + + [Range(0, 5f)] + [Tooltip("The intensity of the inner glow effect. A value of 0 disables the glow completely.")] + public float innerGlow; + [Range(0, 2)] + public float innerGlowWidth = 1f; + [ColorUsage(true, true)] public Color innerGlowColor = Color.white; + public InnerGlowBlendMode innerGlowBlendMode = InnerGlowBlendMode.Additive; + public Visibility innerGlowVisibility = Visibility.Normal; + + [Tooltip("Enables the targetFX effect. This effect draws an animated sprite over the object.")] + public bool targetFX; + public Texture2D targetFXTexture; + [ColorUsage(true, true)] public Color targetFXColor = Color.white; + public Transform targetFXCenter; + public float targetFXRotationSpeed = 50f; + public float targetFXInitialScale = 4f; + public float targetFXEndScale = 1.5f; + [Tooltip("Makes target scale relative to object renderer bounds")] + public bool targetFXScaleToRenderBounds = true; + [Tooltip("Enable to render a single target FX effect at the center of the enclosing bounds")] + public bool targetFXUseEnclosingBounds; + [Tooltip("Places target FX sprite at the bottom of the highlighted object.")] + public bool targetFXAlignToGround; + [Tooltip("Optional worlds space offset for the position of the targetFX effect")] + public Vector3 targetFXOffset; + [Tooltip("Fade out effect with altitude")] + public float targetFXFadePower = 32; + public float targetFXGroundMaxDistance = 10f; + public LayerMask targetFXGroundLayerMask = -1; + public float targetFXTransitionDuration = 0.5f; + [Tooltip("The duration of the effect. A value of 0 will keep the target sprite on screen while object is highlighted.")] + public float targetFXStayDuration = 1.5f; + public Visibility targetFXVisibility = Visibility.AlwaysOnTop; + + [Tooltip("Enables the iconFX effect. This effect draws an animated object over the object.")] + public bool iconFX; + public Mesh iconFXMesh; + [ColorUsage(true, true)] public Color iconFXLightColor = Color.white; + [ColorUsage(true, true)] public Color iconFXDarkColor = Color.gray; + public Transform iconFXCenter; + public float iconFXRotationSpeed = 50f; + public IconAnimationOption iconFXAnimationOption = IconAnimationOption.None; + public float iconFXAnimationAmount = 0.1f; + public float iconFXAnimationSpeed = 3f; + public float iconFXScale = 1f; + [Tooltip("Makes target scale relative to object renderer bounds.")] + public bool iconFXScaleToRenderBounds; + [Tooltip("Optional world space offset for the position of the iconFX effect")] + public Vector3 iconFXOffset = new Vector3(0, 1, 0); + public float iconFXTransitionDuration = 0.5f; + public float iconFXStayDuration = 1.5f; + + [Tooltip("See-through mode for this Highlight Effect component.")] + public SeeThroughMode seeThrough = SeeThroughMode.Never; + [Tooltip("This mask setting let you specify which objects will be considered as occluders and cause the see-through effect for this Highlight Effect component. For example, you assign your walls to a different layer and specify that layer here, so only walls and not other objects, like ground or ceiling, will trigger the see-through effect.")] + public LayerMask seeThroughOccluderMask = -1; + [Tooltip("A multiplier for the occluder volume size which can be used to reduce the actual size of occluders when Highlight Effect checks if they're occluding this object.")] + [Range(0.01f, 0.6f)] public float seeThroughOccluderThreshold = 0.3f; + [Tooltip("Uses stencil buffers to ensure pixel-accurate occlusion test. If this option is disabled, only physics raycasting is used to test for occlusion.")] + public bool seeThroughOccluderMaskAccurate; + [Tooltip("The interval of time between occlusion tests.")] + public float seeThroughOccluderCheckInterval = 1f; + [Tooltip("If enabled, occlusion test is performed for each children element. If disabled, the bounds of all children is combined and a single occlusion test is performed for the combined bounds.")] + public bool seeThroughOccluderCheckIndividualObjects; + [Tooltip("Shows the see-through effect only if the occluder if at this 'offset' distance from the object.")] + public float seeThroughDepthOffset; + [Tooltip("Hides the see-through effect if the occluder is further than this distance from the object (0 = infinite)")] + public float seeThroughMaxDepth; + [Range(0, 5f)] public float seeThroughIntensity = 0.8f; + [Range(0, 1)] public float seeThroughTintAlpha = 0.5f; + [ColorUsage(true, true)] public Color seeThroughTintColor = Color.red; + [Range(0, 1)] public float seeThroughNoise = 1f; + [Range(0, 1)] public float seeThroughBorder; + public Color seeThroughBorderColor = Color.black; + [Tooltip("Only display the border instead of the full see-through effect.")] + public bool seeThroughBorderOnly; + public float seeThroughBorderWidth = 0.45f; + [Tooltip("Renders see-through effect on overlapping objects in a sequence that's relative to the distance to the camera")] + public bool seeThroughOrdered; + [Tooltip("Optional see-through mask effect texture.")] + public Texture2D seeThroughTexture; + public TextureUVSpace seeThroughTextureUVSpace; + public float seeThroughTextureScale = 1f; + [Tooltip("The order by which children objects are rendered by the see-through effect")] + public SeeThroughSortingMode seeThroughChildrenSortingMode = SeeThroughSortingMode.Default; + + public event OnObjectSelectionEvent OnObjectSelected; + public event OnObjectSelectionEvent OnObjectUnSelected; + public event OnObjectHighlightEvent OnObjectHighlightStart; + public event OnObjectHighlightEvent OnObjectHighlightEnd; + public event OnObjectHighlightStateEvent OnObjectHighlightStateChange; + public event OnRendererHighlightEvent OnRendererHighlightStart; + public event OnAnimateEvent OnTargetAnimates; + public event OnAnimateEvent OnIconAnimates; + + struct ModelMaterials { + public bool render; // if this object can render this frame + public Transform transform; + public bool bakedTransform; + public Vector3 currentPosition, currentRotation, currentScale; + public bool renderWasVisibleDuringSetup; + public Mesh mesh, originalMesh, bakedSkinnedMesh; + public Renderer renderer; + public bool isSkinnedMesh; + public NormalsOption normalsOption; + public Material[] fxMatMask, fxMatOutline, fxMatGlow, fxMatSolidColor, fxMatSeeThroughInner, fxMatSeeThroughBorder, fxMatOverlay, fxMatInnerGlow; + public Matrix4x4 renderingMatrix; + public bool isCombined; + public bool preserveOriginalMesh { get { return !isCombined && normalsOption == NormalsOption.PreserveOriginal; } } + + public void Init () { + render = false; + transform = null; + bakedTransform = false; + currentPosition = currentRotation = currentScale = Vector3.zero; + mesh = originalMesh = null; + if (bakedSkinnedMesh != null) DestroyImmediate(bakedSkinnedMesh); + renderer = null; + isSkinnedMesh = false; + normalsOption = NormalsOption.Smooth; + isCombined = false; + } + } + + public enum FadingState { + FadingOut = -1, + NoFading = 0, + FadingIn = 1 + } + + [SerializeField, HideInInspector] + ModelMaterials[] rms; + [SerializeField, HideInInspector] + int rmsCount; + + /// + /// Number of objects affected by this highlight effect script + /// + public int includedObjectsCount => rmsCount; + +#if UNITY_EDITOR + /// + /// True if there's some static children + /// + [NonSerialized] + public bool staticChildren; + +#endif + + [NonSerialized] + public Transform target; + + public Transform currentTarget => effectTarget != null ? effectTarget : transform; + + /// + /// Time in which the highlight started + /// + [NonSerialized] + public float highlightStartTime; + + /// + /// Time in which the target fx started + /// + [NonSerialized] + public float targetFXStartTime; + + /// + /// Time in which the icon fx started + /// + [NonSerialized] + public float iconFXStartTime; + + bool _isSelected; + /// + /// True if this object is selected (if selectOnClick is used) + /// + public bool isSelected { + get { return _isSelected; } + set { + if (_isSelected != value) { + if (value) { + if (OnObjectSelected != null) OnObjectSelected(gameObject); + } + else { + if (OnObjectUnSelected != null) OnObjectUnSelected(gameObject); + } + _isSelected = value; + if (_isSelected) lastSelected = this; + } + } + } + + /// + /// If a sprite is used with this script, spriteMode = true. Certain mesh-only options will be disabled. + /// + [NonSerialized] + public bool spriteMode; + + [NonSerialized] + public HighlightProfile previousSettings; + + public void RestorePreviousHighlightEffectSettings () { + previousSettings.Load(this); + } + + const float TAU = 0.70711f; + + // Reference materials. These are instanced per object (rms). + static Material fxMatMask, fxMatSolidColor, fxMatSeeThrough, fxMatSeeThroughBorder, fxMatOverlay, fxMatClearStencil; + static Material fxMatSeeThroughMask; + + // Per-object materials + Material fxMatGlowTemplate, fxMatInnerGlow, fxMatOutlineTemplate, fxMatTarget; + Material fxMatComposeGlow, fxMatComposeOutline, fxMatBlurGlow, fxMatBlurOutline; + Material fxMatIcon; + + static Vector4[] offsets; + + float fadeStartTime; + [NonSerialized] public FadingState fading = FadingState.NoFading; + CommandBuffer cbMask, cbSeeThrough, cbGlow, cbOutline, cbOverlay, cbInnerGlow; + CommandBuffer cbSmoothBlend; + int[] mipGlowBuffers, mipOutlineBuffers; + static Mesh quadMesh, cubeMesh; + int sourceRT; + Matrix4x4 quadGlowMatrix, quadOutlineMatrix; + Vector4[] corners; + RenderTextureDescriptor sourceDesc; + Color debugColor, blackColor; + Visibility lastOutlineVisibility; + bool requireUpdateMaterial; + bool useGPUInstancing; + bool usesReversedZBuffer; + bool usesSeeThrough; + + class PerCameraOcclusionData { + public float checkLastTime = -10000; + public int occlusionRenderFrame; + public bool lastOcclusionTestResult; + public readonly List cachedOccluders = new List(); + public Collider cachedOccluderCollider; + } + readonly Dictionary perCameraOcclusionData = new Dictionary(); + + + MaterialPropertyBlock glowPropertyBlock, outlinePropertyBlock; + static readonly List matDataDirection = new List(); + static readonly List matDataGlow = new List(); + static readonly List matDataColor = new List(); + static Matrix4x4[] matrices; + public static readonly List effects = new List(); + public static bool customSorting; + static int customSortingFrame; + static Camera customSortingCamera; + + int skipThisFrame = -1; + int outlineOffsetsMin, outlineOffsetsMax; + int glowOffsetsMin, glowOffsetsMax; + static CombineInstance[] combineInstances; + bool maskRequired; + + Texture2D outlineGradientTex; + Color[] outlineGradientColors; + + bool shouldBakeSkinnedMesh; + + /// + /// Returns a reference to the last highlighted object + /// + public static HighlightEffect lastHighlighted; + + /// + /// Returns a reference to the last selected object (when selection is managed by Highlight Manager or Trigger) + /// + public static HighlightEffect lastSelected; + + [NonSerialized] + public string lastRegExError; + + bool isInitialized; + + [RuntimeInitializeOnLoadMethod] + static void DomainReloadDisabledSupport () { + lastHighlighted = lastSelected = null; + effects.RemoveAll(i => i == null); + } + + void OnEnable () { + InitIfNeeded(); + } + + void InitIfNeeded () { + VRCheck.Init(); + if (rms == null || !isInitialized) { + Init(); + } + if (!effects.Contains(this)) { + effects.Add(this); + } + } + + void Init () { + lastOutlineVisibility = outlineVisibility; + debugColor = new Color(1f, 0f, 0f, 0.5f); + blackColor = new Color(0, 0, 0, 0); + if (offsets == null || offsets.Length != 8) { + offsets = new Vector4[] { + new Vector4(0,1), + new Vector4(1,0), + new Vector4(0,-1), + new Vector4(-1,0), + new Vector4 (-TAU, TAU), + new Vector4 (TAU, TAU), + new Vector4 (TAU, -TAU), + new Vector4 (-TAU, -TAU) + }; + } + if (corners == null || corners.Length != 8) { + corners = new Vector4[8]; + } + if (quadMesh == null) { + BuildQuad(); + } + if (cubeMesh == null) { + BuildCube(); + } + if (target == null) { + target = currentTarget; + } + if (glowPasses == null || glowPasses.Length == 0) { + glowPasses = new GlowPassData[4]; + glowPasses[0] = new GlowPassData() { offset = 4, alpha = 0.1f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[1] = new GlowPassData() { offset = 3, alpha = 0.2f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[2] = new GlowPassData() { offset = 2, alpha = 0.3f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[3] = new GlowPassData() { offset = 1, alpha = 0.4f, color = new Color(0.64f, 1f, 0f, 1f) }; + } + sourceRT = Shader.PropertyToID("_HPSourceRT"); + useGPUInstancing = GPUInstancing && SystemInfo.supportsInstancing; + usesReversedZBuffer = SystemInfo.usesReversedZBuffer; + + if (useGPUInstancing) { + if (glowPropertyBlock == null) { + glowPropertyBlock = new MaterialPropertyBlock(); + } + if (outlinePropertyBlock == null) { + outlinePropertyBlock = new MaterialPropertyBlock(); + } + } + + CheckGeometrySupportDependencies(); + + if (profileSync && profile != null) { + profile.Load(this); + } + + isInitialized = true; + } + + private void Start () { + SetupMaterial(); + } + + public void OnDidApplyAnimationProperties () { // support for animating property based fields + UpdateMaterialProperties(); + } + + void OnDisable () { + UpdateMaterialProperties(); + RemoveEffect(); + } + + void Reset () { + SetupMaterial(); + } + + void DestroyMaterial (Material mat) { + if (mat != null) DestroyImmediate(mat); + } + + void DestroyMaterialArray (Material[] mm) { + if (mm == null) return; + for (int k = 0; k < mm.Length; k++) { + DestroyMaterial(mm[k]); + } + } + + void RemoveEffect () { + effects.Remove(this); + } + + void OnDestroy () { + RemoveEffect(); + if (rms != null) { + for (int k = 0; k < rms.Length; k++) { + DestroyMaterialArray(rms[k].fxMatMask); + DestroyMaterialArray(rms[k].fxMatOutline); + DestroyMaterialArray(rms[k].fxMatGlow); + DestroyMaterialArray(rms[k].fxMatSolidColor); + DestroyMaterialArray(rms[k].fxMatSeeThroughInner); + DestroyMaterialArray(rms[k].fxMatSeeThroughBorder); + DestroyMaterialArray(rms[k].fxMatOverlay); + DestroyMaterialArray(rms[k].fxMatInnerGlow); + } + } + + DestroyMaterial(fxMatGlowTemplate); + DestroyMaterial(fxMatInnerGlow); + DestroyMaterial(fxMatOutlineTemplate); + DestroyMaterial(fxMatTarget); + DestroyMaterial(fxMatComposeGlow); + DestroyMaterial(fxMatComposeOutline); + DestroyMaterial(fxMatBlurGlow); + DestroyMaterial(fxMatBlurOutline); + DestroyMaterial(fxMatIcon); + + if (effects.Contains(this)) { + effects.Remove(this); + } + + if (combinedMeshes.TryGetValue(combinedMeshesHashId, out _)) { + combinedMeshes.Remove(combinedMeshesHashId); + } + + foreach (Mesh instancedMesh in instancedMeshes) { + if (instancedMesh == null) continue; + int usageCount; + if (sharedMeshUsage.TryGetValue(instancedMesh, out usageCount)) { + if (usageCount <= 1) { + sharedMeshUsage.Remove(instancedMesh); + DestroyImmediate(instancedMesh); + } + else { + sharedMeshUsage[instancedMesh] = usageCount - 1; + } + } + } + } + + + public static void DrawEffectsNow (Camera cam = null) { + if (cam == null) { + cam = Camera.current; + if (cam == null) return; + } + int effectsCount = effects.Count; + int thisFrame = Time.frameCount; + for (int k = 0; k < effectsCount; k++) { + HighlightEffect effect = effects[k]; + if (effect != null) { + effect.DoOnRenderObject(cam); + effect.skipThisFrame = thisFrame; + } + } + } + + void OnRenderObject () { + DoOnRenderObject(Camera.current); + } + + /// + /// Loads a profile into this effect + /// + public void ProfileLoad (HighlightProfile profile) { + if (profile != null) { + this.profile = profile; + profile.Load(this); + } + } + + /// + /// Reloads currently assigned profile + /// + public void ProfileReload () { + if (profile != null) { + profile.Load(this); + } + } + + + /// + /// Save current settings into given profile + /// + public void ProfileSaveChanges (HighlightProfile profile) { + if (profile != null) { + profile.Save(this); + } + } + + /// + /// Save current settings into current profile + /// + public void ProfileSaveChanges () { + if (profile != null) { + profile.Save(this); + } + } + + + public void Refresh (bool discardCachedMeshes = false) { + if (discardCachedMeshes) { + RefreshCachedMeshes(); + } + InitIfNeeded(); + if (enabled) { + SetupMaterial(); + } + } + + public void ResetHighlightStartTime () { + highlightStartTime = targetFXStartTime = iconFXStartTime = GetTime(); + } + + void DoOnRenderObject (Camera cam) { + + if (customSorting) { + int frameCount = Time.frameCount; + if (customSortingFrame != frameCount || customSortingCamera != cam) { + customSortingFrame = frameCount; + customSortingCamera = cam; + int effectsCount = effects.Count; + for (int k = 0; k < effectsCount; k++) { + HighlightEffect effect = effects[k]; + effect.skipThisFrame = -1; + effect.RenderEffect(cam); + effect.skipThisFrame = frameCount; + } + } + } + else { + RenderEffect(cam); + } + } + + void RenderEffect (Camera cam) { + + if (cam == null || ((1 << cam.gameObject.layer) & camerasLayerMask) == 0) return; + + if (!reflectionProbes && cam.cameraType == CameraType.Reflection) + return; + +#if UNITY_EDITOR + if (!previewInEditor && !Application.isPlaying) + return; +#endif + + if (requireUpdateMaterial) { + requireUpdateMaterial = false; + UpdateMaterialPropertiesNow(); + } + + bool seeThroughReal = usesSeeThrough; + if (seeThroughReal) { + seeThroughReal = RenderSeeThroughOccluders(cam); + if (seeThroughReal && seeThroughOccluderMask != -1) { + if (seeThroughOccluderMaskAccurate) { + CheckOcclusionAccurate(cam); + } + else { + seeThroughReal = CheckOcclusion(cam); + } + } + } + + bool showOverlay = hitActive || overlayMode == OverlayMode.Always; + if (!_highlighted && !seeThroughReal && !showOverlay) { + return; + } + + if (skipThisFrame == Time.frameCount) { + return; + } + + if (rms == null) { + SetupMaterial(); + if (rms == null) return; + } + + // Check camera culling mask + int cullingMask = cam.cullingMask; + + // Ensure renderers are valid and visible (in case LODgroup has changed active renderer) + if (!ignoreObjectVisibility) { + for (int k = 0; k < rmsCount; k++) { + if (rms[k].renderer != null && rms[k].renderer.isVisible != rms[k].renderWasVisibleDuringSetup) { + SetupMaterial(); + break; + } + } + } + + if (fxMatMask == null) + return; + + // Apply effect + float glowReal = _highlighted ? this.glow : 0; + float now = GetTime(); + + // Check smooth blend ztesting capability + bool useSmoothGlow = glow > 0 && glowWidth > 0 && glowQuality == QualityLevel.Highest; + bool useSmoothOutline = outline > 0 && outlineWidth > 0 && outlineQuality == QualityLevel.Highest; + bool useSmoothBlend = useSmoothGlow || useSmoothOutline; + if (useSmoothBlend) { + if (useSmoothGlow && useSmoothOutline) { + outlineVisibility = glowVisibility; + } + } + Visibility smoothGlowVisibility = glowVisibility; + Visibility smoothOutlineVisibility = outlineVisibility; +#if UNITY_EDITOR + if (useSmoothBlend && cam.cameraType == CameraType.SceneView) { + smoothGlowVisibility = smoothOutlineVisibility = Visibility.AlwaysOnTop; + } +#endif + if (useSmoothBlend) { + if (depthClip || outlineEdgeMode == OutlineEdgeMode.Any) { + cam.depthTextureMode |= DepthTextureMode.Depth; + } + if (Application.isMobilePlatform || (cam.allowMSAA && QualitySettings.antiAliasing > 1)) { + smoothGlowVisibility = smoothOutlineVisibility = Visibility.AlwaysOnTop; + } + else if (VRCheck.isVrRunning) { + smoothGlowVisibility = smoothOutlineVisibility = Visibility.AlwaysOnTop; + } + } + + // First create masks + float aspect = cam.aspect; + bool independentFullScreenNotExecuted = true; + bool somePartVisible = false; + + for (int k = 0; k < rmsCount; k++) { + rms[k].render = false; + + Transform t = rms[k].transform; + if (t == null) + continue; + + if (rms[k].isSkinnedMesh && shouldBakeSkinnedMesh) { + SkinnedMeshRenderer smr = (SkinnedMeshRenderer)rms[k].renderer; + if (rms[k].bakedSkinnedMesh == null) { + rms[k].bakedSkinnedMesh = new Mesh(); + } + smr.BakeMesh(rms[k].bakedSkinnedMesh, true); + rms[k].mesh = rms[k].bakedSkinnedMesh; + rms[k].normalsOption = NormalsOption.Smooth; + } + + Mesh mesh = rms[k].mesh; + if (mesh == null) + continue; + + if (!ignoreObjectVisibility) { + int layer = t.gameObject.layer; + if (((1 << layer) & cullingMask) == 0) + continue; + if (!rms[k].renderer.isVisible) + continue; + } + + rms[k].render = true; + somePartVisible = true; + + if (rms[k].isCombined) { + rms[k].renderingMatrix = t.localToWorldMatrix; + } + else if (!rms[k].preserveOriginalMesh) { + Vector3 lossyScale = t.lossyScale; + Vector3 position = t.position; + if (rms[k].bakedTransform) { + if (rms[k].currentPosition != t.position || rms[k].currentRotation != t.eulerAngles || rms[k].currentScale != t.lossyScale) { + BakeTransform(k, true); + } + rms[k].renderingMatrix = Matrix4x4.identity; + } + else { + rms[k].renderingMatrix = Matrix4x4.TRS(position, t.rotation, lossyScale); + } + } + + // Outline + if (outlineIndependent) { + if (useSmoothBlend) { + if (independentFullScreenNotExecuted) { + independentFullScreenNotExecuted = false; + fxMatClearStencil.SetPass(0); + if (subMeshMask > 0) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) != 0) { + Graphics.DrawMeshNow(quadMesh, Matrix4x4.identity, l); + } + } + } + else { + Graphics.DrawMeshNow(quadMesh, Matrix4x4.identity); + } + } + } + else if (outline > 0 || glow > 0) { + float width = outlineWidth; + if (glow > 0) { + width = Mathf.Max(width, glowWidth); + } + bool usesMultipleOffsets = normalsOption != NormalsOption.Planar && outlineQuality.UsesMultipleOffsets(); + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + Material mat = rms[k].fxMatOutline[l]; + if (usesMultipleOffsets) { + for (int o = outlineOffsetsMin; o <= outlineOffsetsMax; o++) { + Vector3 direction = offsets[o] * (width / 100f); + direction.y *= aspect; + mat.SetVector(ShaderParams.OutlineDirection, direction); + if (rms[k].preserveOriginalMesh) { + cbOutline.Clear(); + cbOutline.DrawRenderer(rms[k].renderer, mat, l, 1); + Graphics.ExecuteCommandBuffer(cbOutline); + } + else { + mat.SetPass(1); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + else { + if (rms[k].preserveOriginalMesh) { + cbOutline.Clear(); + cbOutline.DrawRenderer(rms[k].renderer, mat, l, 1); + Graphics.ExecuteCommandBuffer(cbOutline); + } + else { + mat.SetPass(1); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + } + } + + } + + if (!somePartVisible) return; + + bool renderMaskOnTop = _highlighted && ((outline > 0 && smoothOutlineVisibility != Visibility.Normal) || (glow > 0 && smoothGlowVisibility != Visibility.Normal) || (innerGlow > 0 && innerGlowVisibility != Visibility.Normal)); + renderMaskOnTop = renderMaskOnTop | (useSmoothBlend && outlineContourStyle == ContourStyle.AroundObjectShape); + if (maskRequired) { + for (int k = 0; k < rmsCount; k++) { + if (rms[k].render) { + RenderMask(k, rms[k].mesh, renderMaskOnTop); + } + } + } + + // Compute tweening + float fadeGroup = 1f; + float fade = 1f; + if (fading != FadingState.NoFading) { + if (fading == FadingState.FadingIn) { + if (fadeInDuration > 0) { + fadeGroup = (now - fadeStartTime) / fadeInDuration; + if (fadeGroup > 1f) { + fadeGroup = 1f; + fading = FadingState.NoFading; + } + } + } + else if (fadeOutDuration > 0) { + fadeGroup = 1f - (now - fadeStartTime) / fadeOutDuration; + if (fadeGroup < 0f) { + fadeGroup = 0f; + fading = FadingState.NoFading; + _highlighted = false; + requireUpdateMaterial = true; + if (OnObjectHighlightEnd != null) { + OnObjectHighlightEnd(gameObject); + } + SendMessage("HighlightEnd", null, SendMessageOptions.DontRequireReceiver); + } + } + } + + if (glowQuality == QualityLevel.High) { + glowReal *= 0.25f; + } + else if (glowQuality == QualityLevel.Medium) { + glowReal *= 0.5f; + } + + int smoothRTWidth = 0; + int smoothRTHeight = 0; + Bounds smoothBounds = new Bounds(); + + if (useSmoothBlend) { + // Prepare smooth outer glow / outline target + if (cbSmoothBlend == null) { + CheckBlurCommandBuffer(); + } + cbSmoothBlend.Clear(); + smoothRTWidth = cam.pixelWidth; + smoothRTHeight = cam.pixelHeight; + if (smoothRTWidth <= 0) { + smoothRTWidth = 1; + } + if (smoothRTHeight <= 0) { + smoothRTHeight = 1; + } + if (VRCheck.isVrRunning) { + sourceDesc = VRCheck.vrTextureDescriptor; + } + else { + sourceDesc = new RenderTextureDescriptor(smoothRTWidth, smoothRTHeight); // Application.isMobilePlatform ? RenderTextureFormat.Default : RenderTextureFormat.DefaultHDR); + sourceDesc.volumeDepth = 1; + } + sourceDesc.colorFormat = useSmoothOutline && outlineEdgeMode == OutlineEdgeMode.Any ? RenderTextureFormat.ARGB32 : RenderTextureFormat.R8; + sourceDesc.msaaSamples = 1; + sourceDesc.useMipMap = false; + sourceDesc.depthBufferBits = 0; + + cbSmoothBlend.GetTemporaryRT(sourceRT, sourceDesc, FilterMode.Bilinear); + RenderTargetIdentifier sourceDestination = new RenderTargetIdentifier(sourceRT, 0, CubemapFace.Unknown, -1); + if ((glow > 0 && smoothGlowVisibility == Visibility.AlwaysOnTop) || (outline > 0 && smoothOutlineVisibility == Visibility.AlwaysOnTop)) { + cbSmoothBlend.SetRenderTarget(sourceDestination); + } + else { + RenderTargetIdentifier targetDestination = new RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget, 0, CubemapFace.Unknown, -1); + if (Application.isMobilePlatform) { + cbSmoothBlend.SetRenderTarget(sourceDestination, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare, targetDestination, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare); + } + else { + cbSmoothBlend.SetRenderTarget(sourceDestination, targetDestination); + } + } + cbSmoothBlend.ClearRenderTarget(false, true, new Color(0, 0, 0, 0)); + } + + bool targetEffectRendered = false; + bool iconEffectRendered = false; + + Bounds enclosingBounds = new Bounds(); + if (useSmoothBlend || (targetFX && targetFXUseEnclosingBounds) || iconFX) { + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + if (k == 0) { + enclosingBounds = rms[k].renderer.bounds; + } + else { + enclosingBounds.Encapsulate(rms[k].renderer.bounds); + } + } + } + + cbSeeThrough.Clear(); + + // Add effects + if (seeThroughReal && renderMaskOnTop) { + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + RenderSeeThroughClearStencil(k, mesh); + } + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + RenderSeeThroughMask(k, mesh); + } + } + + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + + fade = fadeGroup; + // Distance fade + if (cameraDistanceFade) { + fade *= ComputeCameraDistanceFade(rms[k].transform.position, cam.transform); + } + cbSeeThrough.SetGlobalFloat(ShaderParams.FadeFactor, fade); + + // See-Through + if (seeThroughReal) { + if (seeThroughDepthOffset > 0) { + cam.depthTextureMode |= DepthTextureMode.Depth; + } + bool usesSeeThroughBorder = (seeThroughBorder * seeThroughBorderWidth) > 0; + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (l < rms[k].fxMatSeeThroughInner.Length && rms[k].fxMatSeeThroughInner[l] != null) { + if (rms[k].preserveOriginalMesh) { + cbSeeThrough.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughInner[l], l); + } + else { + cbSeeThrough.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSeeThroughInner[l], l); + } + if (usesSeeThroughBorder) { + cbSeeThrough.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughBorder[l], l); + } + } + } + if (usesSeeThroughBorder) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (l < rms[k].fxMatSeeThroughBorder.Length && rms[k].fxMatSeeThroughBorder[l] != null) { + if (rms[k].preserveOriginalMesh) { + cbSeeThrough.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughBorder[l], l); + } + else { + cbSeeThrough.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSeeThroughBorder[l], l); + } + } + } + } + } + + if (_highlighted || showOverlay) { + // Hit FX + Color overlayColor = this.overlayColor; + float overlayMinIntensity = this.overlayMinIntensity; + float overlayBlending = this.overlayBlending; + + Color innerGlowColorA = this.innerGlowColor; + float innerGlow = this.innerGlow; + + if (hitActive) { + overlayColor.a = _highlighted ? overlay : 0; + innerGlowColorA.a = _highlighted ? innerGlow : 0; + float t = hitFadeOutDuration > 0 ? (now - hitStartTime) / hitFadeOutDuration : 1f; + if (t >= 1f) { + hitActive = false; + } + else { + if (hitFxMode == HitFxMode.InnerGlow) { + bool lerpToCurrentInnerGlow = _highlighted && innerGlow > 0; + innerGlowColorA = lerpToCurrentInnerGlow ? Color.Lerp(hitColor, innerGlowColor, t) : hitColor; + innerGlowColorA.a = lerpToCurrentInnerGlow ? Mathf.Lerp(1f - t, innerGlow, t) : 1f - t; + innerGlowColorA.a *= hitInitialIntensity; + } + else { + bool lerpToCurrentOverlay = _highlighted && overlay > 0; + overlayColor = lerpToCurrentOverlay ? Color.Lerp(hitColor, overlayColor, t) : hitColor; + overlayColor.a = lerpToCurrentOverlay ? Mathf.Lerp(1f - t, overlay, t) : 1f - t; + overlayColor.a *= hitInitialIntensity; + overlayMinIntensity = 1f; + overlayBlending = 0; + } + } + } + else { + overlayColor.a = overlay * fade; + innerGlowColorA.a = innerGlow * fade; + } + + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + // Overlay + if (overlayColor.a > 0) { + Material fxMat = rms[k].fxMatOverlay[l]; + fxMat.SetColor(ShaderParams.OverlayColor, overlayColor); + fxMat.SetVector(ShaderParams.OverlayData, new Vector4(overlayAnimationSpeed, overlayMinIntensity, overlayBlending, overlayTextureScale)); + if (hitActive && hitFxMode == HitFxMode.LocalHit) { + fxMat.SetVector(ShaderParams.OverlayHitPosData, new Vector4(hitPosition.x, hitPosition.y, hitPosition.z, hitRadius)); + fxMat.SetFloat(ShaderParams.OverlayHitStartTime, hitStartTime); + } + else { + fxMat.SetVector(ShaderParams.OverlayHitPosData, Vector4.zero); + } + if (rms[k].preserveOriginalMesh) { + cbOverlay.Clear(); + cbOverlay.DrawRenderer(rms[k].renderer, fxMat, l); + Graphics.ExecuteCommandBuffer(cbOverlay); + } + else { + fxMat.SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + + // Inner Glow + if (innerGlowColorA.a > 0) { + rms[k].fxMatInnerGlow[l].SetColor(ShaderParams.InnerGlowColor, innerGlowColorA); + + if (rms[k].preserveOriginalMesh) { + cbInnerGlow.Clear(); + cbInnerGlow.DrawRenderer(rms[k].renderer, rms[k].fxMatInnerGlow[l], l); + Graphics.ExecuteCommandBuffer(cbInnerGlow); + } + else { + rms[k].fxMatInnerGlow[l].SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + } + + if (!_highlighted) + continue; + + if (useSmoothBlend) { + if (k == 0) { + smoothBounds = rms[k].renderer.bounds; + } + else { + smoothBounds.Encapsulate(rms[k].renderer.bounds); + } + } + + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + // Render object body for glow/outline highest quality + if (useSmoothBlend) { + if (l < rms[k].fxMatSolidColor.Length) { + if (rms[k].preserveOriginalMesh) { + cbSmoothBlend.DrawRenderer(rms[k].renderer, rms[k].fxMatSolidColor[l], l); + } + else { + cbSmoothBlend.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSolidColor[l], l); + } + } + } + + // Glow + if (glow > 0 && glowQuality != QualityLevel.Highest) { + matDataGlow.Clear(); + matDataColor.Clear(); + matDataDirection.Clear(); + Material mat = rms[k].fxMatGlow[l]; + Vector4 directionZero = normalsOption == NormalsOption.Planar ? new Vector4(0, 0, glowWidth / 100f, 0) : Vector4.zero; + mat.SetVector(ShaderParams.GlowDirection, directionZero); + for (int j = 0; j < glowPasses.Length; j++) { + Color dataColor = glowPasses[j].color; + mat.SetColor(ShaderParams.GlowColor, dataColor); + Vector4 dataGlow = new Vector4(fade * glowReal * glowPasses[j].alpha, normalsOption == NormalsOption.Planar ? 0 : glowPasses[j].offset * glowWidth / 100f, glowMagicNumber1, glowMagicNumber2); + mat.SetVector(ShaderParams.Glow, dataGlow); + if (normalsOption != NormalsOption.Planar && glowQuality.UsesMultipleOffsets()) { + for (int o = glowOffsetsMin; o <= glowOffsetsMax; o++) { + Vector4 direction = offsets[o]; + direction.y *= aspect; + mat.SetVector(ShaderParams.GlowDirection, direction); + if (rms[k].preserveOriginalMesh) { + cbGlow.Clear(); + cbGlow.DrawRenderer(rms[k].renderer, mat, l); + Graphics.ExecuteCommandBuffer(cbGlow); + } + else { + if (useGPUInstancing) { + matDataDirection.Add(direction); + matDataGlow.Add(dataGlow); + matDataColor.Add(new Vector4(dataColor.r, dataColor.g, dataColor.b, dataColor.a)); + } + else { + mat.SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + } + else { + if (rms[k].preserveOriginalMesh) { + cbGlow.Clear(); + cbGlow.DrawRenderer(rms[k].renderer, mat, l); + Graphics.ExecuteCommandBuffer(cbGlow); + } + else { + if (useGPUInstancing) { + matDataDirection.Add(directionZero); + matDataGlow.Add(dataGlow); + matDataColor.Add(new Vector4(dataColor.r, dataColor.g, dataColor.b, dataColor.a)); + } + else { + mat.SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + } + if (useGPUInstancing) { + int instanceCount = matDataDirection.Count; + if (instanceCount > 0) { + glowPropertyBlock.Clear(); + glowPropertyBlock.SetVectorArray(ShaderParams.GlowDirection, matDataDirection); + glowPropertyBlock.SetVectorArray(ShaderParams.GlowColor, matDataColor); + glowPropertyBlock.SetVectorArray(ShaderParams.Glow, matDataGlow); + if (matrices == null || matrices.Length < instanceCount) { + matrices = new Matrix4x4[instanceCount]; + } + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + cbGlow.Clear(); + cbGlow.DrawMeshInstanced(mesh, l, mat, 0, matrices, instanceCount, glowPropertyBlock); + Graphics.ExecuteCommandBuffer(cbGlow); + } + } + } + + // Outline + if (outline > 0 && outlineQuality != QualityLevel.Highest) { + Material mat = rms[k].fxMatOutline[l]; + Color outlineColor = this.outlineColor; + if (outlineColorStyle == ColorStyle.Gradient) { + outlineColor.a *= outline * fade; + Bounds bounds = outlineGradientInLocalSpace ? mesh.bounds : rms[k].renderer.bounds; + mat.SetVector(ShaderParams.OutlineVertexData, new Vector4(bounds.min.y, bounds.size.y + 0.0001f, 0)); + } + else { + outlineColor.a = outline * fade; + mat.SetVector(ShaderParams.OutlineVertexData, new Vector4(-1e6f, 1f, 1f, 0)); + } + mat.SetColor(ShaderParams.OutlineColor, outlineColor); + if (normalsOption != NormalsOption.Planar && outlineQuality.UsesMultipleOffsets()) { + matDataDirection.Clear(); + for (int o = outlineOffsetsMin; o <= outlineOffsetsMax; o++) { + Vector4 direction = offsets[o] * (outlineWidth / 100f); + direction.y *= aspect; + mat.SetVector(ShaderParams.OutlineDirection, direction); + if (rms[k].preserveOriginalMesh) { + cbOutline.Clear(); + cbOutline.DrawRenderer(rms[k].renderer, mat, l, 0); + Graphics.ExecuteCommandBuffer(cbOutline); + } + else { + if (useGPUInstancing) { + matDataDirection.Add(direction); + } + else { + mat.SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + if (useGPUInstancing) { + int instanceCount = matDataDirection.Count; + if (instanceCount > 0) { + outlinePropertyBlock.Clear(); + outlinePropertyBlock.SetVectorArray(ShaderParams.OutlineDirection, matDataDirection); + if (matrices == null || matrices.Length < instanceCount) { + matrices = new Matrix4x4[instanceCount]; + } + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + cbGlow.Clear(); // we reuse the same commandbuffer for glow + cbGlow.DrawMeshInstanced(mesh, l, mat, 0, matrices, instanceCount, outlinePropertyBlock); + Graphics.ExecuteCommandBuffer(cbGlow); + } + } + } + else { + if (rms[k].preserveOriginalMesh) { + cbOutline.Clear(); + cbOutline.DrawRenderer(rms[k].renderer, mat, l, 0); + Graphics.ExecuteCommandBuffer(cbOutline); + } + else { + mat.SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + } + } + + // Target + if (targetFX) { + float fadeOut = 1f; + if (targetFXStayDuration > 0 && Application.isPlaying) { + fadeOut = now - targetFXStartTime; + if (fadeOut >= targetFXStayDuration) { + fadeOut -= targetFXStayDuration; + fadeOut = 1f - fadeOut; + } + if (fadeOut > 1f) { + fadeOut = 1f; + } + } + bool usesTarget = targetFXCenter != null; + if (fadeOut > 0 && !(targetEffectRendered && usesTarget)) { + targetEffectRendered = true; + float scaleT = 1f; + float time; + float normalizedTime = 1; + if (Application.isPlaying) { + normalizedTime = (now - targetFXStartTime) / targetFXTransitionDuration; + if (normalizedTime > 1f) { + normalizedTime = 1f; + } + scaleT = Mathf.Sin(normalizedTime * Mathf.PI * 0.5f); + time = now; + } + else { + time = (float)DateTime.Now.Subtract(DateTime.Today).TotalSeconds; + } + Bounds bounds = targetFXUseEnclosingBounds ? enclosingBounds : rms[k].renderer.bounds; + if (!targetFXScaleToRenderBounds) { + bounds.size = Vector3.one; + } + Vector3 scale = bounds.size; + float minSize = scale.x; + if (scale.y < minSize) { + minSize = scale.y; + } + if (scale.z < minSize) { + minSize = scale.z; + } + scale.x = scale.y = scale.z = minSize; + scale = Vector3.Lerp(scale * targetFXInitialScale, scale * targetFXEndScale, scaleT); + Vector3 center = usesTarget ? targetFXCenter.position : bounds.center; + center += targetFXOffset; + Quaternion rotation; + if (targetFXAlignToGround) { + rotation = Quaternion.Euler(90, 0, 0); + center.y += 0.5f; // a bit of offset in case it's in contact with ground + if (Physics.Raycast(center, Vector3.down, out RaycastHit groundHitInfo, targetFXGroundMaxDistance, targetFXGroundLayerMask)) { + cam.depthTextureMode |= DepthTextureMode.Depth; + center = groundHitInfo.point; + center.y += 0.01f; + Vector4 renderData = groundHitInfo.normal; + renderData.w = targetFXFadePower; + fxMatTarget.SetVector(ShaderParams.TargetFXRenderData, renderData); + rotation = Quaternion.Euler(0, time * targetFXRotationSpeed, 0); + if (OnTargetAnimates != null) { + OnTargetAnimates(ref center, ref rotation, ref scale, normalizedTime); + } + Matrix4x4 m = Matrix4x4.TRS(center, rotation, scale); + Color color = targetFXColor; + color.a *= fade * normalizedTime; + Material mat = fxMatTarget; + mat.color = color; + mat.SetPass(0); + Graphics.DrawMeshNow(cubeMesh, m); + } + } + else { + rotation = Quaternion.LookRotation(cam.transform.position - rms[k].transform.position); + Quaternion animationRot = Quaternion.Euler(0, 0, time * targetFXRotationSpeed); + rotation *= animationRot; + if (OnTargetAnimates != null) { + OnTargetAnimates(ref center, ref rotation, ref scale, normalizedTime); + } + Matrix4x4 m = Matrix4x4.TRS(center, rotation, scale); + Color color = targetFXColor; + color.a *= fade * normalizedTime; + Material mat = fxMatTarget; + mat.color = color; + mat.SetPass(1); + Graphics.DrawMeshNow(quadMesh, m); + } + } + } + + // Icon + if (iconFX) { + float fadeOut = 1f; + if (iconFXStayDuration > 0 && Application.isPlaying) { + fadeOut = (now - iconFXStartTime); + if (fadeOut >= iconFXStayDuration) { + fadeOut -= iconFXStayDuration; + fadeOut = 1f - fadeOut; + } + if (fadeOut > 1f) { + fadeOut = 1f; + } + } + bool usesTarget = iconFXCenter != null; + if (fadeOut > 0 && !(iconEffectRendered && usesTarget)) { + iconEffectRendered = true; + float scaleT = 1f; + float time; + float normalizedTime = 0; + if (Application.isPlaying) { + time = now; + normalizedTime = (time - iconFXStartTime) / iconFXTransitionDuration; + if (normalizedTime > 1f) { + normalizedTime = 1f; + } + scaleT = Mathf.Sin(normalizedTime * Mathf.PI * 0.5f); + } + else { + time = (float)DateTime.Now.Subtract(DateTime.Today).TotalSeconds; + } + Bounds bounds = enclosingBounds; + if (!iconFXScaleToRenderBounds) { + bounds.size = Vector3.one; + } + Vector3 scale = bounds.size * iconFXScale; + Vector3 center = usesTarget ? iconFXCenter.position : bounds.center; + center += iconFXOffset; + switch (iconFXAnimationOption) { + case IconAnimationOption.VerticalBounce: + center.y += iconFXAnimationAmount * Mathf.Abs(Mathf.Sin((now - iconFXStartTime) * iconFXAnimationSpeed)); + break; + } + Quaternion rotation = Quaternion.Euler(0, time * iconFXRotationSpeed, 0); + if (OnIconAnimates != null) { + OnIconAnimates(ref center, ref rotation, ref scale, normalizedTime); + } + Matrix4x4 m = Matrix4x4.TRS(center, rotation, scale); + Color lightColor = iconFXLightColor; + lightColor.a *= fade * fadeOut; + Color darkColor = iconFXDarkColor; + darkColor.a *= fade * fadeOut; + Material mat = fxMatIcon; + mat.color = lightColor; + mat.SetColor(ShaderParams.IconFXDarkColor, darkColor); + mat.SetPass(0); + Graphics.DrawMeshNow(iconFXMesh, m); + } + } + } + + if (useSmoothBlend) { + if (ComputeSmoothQuadMatrix(cam, smoothBounds)) { + // Smooth Glow + if (useSmoothGlow) { + float intensity = glow * fade; + fxMatComposeGlow.color = new Color(glowHQColor.r * intensity, glowHQColor.g * intensity, glowHQColor.b * intensity, glowHQColor.a * intensity); + SmoothGlow(smoothRTWidth / glowDownsampling, smoothRTHeight / glowDownsampling); + } + + // Smooth Outline + if (useSmoothOutline) { + fxMatComposeOutline.color = new Color(outlineColor.r, outlineColor.g, outlineColor.b, 5f * outlineColor.a * outline * fade); + SmoothOutline(smoothRTWidth / outlineDownsampling, smoothRTHeight / outlineDownsampling); + } + + // Bit result + ComposeSmoothBlend(smoothGlowVisibility, smoothOutlineVisibility); + } + } + + if (seeThroughReal && seeThroughOrdered) { // Ordered for see-through + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + Mesh mesh = rms[k].mesh; + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (rms[k].isCombined) { + cbSeeThrough.DrawMesh(mesh, rms[k].renderingMatrix, fxMatClearStencil, l, 1); + } + else { + cbSeeThrough.DrawRenderer(rms[k].renderer, fxMatClearStencil, l, 1); + } + } + } + } + + Graphics.ExecuteCommandBuffer(cbSeeThrough); + } + + + void RenderMask (int k, Mesh mesh, bool alwaysOnTop) { + if (rms[k].preserveOriginalMesh) { + cbMask.Clear(); + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (alwaysOnTop) { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.Always); + } + else { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.LessEqual); + } + cbMask.DrawRenderer(rms[k].renderer, rms[k].fxMatMask[l], l, 0); + } + Graphics.ExecuteCommandBuffer(cbMask); + } + else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (alwaysOnTop) { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.Always); + } + else { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.LessEqual); + } + rms[k].fxMatMask[l].SetPass(0); + Graphics.DrawMeshNow(mesh, rms[k].renderingMatrix, l); + } + } + + + } + + void RenderSeeThroughClearStencil (int k, Mesh mesh) { + if (rms[k].preserveOriginalMesh) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbSeeThrough.DrawRenderer(rms[k].renderer, fxMatClearStencil, l, 1); + } + } + else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbSeeThrough.DrawMesh(mesh, rms[k].renderingMatrix, fxMatClearStencil, l, 1); + } + } + } + + void RenderSeeThroughMask (int k, Mesh mesh) { + if (rms[k].preserveOriginalMesh) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbSeeThrough.DrawRenderer(rms[k].renderer, rms[k].fxMatMask[l], l, 1); + } + } + else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbSeeThrough.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatMask[l], l, 1); + } + } + } + + + void WorldToViewportPoint (ref Matrix4x4 m, ref Vector4 p, bool perspectiveProjection, float zBufferParamsZ, float zBufferParamsW) { + p = m * p; + p.x = (p.x / p.w + 1f) * 0.5f; + p.y = (p.y / p.w + 1f) * 0.5f; + + if (perspectiveProjection) { + p.z /= p.w; + p.z = 1.0f / (zBufferParamsZ * p.z + zBufferParamsW); + } + else { + if (usesReversedZBuffer) { + p.z = 1f - p.z; + } + p.z = (zBufferParamsW - zBufferParamsZ) * p.z + zBufferParamsZ; + } + } + + + bool ComputeSmoothQuadMatrix (Camera cam, Bounds bounds) { + // Compute bounds in screen space and enlarge for glow space + bool res; + if (VRCheck.isVrRunning) { + Vector3 shift = Vector3.zero; + res = ComputeSmoothQuadMatrixOriginShifted(cam, ref bounds, ref shift); + } + else { + Vector3 shift = cam.transform.position; + cam.transform.position = Vector3.zero; + cam.ResetWorldToCameraMatrix(); + bounds.center -= shift; + res = ComputeSmoothQuadMatrixOriginShifted(cam, ref bounds, ref shift); + cam.transform.position = shift; + } + return res; + } + + bool ComputeSmoothQuadMatrixOriginShifted (Camera cam, ref Bounds bounds, ref Vector3 shift) { + // Compute bounds in screen space and enlarge for glow space + + Matrix4x4 mat = GL.GetGPUProjectionMatrix(cam.projectionMatrix, false) * cam.worldToCameraMatrix; + Vector3 min = bounds.min; + Vector3 max = bounds.max; + corners[0] = new Vector4(min.x, min.y, min.z, 1f); + corners[1] = new Vector4(min.x, min.y, max.z, 1f); + corners[2] = new Vector4(max.x, min.y, min.z, 1f); + corners[3] = new Vector4(max.x, min.y, max.z, 1f); + corners[4] = new Vector4(min.x, max.y, min.z, 1f); + corners[5] = new Vector4(min.x, max.y, max.z, 1f); + corners[6] = new Vector4(max.x, max.y, min.z, 1f); + corners[7] = new Vector4(max.x, max.y, max.z, 1f); + Vector3 scrMin = new Vector3(float.MaxValue, float.MaxValue, 0); + Vector3 scrMax = new Vector3(float.MinValue, float.MinValue, 0); + float distanceMin = float.MaxValue; + float distanceMax = float.MinValue; + float nearClipPlane = cam.nearClipPlane; + float farClipPlane = cam.farClipPlane; + + float x, y, z, w; + bool isPerspectiveCamera = !cam.orthographic; + if (isPerspectiveCamera) { + if (usesReversedZBuffer) { + x = -1f + farClipPlane / nearClipPlane; + y = 1f; + z = x / farClipPlane; + w = 1f / farClipPlane; + } + else { + x = 1f - farClipPlane / nearClipPlane; + y = farClipPlane / nearClipPlane; + z = x / farClipPlane; + w = y / farClipPlane; + } + } + else { + z = nearClipPlane; + w = farClipPlane; + } + + for (int k = 0; k < 8; k++) { + WorldToViewportPoint(ref mat, ref corners[k], isPerspectiveCamera, z, w); + if (corners[k].x < scrMin.x) { + scrMin.x = corners[k].x; + } + if (corners[k].y < scrMin.y) { + scrMin.y = corners[k].y; + } + if (corners[k].x > scrMax.x) { + scrMax.x = corners[k].x; + } + if (corners[k].y > scrMax.y) { + scrMax.y = corners[k].y; + } + if (corners[k].z < distanceMin) { + distanceMin = corners[k].z; + if (distanceMin < nearClipPlane) { + distanceMin = distanceMax = 0.01f + nearClipPlane; + scrMin.x = scrMin.y = 0; + scrMax.x = 1f; + scrMax.y = 1f; + break; + } + } + if (corners[k].z > distanceMax) { + distanceMax = corners[k].z; + } + } + if (scrMax.y == scrMin.y) + return false; + + int pixelWidth = cam.pixelWidth; + int pixelHeight = cam.pixelHeight; + Rect pixelRect = cam.pixelRect; + scrMin.x *= pixelWidth; + scrMax.x *= pixelWidth; + scrMin.y *= pixelHeight; + scrMax.y *= pixelHeight; + scrMin.x += pixelRect.xMin; + scrMax.x += pixelRect.xMin; + scrMin.y += pixelRect.yMin; + scrMax.y += pixelRect.yMin; + + if (spriteMode) { + scrMin.z = scrMax.z = (distanceMin + distanceMax) * 0.5f + nearClipPlane; + } + else { + scrMin.z = scrMax.z = VRCheck.isVrRunning ? distanceMin : 0.05f + nearClipPlane; // small shift to avoid origin far issues + } + + if (outline > 0) { + BuildMatrix(cam, scrMin, scrMax, (int)(10 + 20 * outlineWidth + 5 * outlineDownsampling), ref quadOutlineMatrix, ref shift); + } + if (glow > 0) { + BuildMatrix(cam, scrMin, scrMax, (int)(20 + 30 * glowWidth + 10 * glowDownsampling), ref quadGlowMatrix, ref shift); + } + return true; + } + + void BuildMatrix (Camera cam, Vector3 scrMin, Vector3 scrMax, int border, ref Matrix4x4 quadMatrix, ref Vector3 shift) { + + // Insert padding to make room for effects + border += extraCoveragePixels; + scrMin.x -= border; + scrMin.y -= border; + scrMax.x += border; + scrMax.y += border; + + // Back to world space + Vector3 third = new Vector3(scrMax.x, scrMin.y, scrMin.z); + scrMin = cam.ScreenToWorldPoint(scrMin); + scrMax = cam.ScreenToWorldPoint(scrMax); + third = cam.ScreenToWorldPoint(third); + + float width = Vector3.Distance(scrMin, third); + float height = Vector3.Distance(scrMax, third); + + quadMatrix = Matrix4x4.TRS((scrMin + scrMax) * 0.5f + shift, cam.transform.rotation, new Vector3(width, height, 1f)); + } + + void SmoothGlow (int rtWidth, int rtHeight) { + + Material matBlur = fxMatBlurGlow; + RenderTextureDescriptor glowDesc = sourceDesc; + glowDesc.depthBufferBits = 0; + + if (glowBlurMethod == BlurMethod.Gaussian) { + + const int blurPasses = 4; + + // Blur buffers + int bufferCount = blurPasses * 2; + if (mipGlowBuffers == null || mipGlowBuffers.Length != bufferCount) { + mipGlowBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount; k++) { + mipGlowBuffers[k] = Shader.PropertyToID("_HPSmoothGlowTemp" + k); + } + mipGlowBuffers[bufferCount - 2] = ShaderParams.GlowRT; + } + + for (int k = 0; k < bufferCount; k++) { + float reduction = k / 2 + 2; + int reducedWidth = (int)(rtWidth / reduction); + int reducedHeight = (int)(rtHeight / reduction); + if (reducedWidth <= 0) { + reducedWidth = 1; + } + if (reducedHeight <= 0) { + reducedHeight = 1; + } + glowDesc.width = reducedWidth; + glowDesc.height = reducedHeight; + cbSmoothBlend.GetTemporaryRT(mipGlowBuffers[k], glowDesc, FilterMode.Bilinear); + } + + for (int k = 0; k < bufferCount - 1; k += 2) { + if (k == 0) { + cbSmoothBlend.Blit(sourceRT, mipGlowBuffers[k + 1], matBlur, 0); + } + else { + cbSmoothBlend.Blit(mipGlowBuffers[k], mipGlowBuffers[k + 1], matBlur, 0); + } + cbSmoothBlend.Blit(mipGlowBuffers[k + 1], mipGlowBuffers[k], matBlur, 1); + + if (k < bufferCount - 2) { + cbSmoothBlend.Blit(mipGlowBuffers[k], mipGlowBuffers[k + 2], matBlur, 2); + } + } + } + else { + const int blurPasses = 5; + + int bufferCount = blurPasses; + if (mipGlowBuffers == null || mipGlowBuffers.Length != bufferCount) { + mipGlowBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount; k++) { + mipGlowBuffers[k] = Shader.PropertyToID("_HPSmoothGlowTemp" + k); + } + mipGlowBuffers[bufferCount - 2] = ShaderParams.GlowRT; + } + + for (int k = 0; k < bufferCount; k++) { + float reduction = k + 2; + int reducedWidth = (int)(rtWidth / reduction); + int reducedHeight = (int)(rtHeight / reduction); + if (reducedWidth <= 0) { + reducedWidth = 1; + } + if (reducedHeight <= 0) { + reducedHeight = 1; + } + glowDesc.width = reducedWidth; + glowDesc.height = reducedHeight; + cbSmoothBlend.GetTemporaryRT(mipGlowBuffers[k], glowDesc, FilterMode.Bilinear); + } + cbSmoothBlend.Blit(sourceRT, mipGlowBuffers[0], matBlur, 3); + for (int k = 0; k < bufferCount - 2; k++) { + cbSmoothBlend.SetGlobalFloat(ShaderParams.ResampleScale, k + 0.5f); + cbSmoothBlend.Blit(mipGlowBuffers[k], mipGlowBuffers[k + 1], matBlur, 3); + } + } + } + + void SmoothOutline (int rtWidth, int rtHeight) { + + // Blur buffers + int bufferCount = outlineBlurPasses * 2; + if (mipOutlineBuffers == null || mipOutlineBuffers.Length != bufferCount) { + mipOutlineBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount; k++) { + mipOutlineBuffers[k] = Shader.PropertyToID("_HPSmoothOutlineTemp" + k); + } + mipOutlineBuffers[bufferCount - 2] = ShaderParams.OutlineRT; + } + RenderTextureDescriptor outlineDesc = sourceDesc; + outlineDesc.depthBufferBits = 0; + + for (int k = 0; k < bufferCount; k++) { + float reduction = k / 2 + 2; + int reducedWidth = (int)(rtWidth / reduction); + int reducedHeight = (int)(rtHeight / reduction); + if (reducedWidth <= 0) { + reducedWidth = 1; + } + if (reducedHeight <= 0) { + reducedHeight = 1; + } + outlineDesc.width = reducedWidth; + outlineDesc.height = reducedHeight; + cbSmoothBlend.GetTemporaryRT(mipOutlineBuffers[k], outlineDesc, FilterMode.Bilinear); + } + + Material matBlur = fxMatBlurOutline; + for (int k = 0; k < bufferCount - 1; k += 2) { + if (k == 0) { + cbSmoothBlend.Blit(sourceRT, mipOutlineBuffers[k + 1], matBlur, 3); + } + else { + cbSmoothBlend.Blit(mipOutlineBuffers[k], mipOutlineBuffers[k + 1], matBlur, 0); + } + cbSmoothBlend.Blit(mipOutlineBuffers[k + 1], mipOutlineBuffers[k], matBlur, 1); + + if (k < bufferCount - 2) { + cbSmoothBlend.Blit(mipOutlineBuffers[k], mipOutlineBuffers[k + 2], matBlur, 2); + } + } + } + + void ComposeSmoothBlend (Visibility smoothGlowVisibility, Visibility smoothOutlineVisibility) { + bool renderSmoothGlow = glow > 0 && glowWidth > 0 && glowQuality == QualityLevel.Highest; + RenderTargetIdentifier cameraTargetDestination = new RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget, 0, CubemapFace.Unknown, -1); + if (renderSmoothGlow) { + Material matComposeGlow = fxMatComposeGlow; + matComposeGlow.SetVector(ShaderParams.Flip, (VRCheck.isVrRunning && flipY) ? new Vector3(1, -1, 0) : new Vector3(0, 1, 0)); + if (glowOptimalBlit) { + if (Application.isMobilePlatform && smoothGlowVisibility != Visibility.AlwaysOnTop) { + cbSmoothBlend.SetRenderTarget(cameraTargetDestination, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare); + } + else { + cbSmoothBlend.SetRenderTarget(cameraTargetDestination); + } + matComposeGlow.SetInt(ShaderParams.ZTest, GetZTestValue(smoothGlowVisibility)); + matComposeGlow.SetColor(ShaderParams.Debug, glowBlitDebug ? debugColor : blackColor); + cbSmoothBlend.DrawMesh(quadMesh, quadGlowMatrix, matComposeGlow, 0, 0); + } + else { + cbSmoothBlend.Blit(ShaderParams.GlowRT, cameraTargetDestination, matComposeGlow, 1); + } + } + bool renderSmoothOutline = outline > 0 && outlineWidth > 0 && outlineQuality == QualityLevel.Highest; + if (renderSmoothOutline) { + Material matComposeOutline = fxMatComposeOutline; + matComposeOutline.SetVector(ShaderParams.Flip, (VRCheck.isVrRunning && flipY) ? new Vector3(1, -1, 0) : new Vector3(0, 1, 0)); + if (outlineOptimalBlit) { + if (Application.isMobilePlatform && smoothOutlineVisibility != Visibility.AlwaysOnTop) { + cbSmoothBlend.SetRenderTarget(cameraTargetDestination, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare); + } + else { + cbSmoothBlend.SetRenderTarget(cameraTargetDestination); + } + matComposeOutline.SetInt(ShaderParams.ZTest, GetZTestValue(smoothOutlineVisibility)); + cbSmoothBlend.DrawMesh(quadMesh, quadOutlineMatrix, matComposeOutline, 0, 0); + } + else { + cbSmoothBlend.Blit(ShaderParams.OutlineRT, cameraTargetDestination, matComposeOutline, 1); + } + } + // Release render textures + if (renderSmoothGlow) { + for (int k = 0; k < mipGlowBuffers.Length; k++) { + cbSmoothBlend.ReleaseTemporaryRT(mipGlowBuffers[k]); + } + } + if (renderSmoothOutline) { + for (int k = 0; k < mipOutlineBuffers.Length; k++) { + cbSmoothBlend.ReleaseTemporaryRT(mipOutlineBuffers[k]); + } + } + + cbSmoothBlend.ReleaseTemporaryRT(sourceRT); + + Graphics.ExecuteCommandBuffer(cbSmoothBlend); + } + + void InitMaterial (ref Material material, string shaderName) { + if (material == null) { + Shader shaderFX = Shader.Find(shaderName); + if (shaderFX == null) { + Debug.LogError("Shader " + shaderName + " not found."); + return; + } + material = new Material(shaderFX); + } + } + + /// + /// Sets target for highlight effects + /// + public void SetTarget (Transform transform) { + if (transform == target || transform == null) + return; + + InitIfNeeded(); + if (_highlighted) { + ImmediateFadeOut(); + } + + target = transform; + SetupMaterial(); + } + + + /// + /// Sets target for highlight effects and also specify a list of renderers to be included as well + /// + public void SetTargets (Transform transform, Renderer[] renderers) { + if (transform == null) + return; + + InitIfNeeded(); + if (_highlighted) { + ImmediateFadeOut(); + } + + effectGroup = TargetOptions.Scripting; + target = transform; + SetupMaterial(renderers); + } + + + /// + /// Start or finish highlight on the object + /// + public void SetHighlighted (bool state) { + + if (state != _highlighted && OnObjectHighlightStateChange != null) { + if (!OnObjectHighlightStateChange(gameObject, state)) return; + } + + if (state) lastHighlighted = this; + + if (!Application.isPlaying) { + _highlighted = state; + return; + } + + float now = GetTime(); + + if (fading == FadingState.NoFading) { + fadeStartTime = now; + } + + if (state && !ignore) { + if (_highlighted && fading == FadingState.NoFading) { + return; + } + if (OnObjectHighlightStart != null) { + if (!OnObjectHighlightStart(gameObject)) { + return; + } + } + SendMessage("HighlightStart", null, SendMessageOptions.DontRequireReceiver); + highlightStartTime = targetFXStartTime = iconFXStartTime = now; + if (fadeInDuration > 0) { + if (fading == FadingState.FadingOut) { + float remaining = fadeOutDuration - (now - fadeStartTime); + fadeStartTime = now - remaining; + fadeStartTime = Mathf.Min(fadeStartTime, now); + } + fading = FadingState.FadingIn; + } + else { + fading = FadingState.NoFading; + } + _highlighted = true; + requireUpdateMaterial = true; + } + else if (_highlighted) { + if (fadeOutDuration > 0) { + if (fading == FadingState.FadingIn) { + float elapsed = now - fadeStartTime; + fadeStartTime = now + elapsed - fadeInDuration; + fadeStartTime = Mathf.Min(fadeStartTime, now); + } + fading = FadingState.FadingOut; // when fade out ends, highlighted will be set to false in OnRenderObject + } + else { + fading = FadingState.NoFading; + ImmediateFadeOut(); + requireUpdateMaterial = true; + } + } + } + + void ImmediateFadeOut () { + fading = FadingState.NoFading; + _highlighted = false; + if (OnObjectHighlightEnd != null) { + OnObjectHighlightEnd(gameObject); + } + SendMessage("HighlightEnd", null, SendMessageOptions.DontRequireReceiver); + } + + void SetupMaterial () { + +#if UNITY_EDITOR + staticChildren = false; +#endif + + if (target == null || fxMatMask == null) + return; + + Renderer[] rr = null; + switch (effectGroup) { + case TargetOptions.OnlyThisObject: + if (target.TryGetComponent(out Renderer renderer) && ValidRenderer(renderer)) { + rr = new Renderer[1]; + rr[0] = renderer; + } + break; + case TargetOptions.RootToChildren: + Transform root = target; + while (root.parent != null) { + root = root.parent; + } + rr = FindRenderersInChildren(root); + break; + case TargetOptions.LayerInScene: { + HighlightEffect eg = this; + if (target != transform) { + if (target.TryGetComponent(out HighlightEffect targetEffect)) { + eg = targetEffect; + } + } + rr = FindRenderersWithLayerInScene(eg.effectGroupLayer); + } + break; + case TargetOptions.LayerInChildren: { + HighlightEffect eg = this; + if (target != transform) { + if (target.TryGetComponent(out HighlightEffect targetEffect)) { + eg = targetEffect; + } + } + rr = FindRenderersWithLayerInChildren(eg.effectGroupLayer); + } + break; + case TargetOptions.Children: + rr = FindRenderersInChildren(target); + break; + case TargetOptions.Scripting: + UpdateMaterialProperties(); + return; + } + + SetupMaterial(rr); + } + + void SetupMaterial (Renderer[] rr) { + + if (rr == null) { + rr = new Renderer[0]; + } + if (rms == null || rms.Length < rr.Length) { + rms = new ModelMaterials[rr.Length]; + } + + spriteMode = false; + rmsCount = 0; + for (int k = 0; k < rr.Length; k++) { + rms[rmsCount].Init(); + Renderer renderer = rr[k]; + if (renderer == null) continue; + if (effectGroup != TargetOptions.OnlyThisObject && !string.IsNullOrEmpty(effectNameFilter)) { + if (effectNameUseRegEx) { + try { + lastRegExError = ""; + if (!Regex.IsMatch(renderer.name, effectNameFilter)) continue; + } + catch (Exception ex) { + lastRegExError = ex.Message; + continue; + } + } + else { + if (!renderer.name.Contains(effectNameFilter)) continue; + } + } + rms[rmsCount].renderer = renderer; + rms[rmsCount].renderWasVisibleDuringSetup = renderer.isVisible; + + if (renderer.transform != target) { + if (renderer.TryGetComponent(out HighlightEffect otherEffect) && otherEffect.enabled && otherEffect.ignore) { + continue; // ignore this object + } + } + + if (OnRendererHighlightStart != null) { + if (!OnRendererHighlightStart(renderer)) { + rmsCount++; + continue; + } + } + + rms[rmsCount].isCombined = false; + bool isSkinnedMesh = renderer is SkinnedMeshRenderer; + rms[rmsCount].isSkinnedMesh = isSkinnedMesh; + bool isSpriteRenderer = renderer is SpriteRenderer; + rms[rmsCount].normalsOption = isSkinnedMesh || isSpriteRenderer ? NormalsOption.PreserveOriginal : normalsOption; + if (rms[rmsCount].preserveOriginalMesh || combineMeshes) { + CheckCommandBuffers(); + } + if (isSpriteRenderer) { + rms[rmsCount].mesh = quadMesh; + spriteMode = true; + } + else if (isSkinnedMesh) { + // ignore cloth skinned renderers + rms[rmsCount].mesh = ((SkinnedMeshRenderer)renderer).sharedMesh; + } + else if (Application.isPlaying && renderer.isPartOfStaticBatch) { + // static batched objects need to have a mesh collider in order to use its original mesh + if (renderer.TryGetComponent(out MeshCollider mc)) { + rms[rmsCount].mesh = mc.sharedMesh; + } + } + else { + if (renderer.TryGetComponent(out MeshFilter mf)) { + rms[rmsCount].mesh = mf.sharedMesh; + +#if UNITY_EDITOR + if (renderer.gameObject.isStatic && renderer.GetComponent() == null) { + staticChildren = true; + } +#endif + + } + } + + if (rms[rmsCount].mesh == null) { + continue; + } + + rms[rmsCount].transform = renderer.transform; + Fork(fxMatMask, ref rms[rmsCount].fxMatMask, rms[rmsCount].mesh); + Fork(fxMatOutlineTemplate, ref rms[rmsCount].fxMatOutline, rms[rmsCount].mesh); + Fork(fxMatGlowTemplate, ref rms[rmsCount].fxMatGlow, rms[rmsCount].mesh); + Fork(fxMatSeeThrough, ref rms[rmsCount].fxMatSeeThroughInner, rms[rmsCount].mesh); + Fork(fxMatSeeThroughBorder, ref rms[rmsCount].fxMatSeeThroughBorder, rms[rmsCount].mesh); + Fork(fxMatOverlay, ref rms[rmsCount].fxMatOverlay, rms[rmsCount].mesh); + Fork(fxMatInnerGlow, ref rms[rmsCount].fxMatInnerGlow, rms[rmsCount].mesh); + Fork(fxMatSolidColor, ref rms[rmsCount].fxMatSolidColor, rms[rmsCount].mesh); + rms[rmsCount].originalMesh = rms[rmsCount].mesh; + if (!rms[rmsCount].preserveOriginalMesh) { + if (innerGlow > 0 || (glow > 0 && glowQuality != QualityLevel.Highest) || (outline > 0 && outlineQuality != QualityLevel.Highest)) { + if (normalsOption == NormalsOption.Reorient || normalsOption == NormalsOption.Planar) { + ReorientNormals(rmsCount); + } + else { + AverageNormals(rmsCount); + } + } + // check if scale is negative + BakeTransform(rmsCount, true); + } + rmsCount++; + } + +#if UNITY_EDITOR + // Avoids command buffer issue when refreshing asset inside the Editor + if (!Application.isPlaying) { + mipGlowBuffers = null; + mipOutlineBuffers = null; + } +#endif + + if (spriteMode) { + outlineIndependent = false; + outlineQuality = QualityLevel.Highest; + glowQuality = QualityLevel.Highest; + innerGlow = 0; + cullBackFaces = false; + seeThrough = SeeThroughMode.Never; + if (alphaCutOff <= 0) { + alphaCutOff = 0.5f; + } + } + else { + if (combineMeshes) { + CombineMeshes(); + } + } + + UpdateMaterialPropertiesNow(); + } + + readonly List tempRR = new List(); + + bool ValidRenderer (Renderer r) { + return r is MeshRenderer || r is SpriteRenderer || r is SkinnedMeshRenderer; + } + + Renderer[] FindRenderersWithLayerInScene (LayerMask layer) { + Renderer[] rr = Misc.FindObjectsOfType(); + tempRR.Clear(); + for (var i = 0; i < rr.Length; i++) { + Renderer r = rr[i]; + if (((1 << r.gameObject.layer) & layer) != 0) { + if (ValidRenderer(r)) { + tempRR.Add(r); + } + } + } + return tempRR.ToArray(); + } + + Renderer[] FindRenderersWithLayerInChildren (LayerMask layer) { + Renderer[] rr = target.GetComponentsInChildren(); + tempRR.Clear(); + for (var i = 0; i < rr.Length; i++) { + Renderer r = rr[i]; + if (((1 << r.gameObject.layer) & layer) != 0) { + if (ValidRenderer(r)) { + tempRR.Add(r); + } + } + } + return tempRR.ToArray(); + } + + Renderer[] FindRenderersInChildren (Transform parent) { + tempRR.Clear(); + parent.GetComponentsInChildren(true, tempRR); + for (var i = 0; i < tempRR.Count; i++) { + Renderer r = tempRR[i]; + if (!ValidRenderer(r)) { + tempRR.RemoveAt(i); + i--; + } + } + return tempRR.ToArray(); + } + + void CheckGeometrySupportDependencies () { + InitMaterial(ref fxMatMask, "HighlightPlus/Geometry/Mask"); + InitMaterial(ref fxMatGlowTemplate, "HighlightPlus/Geometry/Glow"); + if (fxMatGlowTemplate != null) { + Texture2D noiseTex = Resources.Load("HighlightPlus/blueNoiseVL"); + fxMatGlowTemplate.SetTexture(ShaderParams.NoiseTex, noiseTex); + if (useGPUInstancing) { + fxMatGlowTemplate.enableInstancing = true; + } + } + InitMaterial(ref fxMatInnerGlow, "HighlightPlus/Geometry/InnerGlow"); + InitMaterial(ref fxMatOutlineTemplate, "HighlightPlus/Geometry/Outline"); + if (fxMatOutlineTemplate != null && useGPUInstancing) { + fxMatOutlineTemplate.enableInstancing = true; + } + InitMaterial(ref fxMatOverlay, "HighlightPlus/Geometry/Overlay"); + InitMaterial(ref fxMatSeeThrough, "HighlightPlus/Geometry/SeeThroughInner"); + InitMaterial(ref fxMatSeeThroughBorder, "HighlightPlus/Geometry/SeeThroughBorder"); + InitMaterial(ref fxMatSeeThroughMask, "HighlightPlus/Geometry/SeeThroughMask"); + InitMaterial(ref fxMatTarget, "HighlightPlus/Geometry/Target"); + InitMaterial(ref fxMatComposeGlow, "HighlightPlus/Geometry/ComposeGlow"); + InitMaterial(ref fxMatComposeOutline, "HighlightPlus/Geometry/ComposeOutline"); + InitMaterial(ref fxMatSolidColor, "HighlightPlus/Geometry/SolidColor"); + InitMaterial(ref fxMatBlurOutline, "HighlightPlus/Geometry/BlurOutline"); + InitMaterial(ref fxMatBlurGlow, "HighlightPlus/Geometry/BlurGlow"); + InitMaterial(ref fxMatClearStencil, "HighlightPlus/ClearStencil"); + CheckRequiredCommandBuffers(); + } + + void CheckRequiredCommandBuffers () { + if (cbGlow == null) { + cbGlow = new CommandBuffer(); + cbGlow.name = "Outer Glow for " + name; + } + if (cbSeeThrough == null) { + cbSeeThrough = new CommandBuffer(); + cbSeeThrough.name = "See Through for " + name; + } + } + + void CheckCommandBuffers () { + if (cbMask == null) { + cbMask = new CommandBuffer(); + cbMask.name = "Mask for " + name; + } + if (cbOutline == null) { + cbOutline = new CommandBuffer(); + cbOutline.name = "Outline for " + name; + } + if (cbOverlay == null) { + cbOverlay = new CommandBuffer(); + cbOverlay.name = "Overlay for " + name; + } + if (cbInnerGlow == null) { + cbInnerGlow = new CommandBuffer(); + cbInnerGlow.name = "Inner Glow for " + name; + } + } + + void CheckBlurCommandBuffer () { + if (cbSmoothBlend == null) { + cbSmoothBlend = new CommandBuffer(); + cbSmoothBlend.name = "Smooth Blend for " + name; + } + } + + void Fork (Material mat, ref Material[] mats, Mesh mesh) { + if (mesh == null) + return; + int count = mesh.subMeshCount; + if (mats == null || mats.Length < count) { + DestroyMaterialArray(mats); + mats = new Material[count]; + } + for (int k = 0; k < count; k++) { + if (mats[k] == null) { + mats[k] = Instantiate(mat); + } + } + } + + void BakeTransform (int objIndex, bool duplicateMesh) { + if (rms[objIndex].mesh == null) + return; + Transform t = rms[objIndex].transform; + Vector3 scale = t.localScale; + if (scale.x >= 0 && scale.y >= 0 && scale.z >= 0) { + rms[objIndex].bakedTransform = false; + return; + } + // Duplicates mesh and bake rotation + Mesh fixedMesh = duplicateMesh ? Instantiate(rms[objIndex].originalMesh) : rms[objIndex].mesh; + Vector3[] vertices = fixedMesh.vertices; + for (int k = 0; k < vertices.Length; k++) { + vertices[k] = t.TransformPoint(vertices[k]); + } + fixedMesh.vertices = vertices; + Vector3[] normals = fixedMesh.normals; + if (normals != null) { + for (int k = 0; k < normals.Length; k++) { + normals[k] = t.TransformVector(normals[k]).normalized; + } + fixedMesh.normals = normals; + } + fixedMesh.RecalculateBounds(); + rms[objIndex].mesh = fixedMesh; + rms[objIndex].bakedTransform = true; + rms[objIndex].currentPosition = t.position; + rms[objIndex].currentRotation = t.eulerAngles; + rms[objIndex].currentScale = t.lossyScale; + } + + public void UpdateMaterialProperties (bool forceNow = false) { + if (forceNow || !Application.isPlaying) { + requireUpdateMaterial = false; + UpdateMaterialPropertiesNow(); + } + else { + requireUpdateMaterial = true; + } + } + + + void UpdateMaterialPropertiesNow () { + + if (rms == null) + return; + + if (ignore) { + _highlighted = false; + } + + + maskRequired = (_highlighted && (outline > 0 || (glow > 0 && !glowIgnoreMask))) || seeThrough != SeeThroughMode.Never || (targetFX && targetFXAlignToGround); + usesSeeThrough = seeThroughIntensity > 0 && (seeThrough == SeeThroughMode.AlwaysWhenOccluded || (seeThrough == SeeThroughMode.WhenHighlighted && _highlighted)); + + Color seeThroughTintColor = this.seeThroughTintColor; + seeThroughTintColor.a = this.seeThroughTintAlpha; + + if (lastOutlineVisibility != outlineVisibility) { + // change by scripting? + if (glowQuality == QualityLevel.Highest && outlineQuality == QualityLevel.Highest) { + glowVisibility = outlineVisibility; + } + lastOutlineVisibility = outlineVisibility; + } + if (extraCoveragePixels < 0) { + extraCoveragePixels = 0; + } + if (outlineWidth < 0) { + outlineWidth = 0; + } + if (padding < 0) { + padding = 0; + } + if (outlineQuality == QualityLevel.Medium) { + outlineOffsetsMin = 4; outlineOffsetsMax = 7; + } + else if (outlineQuality == QualityLevel.High) { + outlineOffsetsMin = 0; outlineOffsetsMax = 7; + } + else { + outlineOffsetsMin = outlineOffsetsMax = 0; + } + if (glowWidth < 0) { + glowWidth = 0; + } + if (glowQuality == QualityLevel.Medium) { + glowOffsetsMin = 4; glowOffsetsMax = 7; + } + else if (glowQuality == QualityLevel.High) { + glowOffsetsMin = 0; glowOffsetsMax = 7; + } + else { + glowOffsetsMin = glowOffsetsMax = 0; + } + if (targetFXTransitionDuration <= 0) { + targetFXTransitionDuration = 0.0001f; + } + if (targetFXStayDuration <= 0) { + targetFXStayDuration = 0; + } + if (targetFXFadePower <= 0) { + targetFXFadePower = 0; + } + if (iconFXTransitionDuration <= 0) { + iconFXTransitionDuration = 0.0001f; + } + if (iconFXAnimationAmount < 0) { + iconFXAnimationAmount = 0; + } + if (iconFXAnimationSpeed < 0) { + iconFXAnimationSpeed = 0; + } + if (iconFXStayDuration < 0) { + iconFXStayDuration = 0; + } + if (iconFXScale < 0) { + iconFXScale = 0; + } + if (seeThroughDepthOffset < 0) { + seeThroughDepthOffset = 0; + } + if (seeThroughMaxDepth < 0) { + seeThroughMaxDepth = 0; + } + if (seeThroughBorderWidth < 0) { + seeThroughBorderWidth = 0; + } + outlineEdgeThreshold = Mathf.Clamp01(outlineEdgeThreshold); + if (outlineSharpness < 1f) { + outlineSharpness = 1f; + } + + shouldBakeSkinnedMesh = optimizeSkinnedMesh && ((outline > 0 && outlineQuality != QualityLevel.Highest) || (glow > 0 && glowQuality != QualityLevel.Highest)); + + // Setup materials + if (usesSeeThrough && seeThroughChildrenSortingMode != SeeThroughSortingMode.Default && rms.Length > 0) { + if (seeThroughChildrenSortingMode == SeeThroughSortingMode.SortByMaterialsRenderQueue) { + Array.Sort(rms, MaterialsRenderQueueComparer); + } + else { + Array.Sort(rms, MaterialsRenderQueueInvertedComparer); + } + } + + // Outline hq + bool useSmoothOutline = outline > 0 && outlineQuality == QualityLevel.Highest; + if (useSmoothOutline) { + CheckBlurCommandBuffer(); + fxMatComposeOutline.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMatComposeOutline.SetColor(ShaderParams.Debug, outlineBlitDebug ? debugColor : blackColor); + fxMatComposeOutline.SetFloat(ShaderParams.OutlineSharpness, outlineSharpness); + if (outlineEdgeMode == OutlineEdgeMode.Exterior) { + fxMatComposeOutline.SetInt(ShaderParams.OutlineStencilCompareFunction, (int)CompareFunction.NotEqual); + fxMatComposeOutline.DisableKeyword(ShaderParams.SKW_ALL_EDGES); + } + else { + fxMatComposeOutline.SetInt(ShaderParams.OutlineStencilCompareFunction, (int)CompareFunction.Always); + fxMatComposeOutline.EnableKeyword(ShaderParams.SKW_ALL_EDGES); + outlineDownsampling = 1; + } + float edgeWidth = outlineWidth; + if (outlineEdgeMode == OutlineEdgeMode.Any) edgeWidth = Mathf.Clamp(edgeWidth, outlineBlurPasses / 5f, outlineBlurPasses); + fxMatBlurOutline.SetFloat(ShaderParams.BlurScale, edgeWidth / outlineDownsampling); + fxMatBlurOutline.SetFloat(ShaderParams.BlurScaleFirstHoriz, edgeWidth * 2f); + } + if (outlineColorStyle == ColorStyle.Gradient && outlineGradient != null) { + const int OUTLINE_GRADIENT_TEX_SIZE = 32; + bool requiresUpdate = false; + if (outlineGradientTex == null) { + outlineGradientTex = new Texture2D(OUTLINE_GRADIENT_TEX_SIZE, 1, TextureFormat.RGBA32, mipChain: false, linear: true); + outlineGradientTex.wrapMode = TextureWrapMode.Clamp; + requiresUpdate = true; + } + if (outlineGradientColors == null || outlineGradientColors.Length != OUTLINE_GRADIENT_TEX_SIZE) { + outlineGradientColors = new Color[OUTLINE_GRADIENT_TEX_SIZE]; + requiresUpdate = true; + } + for (int k = 0; k < OUTLINE_GRADIENT_TEX_SIZE; k++) { + float t = (float)k / OUTLINE_GRADIENT_TEX_SIZE; + Color color = outlineGradient.Evaluate(t); + if (color != outlineGradientColors[k]) { + outlineGradientColors[k] = color; + requiresUpdate = true; + } + } + if (requiresUpdate) { + outlineGradientTex.SetPixels(outlineGradientColors); + outlineGradientTex.Apply(); + } + } + + // Outer glow + bool useSmoothGlow = glow > 0 && glowQuality == QualityLevel.Highest; + if (useSmoothGlow) { + CheckBlurCommandBuffer(); + fxMatComposeGlow.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMatComposeGlow.SetInt(ShaderParams.GlowStencilComp, glowIgnoreMask ? (int)CompareFunction.Always : (int)CompareFunction.NotEqual); + if (glowBlendMode == GlowBlendMode.Additive) { + fxMatComposeGlow.SetInt(ShaderParams.BlendSrc, (int)BlendMode.One); + fxMatComposeGlow.SetInt(ShaderParams.BlendDst, (int)BlendMode.One); + } + else { + fxMatComposeGlow.SetInt(ShaderParams.BlendSrc, (int)BlendMode.SrcAlpha); + fxMatComposeGlow.SetInt(ShaderParams.BlendDst, (int)BlendMode.OneMinusSrcAlpha); + } + fxMatBlurGlow.SetFloat(ShaderParams.BlurScale, glowWidth / glowDownsampling); + fxMatBlurGlow.SetFloat(ShaderParams.Speed, glowAnimationSpeed); + } + + // Target + if (targetFX) { + if (targetFXTexture == null) { + targetFXTexture = Resources.Load("HighlightPlus/target"); + } + fxMatTarget.mainTexture = targetFXTexture; + fxMatTarget.SetInt(ShaderParams.ZTest, GetZTestValue(targetFXVisibility)); + } + // Icon + if (iconFX) { + if (iconFXMesh == null) { + iconFXMesh = Resources.Load("HighlightPlus/IconMesh"); + } + if (fxMatIcon == null) { + fxMatIcon = new Material(Shader.Find("HighlightPlus/Geometry/IconFX")); + } + } + + // Per object materials + bool renderMaskOnTop = _highlighted && ((outline > 0 && outlineVisibility != Visibility.Normal) || (glow > 0 && glowVisibility != Visibility.Normal) || (innerGlow > 0 && innerGlowVisibility != Visibility.Normal)); + bool useVisiblePartContour = outlineContourStyle == ContourStyle.AroundVisibleParts || !(useSmoothGlow || useSmoothOutline); + for (int k = 0; k < rmsCount; k++) { + + if (rms[k].mesh != null) { + + Renderer renderer = rms[k].renderer; + if (renderer == null) + continue; + + // Per submesh + for (int l = 0; l < rms[k].mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + Material mat = null; + renderer.GetSharedMaterials(rendererSharedMaterials); + if (l < rendererSharedMaterials.Count) { + mat = rendererSharedMaterials[l]; + } + if (mat == null) + continue; + + bool hasTexture = false; + Texture matTexture = null; + Vector2 matTextureOffset = Vector2.zero; + Vector2 matTextureScale = Vector2.one; + if (mat.HasProperty(ShaderParams.MainTex)) { + matTexture = mat.GetTexture(ShaderParams.MainTex); + matTextureOffset = mat.mainTextureOffset; + matTextureScale = mat.mainTextureScale; + hasTexture = true; + } + bool useAlphaTest = alphaCutOff > 0 && hasTexture; + + // Mask + if (rms[k].fxMatMask != null && rms[k].fxMatMask.Length > l) { + Material fxMat = rms[k].fxMatMask[l]; + if (fxMat != null) { + if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + } + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (depthClip && useVisiblePartContour && !renderMaskOnTop) { + fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP); + } + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.ZShift, spriteMode ? 0 : 0.0001f); + fxMat.SetFloat(ShaderParams.Padding, padding); + } + } + + // Outline + if (rms[k].fxMatOutline != null && rms[k].fxMatOutline.Length > l) { + Material fxMat = rms[k].fxMatOutline[l]; + float scaledOutlineWidth = (outlineQuality == QualityLevel.High || normalsOption == NormalsOption.Planar) ? 0f : outlineWidth / 100f; + fxMat.SetFloat(ShaderParams.OutlineWidth, scaledOutlineWidth); + fxMat.SetFloat(ShaderParams.OutlineVertexWidth, normalsOption == NormalsOption.Planar ? outlineWidth / 100f : 0); + fxMat.SetVector(ShaderParams.OutlineDirection, Vector3.zero); + fxMat.SetInt(ShaderParams.OutlineZTest, GetZTestValue(outlineVisibility)); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.ConstantWidth, constantWidth ? 1.0f : 0); + fxMat.SetFloat(ShaderParams.MinimumWidth, minimumWidth); + fxMat.DisableKeyword(ShaderParams.SKW_OUTLINE_GRADIENT_WS); + fxMat.DisableKeyword(ShaderParams.SKW_OUTLINE_GRADIENT_LS); + if (useAlphaTest) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (outlineColorStyle == ColorStyle.Gradient) { + fxMat.SetTexture(ShaderParams.OutlineGradientTex, outlineGradientTex); + fxMat.EnableKeyword(outlineGradientInLocalSpace ? ShaderParams.SKW_OUTLINE_GRADIENT_LS : ShaderParams.SKW_OUTLINE_GRADIENT_WS); + } + } + + // Outer Glow + if (rms[k].fxMatGlow != null && rms[k].fxMatGlow.Length > l) { + Material fxMat = rms[k].fxMatGlow[l]; + float actualOutlineWidth = outline > 0 ? outlineWidth : 0; + fxMat.SetVector(ShaderParams.Glow2, new Vector4(normalsOption == NormalsOption.Planar ? 0 : actualOutlineWidth / 100f, glowAnimationSpeed, glowDithering)); + if (glowDitheringStyle == GlowDitheringStyle.Noise) { + fxMat.EnableKeyword(ShaderParams.SKW_DITHER_BLUENOISE); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_DITHER_BLUENOISE); + } + fxMat.SetInt(ShaderParams.GlowZTest, GetZTestValue(glowVisibility)); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.ConstantWidth, constantWidth ? 1.0f : 0); + fxMat.SetFloat(ShaderParams.MinimumWidth, minimumWidth); + fxMat.SetInt(ShaderParams.GlowStencilOp, glowBlendPasses ? (int)StencilOp.Keep : (int)StencilOp.Replace); + fxMat.SetInt(ShaderParams.GlowStencilComp, glowIgnoreMask ? (int)CompareFunction.Always : (int)CompareFunction.NotEqual); + if (useAlphaTest) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + } + + // See-through inner + bool usesSeeThroughBorder = rms[k].fxMatSeeThroughBorder != null && rms[k].fxMatSeeThroughBorder.Length > l && (seeThroughBorder * seeThroughBorderWidth > 0); + if (rms[k].fxMatSeeThroughInner != null && rms[k].fxMatSeeThroughInner.Length > l) { + Material fxMat = rms[k].fxMatSeeThroughInner[l]; + if (fxMat != null) { + fxMat.SetFloat(ShaderParams.SeeThrough, seeThroughIntensity); + fxMat.SetFloat(ShaderParams.SeeThroughNoise, seeThroughNoise); + fxMat.SetColor(ShaderParams.SeeThroughTintColor, seeThroughTintColor); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + if (seeThroughOccluderMaskAccurate && seeThroughOccluderMask != -1) { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 1); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Equal); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Zero); + } + else { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 2); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Greater); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Replace); + } + if (seeThroughOrdered) { + fxMat.SetInt(ShaderParams.ZTest, (int)CompareFunction.LessEqual); + fxMat.SetInt(ShaderParams.SeeThroughOrdered, 1); + } + else { + fxMat.SetInt(ShaderParams.ZTest, (int)CompareFunction.Greater); + fxMat.SetInt(ShaderParams.SeeThroughOrdered, 0); + } + if (hasTexture) { + Texture texture = mat.mainTexture; + fxMat.mainTexture = texture; + fxMat.mainTextureOffset = mat.mainTextureOffset; + fxMat.mainTextureScale = mat.mainTextureScale; + } + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (seeThroughDepthOffset > 0 || seeThroughMaxDepth > 0) { + fxMat.SetFloat(ShaderParams.SeeThroughDepthOffset, seeThroughDepthOffset > 0 ? seeThroughDepthOffset : -1); + fxMat.SetFloat(ShaderParams.SeeThroughMaxDepth, seeThroughMaxDepth > 0 ? seeThroughMaxDepth : 999999); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } + if (seeThroughBorderOnly) { + fxMat.EnableKeyword(ShaderParams.SKW_SEETHROUGH_ONLY_BORDER); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_SEETHROUGH_ONLY_BORDER); + } + + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + if (seeThroughTexture != null) { + fxMat.SetTexture(ShaderParams.SeeThroughTexture, seeThroughTexture); + fxMat.SetFloat(ShaderParams.SeeThroughTextureScale, seeThroughTextureScale); + switch (seeThroughTextureUVSpace) { + case TextureUVSpace.ScreenSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + break; + case TextureUVSpace.ObjectSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + break; + default: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + break; + } + } + + } + } + + // See-through border + if (usesSeeThroughBorder) { + Material fxMat = rms[k].fxMatSeeThroughBorder[l]; + if (fxMat != null) { + fxMat.SetColor(ShaderParams.SeeThroughBorderColor, new Color(seeThroughBorderColor.r, seeThroughBorderColor.g, seeThroughBorderColor.b, seeThroughBorder)); + fxMat.SetFloat(ShaderParams.SeeThroughBorderWidth, (seeThroughBorder * seeThroughBorderWidth) > 0 ? seeThroughBorderWidth / 100f : 0); + fxMat.SetFloat(ShaderParams.SeeThroughBorderConstantWidth, constantWidth ? 1.0f : 0); + fxMat.SetFloat(ShaderParams.SeeThroughBorderMinimumWidth, minimumWidth); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + if (seeThroughOccluderMaskAccurate && seeThroughOccluderMask != -1) { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 1); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Equal); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Zero); + } + else { + fxMat.SetInt(ShaderParams.SeeThroughStencilRef, 2); + fxMat.SetInt(ShaderParams.SeeThroughStencilComp, (int)CompareFunction.Greater); + fxMat.SetInt(ShaderParams.SeeThroughStencilPassOp, (int)StencilOp.Replace); + } + if (seeThroughOrdered) { + fxMat.SetInt(ShaderParams.ZTest, (int)CompareFunction.LessEqual); + fxMat.SetInt(ShaderParams.SeeThroughOrdered, 1); + } + else { + fxMat.SetInt(ShaderParams.ZTest, (int)CompareFunction.Greater); + fxMat.SetInt(ShaderParams.SeeThroughOrdered, 0); + } + if (hasTexture) { + Texture texture = mat.mainTexture; + fxMat.mainTexture = texture; + fxMat.mainTextureOffset = mat.mainTextureOffset; + fxMat.mainTextureScale = mat.mainTextureScale; + } + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (seeThroughDepthOffset > 0 || seeThroughMaxDepth > 0) { + fxMat.SetFloat(ShaderParams.SeeThroughDepthOffset, seeThroughDepthOffset > 0 ? seeThroughDepthOffset : -1); + fxMat.SetFloat(ShaderParams.SeeThroughMaxDepth, seeThroughMaxDepth > 0 ? seeThroughMaxDepth : 999999); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTH_OFFSET); + } + } + } + + // Overlay + if (rms[k].fxMatOverlay != null && rms[k].fxMatOverlay.Length > l) { + Material fxMat = rms[k].fxMatOverlay[l]; + if (fxMat != null) { + if (hasTexture) { + Texture texture = mat.mainTexture; + fxMat.mainTexture = texture; + fxMat.mainTextureOffset = mat.mainTextureOffset; + fxMat.mainTextureScale = mat.mainTextureScale; + } + if (mat.HasProperty(ShaderParams.Color)) { + fxMat.SetColor(ShaderParams.OverlayBackColor, mat.GetColor(ShaderParams.Color)); + } + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetInt(ShaderParams.OverlayZTest, GetZTestValue(overlayVisibility)); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + fxMat.DisableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + if (overlayTexture != null) { + fxMat.SetTexture(ShaderParams.OverlayTexture, overlayTexture); + fxMat.SetVector(ShaderParams.OverlayTextureScrolling, overlayTextureScrolling); + switch (overlayTextureUVSpace) { + case TextureUVSpace.ScreenSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_SCREENSPACE); + break; + case TextureUVSpace.ObjectSpace: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_OBJECTSPACE); + break; + default: + fxMat.EnableKeyword(ShaderParams.SKW_TEXTURE_TRIPLANAR); + break; + } + } + + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + } + } + + // Inner Glow + if (rms[k].fxMatInnerGlow != null && rms[k].fxMatInnerGlow.Length > l) { + Material fxMat = rms[k].fxMatInnerGlow[l]; + if (fxMat != null) { + if (hasTexture) { + Texture texture = mat.mainTexture; + fxMat.mainTexture = texture; + fxMat.mainTextureOffset = mat.mainTextureOffset; + fxMat.mainTextureScale = mat.mainTextureScale; + } + fxMat.SetFloat(ShaderParams.InnerGlowWidth, innerGlowWidth); + fxMat.SetInt(ShaderParams.InnerGlowZTest, GetZTestValue(innerGlowVisibility)); + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetInt(ShaderParams.InnerGlowBlendMode, innerGlowBlendMode == InnerGlowBlendMode.Additive ? 1 : 10); + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + } + } + + // Solid Color for smooth glow + if (rms[k].fxMatSolidColor != null && rms[k].fxMatSolidColor.Length > l) { + Material fxMat = rms[k].fxMatSolidColor[l]; + if (fxMat != null) { + fxMat.color = glowHQColor; + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetInt(ShaderParams.ZTest, GetZTestValue(useSmoothGlow ? glowVisibility : outlineVisibility)); + fxMat.SetFloat(ShaderParams.Padding, padding); + fxMat.SetFloat(ShaderParams.OutlineEdgeThreshold, outlineEdgeThreshold); + if (hasTexture) { + Texture texture = mat.mainTexture; + fxMat.mainTexture = texture; + fxMat.mainTextureOffset = mat.mainTextureOffset; + fxMat.mainTextureScale = mat.mainTextureScale; + } + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (depthClip && !renderMaskOnTop) { + fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP); + } + if (outlineEdgeMode == OutlineEdgeMode.Any) { + fxMat.EnableKeyword(ShaderParams.SKW_ALL_EDGES); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALL_EDGES); + } + fxMat.SetFloat(ShaderParams.ZShift, spriteMode ? 0 : 0.0001f); + } + } + } + } + } + } + + int MaterialsRenderQueueComparer (ModelMaterials m1, ModelMaterials m2) { + Material mat1 = m1.renderer != null ? m1.renderer.sharedMaterial : null; + Material mat2 = m2.renderer != null ? m2.renderer.sharedMaterial : null; + int mq1 = mat1 != null ? mat1.renderQueue : 0; + int mq2 = mat2 != null ? mat2.renderQueue : 0; + return mq1.CompareTo(mq2); + } + + int MaterialsRenderQueueInvertedComparer (ModelMaterials m1, ModelMaterials m2) { + Material mat1 = m1.renderer != null ? m1.renderer.sharedMaterial : null; + Material mat2 = m2.renderer != null ? m2.renderer.sharedMaterial : null; + int mq1 = mat1 != null ? mat1.renderQueue : 0; + int mq2 = mat2 != null ? mat2.renderQueue : 0; + return mq2.CompareTo(mq1); + } + + float ComputeCameraDistanceFade (Vector3 position, Transform cameraTransform) { + Vector3 heading = position - cameraTransform.position; + float distance = Vector3.Dot(heading, cameraTransform.forward); + if (distance < cameraDistanceFadeNear) { + return 1f - Mathf.Min(1f, cameraDistanceFadeNear - distance); + } + if (distance > cameraDistanceFadeFar) { + return 1f - Mathf.Min(1f, distance - cameraDistanceFadeFar); + } + return 1f; + } + + int GetZTestValue (Visibility param) { + switch (param) { + case Visibility.AlwaysOnTop: + return (int)CompareFunction.Always; + case Visibility.OnlyWhenOccluded: + return (int)CompareFunction.Greater; + default: + return (int)CompareFunction.LessEqual; + } + } + + void BuildQuad () { + quadMesh = new Mesh(); + + // Setup vertices + Vector3[] newVertices = new Vector3[4]; + float halfHeight = 0.5f; + float halfWidth = 0.5f; + newVertices[0] = new Vector3(-halfWidth, -halfHeight, 0); + newVertices[1] = new Vector3(-halfWidth, halfHeight, 0); + newVertices[2] = new Vector3(halfWidth, -halfHeight, 0); + newVertices[3] = new Vector3(halfWidth, halfHeight, 0); + + // Setup UVs + Vector2[] newUVs = new Vector2[newVertices.Length]; + newUVs[0] = new Vector2(0, 0); + newUVs[1] = new Vector2(0, 1); + newUVs[2] = new Vector2(1, 0); + newUVs[3] = new Vector2(1, 1); + + // Setup triangles + int[] newTriangles = { 0, 1, 2, 3, 2, 1 }; + + // Setup normals + Vector3[] newNormals = new Vector3[newVertices.Length]; + for (int i = 0; i < newNormals.Length; i++) { + newNormals[i] = Vector3.forward; + } + + // Create quad + quadMesh.vertices = newVertices; + quadMesh.uv = newUVs; + quadMesh.triangles = newTriangles; + quadMesh.normals = newNormals; + + quadMesh.RecalculateBounds(); + } + + void BuildCube () { + cubeMesh = Resources.GetBuiltinResource("Cube.fbx"); + } + + + /// + /// Returns true if a given transform is included in this effect + /// + public bool Includes (Transform transform) { + for (int k = 0; k < rmsCount; k++) { + if (rms[k].transform == transform) return true; + } + return false; + } + + /// + /// Updates profile glow color + /// + public void SetGlowColor (Color color) { + if (glowPasses != null) { + for (int k = 0; k < glowPasses.Length; k++) { + glowPasses[k].color = color; + } + } + glowHQColor = color; + UpdateMaterialProperties(); + } + + + #region Normals handling + + static List vertices; + static List normals; + static Vector3[] newNormals; + static int[] matches; + static readonly Dictionary vv = new Dictionary(); + static readonly List rendererSharedMaterials = new List(); + + // cached meshes + static readonly Dictionary smoothMeshes = new Dictionary(); + static readonly Dictionary reorientedMeshes = new Dictionary(); + static readonly Dictionary combinedMeshes = new Dictionary(); + int combinedMeshesHashId; + + // annotate usage count of the instanced meshes due to normals or combine mesh option + // when highlighte effect is destroyed and the usage count is zero, we destroy the cached mesh + static readonly Dictionary sharedMeshUsage = new Dictionary(); + readonly List instancedMeshes = new List(); + + void AverageNormals (int objIndex) { + if (rms == null || objIndex >= rms.Length) return; + Mesh mesh = rms[objIndex].mesh; + + Mesh newMesh; + int hashCode = mesh.GetHashCode(); + if (!smoothMeshes.TryGetValue(hashCode, out newMesh) || newMesh == null) { + if (!mesh.isReadable) return; + if (normals == null) { + normals = new List(); + } + else { + normals.Clear(); + } + mesh.GetNormals(normals); + int normalsCount = normals.Count; + if (normalsCount == 0) + return; + if (vertices == null) { + vertices = new List(); + } + else { + vertices.Clear(); + } + mesh.GetVertices(vertices); + int vertexCount = vertices.Count; + if (normalsCount < vertexCount) { + vertexCount = normalsCount; + } + if (newNormals == null || newNormals.Length < vertexCount) { + newNormals = new Vector3[vertexCount]; + } + else { + Vector3 zero = Vector3.zero; + for (int k = 0; k < vertexCount; k++) { + newNormals[k] = zero; + } + } + if (matches == null || matches.Length < vertexCount) { + matches = new int[vertexCount]; + } + // Locate overlapping vertices + vv.Clear(); + for (int k = 0; k < vertexCount; k++) { + Vector3 v = vertices[k]; + if (!vv.TryGetValue(v, out int i)) { + vv[v] = i = k; + } + matches[k] = i; + } + // Average normals + for (int k = 0; k < vertexCount; k++) { + int match = matches[k]; + newNormals[match] += normals[k]; + } + for (int k = 0; k < vertexCount; k++) { + int match = matches[k]; + normals[k] = newNormals[match].normalized; + } + // Reassign normals + newMesh = Instantiate(mesh); + newMesh.SetNormals(normals); + smoothMeshes[hashCode] = newMesh; + IncrementeMeshUsage(newMesh); + } + rms[objIndex].mesh = newMesh; + } + + + void ReorientNormals (int objIndex) { + if (rms == null || objIndex >= rms.Length) return; + Mesh mesh = rms[objIndex].mesh; + + Mesh newMesh; + int hashCode = mesh.GetHashCode(); + if (!reorientedMeshes.TryGetValue(hashCode, out newMesh) || newMesh == null) { + if (!mesh.isReadable) return; + if (normals == null) { + normals = new List(); + } + else { + normals.Clear(); + } + if (vertices == null) { + vertices = new List(); + } + else { + vertices.Clear(); + } + mesh.GetVertices(vertices); + int vertexCount = vertices.Count; + if (vertexCount == 0) return; + + Vector3 mid = Vector3.zero; + for (int k = 0; k < vertexCount; k++) { + mid += vertices[k]; + } + mid /= vertexCount; + // Average normals + for (int k = 0; k < vertexCount; k++) { + normals.Add((vertices[k] - mid).normalized); + } + // Reassign normals + newMesh = Instantiate(mesh); + newMesh.SetNormals(normals); + reorientedMeshes[hashCode] = newMesh; + IncrementeMeshUsage(newMesh); + } + rms[objIndex].mesh = newMesh; + } + + const int MAX_VERTEX_COUNT = 65535; + void CombineMeshes () { + + if (rmsCount <= 1) return; + + // Combine meshes of group into the first mesh in rms + if (combineInstances == null || combineInstances.Length != rmsCount) { + combineInstances = new CombineInstance[rmsCount]; + } + int first = -1; + int count = 0; + combinedMeshesHashId = 0; + int vertexCount = 0; + Matrix4x4 im = Matrix4x4.identity; + for (int k = 0; k < rmsCount; k++) { + combineInstances[k].mesh = null; + + if (rms[k].isSkinnedMesh) continue; + + Mesh mesh = rms[k].mesh; + if (mesh == null || !mesh.isReadable) continue; + + vertexCount += mesh.vertexCount; + combineInstances[count].mesh = mesh; + int instanceId = rms[k].renderer.gameObject.GetInstanceID(); + if (first < 0) { + first = k; + combinedMeshesHashId = instanceId; + im = rms[k].transform.worldToLocalMatrix; + } + else { + combinedMeshesHashId ^= instanceId; + rms[k].mesh = null; + } + combineInstances[count].transform = im * rms[k].transform.localToWorldMatrix; + count++; + + } + if (count < 2) return; + + if (count != rmsCount) { + Array.Resize(ref combineInstances, count); + } + + if (!combinedMeshes.TryGetValue(combinedMeshesHashId, out Mesh combinedMesh) || combinedMesh == null) { + combinedMesh = new Mesh(); + if (vertexCount > MAX_VERTEX_COUNT) { + combinedMesh.indexFormat = IndexFormat.UInt32; + } + combinedMesh.CombineMeshes(combineInstances, true, true); + combinedMeshes[combinedMeshesHashId] = combinedMesh; + IncrementeMeshUsage(combinedMesh); + } + rms[first].mesh = combinedMesh; + rms[first].isCombined = true; + } + + + void IncrementeMeshUsage (Mesh mesh) { + int usageCount; + sharedMeshUsage.TryGetValue(mesh, out usageCount); + usageCount++; + sharedMeshUsage[mesh] = usageCount; + instancedMeshes.Add(mesh); + } + + /// + /// Destroys any cached mesh + /// + public static void ClearMeshCache () { + foreach (Mesh mesh in combinedMeshes.Values) { + if (mesh != null) DestroyImmediate(mesh); + } + foreach (Mesh mesh in smoothMeshes.Values) { + if (mesh != null) DestroyImmediate(mesh); + } + foreach (Mesh mesh in reorientedMeshes.Values) { + if (mesh != null) DestroyImmediate(mesh); + } + } + + /// + /// Clears cached mesh only for the highlighted object + /// + void RefreshCachedMeshes () { + if (combinedMeshes.TryGetValue(combinedMeshesHashId, out Mesh combinedMesh)) { + DestroyImmediate(combinedMesh); + combinedMeshes.Remove(combinedMeshesHashId); + } + if (rms == null) return; + for (int k = 0; k < rms.Length; k++) { + Mesh mesh = rms[k].mesh; + if (mesh != null) { + if (smoothMeshes.ContainsValue(mesh) || reorientedMeshes.ContainsValue(mesh)) { + DestroyImmediate(mesh); + } + } + + } + } + #endregion + + } +} diff --git a/Assets/HighlightPlus/Scripts/HighlightEffect.cs.meta b/Assets/HighlightPlus/Scripts/HighlightEffect.cs.meta new file mode 100644 index 0000000..0ad03a7 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 888380afc233049ce9e618f9f36c8ba8 +timeCreated: 1545593776 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 900 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightEffectActions.cs b/Assets/HighlightPlus/Scripts/HighlightEffectActions.cs new file mode 100644 index 0000000..62fe3a5 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffectActions.cs @@ -0,0 +1,108 @@ +using UnityEngine; + +namespace HighlightPlus { + + public enum HitFxMode { + Overlay = 0, + InnerGlow = 1, + LocalHit = 2 + } + + public partial class HighlightEffect : MonoBehaviour { + + public static bool useUnscaledTime; + + public static float GetTime() { + return useUnscaledTime ? Time.unscaledTime : Time.time; + } + + [Range(0,1)] public float hitFxInitialIntensity; + public HitFxMode hitFxMode = HitFxMode.Overlay; + public float hitFxFadeOutDuration = 0.25f; + [ColorUsage(true, true)] public Color hitFxColor = Color.white; + public float hitFxRadius = 0.5f; + + float hitInitialIntensity; + float hitStartTime; + float hitFadeOutDuration; + Color hitColor; + bool hitActive; + Vector3 hitPosition; + float hitRadius; + + /// + /// Performs a hit effect using default values + /// + public void HitFX() { + HitFX(hitFxColor, hitFxFadeOutDuration, hitFxInitialIntensity); + } + + /// + /// Performs a hit effect localized at hit position and radius with default values + /// + public void HitFX(Vector3 position) { + HitFX(hitFxColor, hitFxFadeOutDuration, hitFxInitialIntensity, position, hitFxRadius); + + } + + /// + /// Performs a hit effect using desired color, fade out duration and optionally initial intensity (0-1) + /// + public void HitFX(Color color, float fadeOutDuration, float initialIntensity = 1f) { + hitInitialIntensity = initialIntensity; + hitFadeOutDuration = fadeOutDuration; + hitColor = color; + hitStartTime = GetTime(); + hitActive = true; + if (overlay == 0) { + UpdateMaterialProperties(); + } + } + + + /// + /// Performs a hit effect using desired color, fade out duration, initial intensity (0-1), hit position and radius of effect + /// + public void HitFX(Color color, float fadeOutDuration, float initialIntensity, Vector3 position, float radius) { + hitInitialIntensity = initialIntensity; + hitFadeOutDuration = fadeOutDuration; + hitColor = color; + hitStartTime = GetTime(); + hitActive = true; + hitPosition = position; + hitRadius = radius; + if (overlay == 0) { + UpdateMaterialProperties(); + } + } + + /// + /// Initiates the target FX on demand using predefined configuration (see targetFX... properties) + /// + public void TargetFX() { + targetFXStartTime = GetTime(); + if (!_highlighted) { + highlighted = true; + } + if (!targetFX) { + targetFX = true; + UpdateMaterialProperties(); + } + } + + + /// + /// Initiates the icon FX on demand using predefined configuration (see iconFX... properties) + /// + public void IconFX() { + iconFXStartTime = GetTime(); + if (!_highlighted) { + highlighted = true; + } + if (!iconFX) { + iconFX = true; + UpdateMaterialProperties(); + } + } + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Scripts/HighlightEffectActions.cs.meta b/Assets/HighlightPlus/Scripts/HighlightEffectActions.cs.meta new file mode 100644 index 0000000..1461989 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffectActions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e749f80d0d29a49d49d6e0f4752065cd +timeCreated: 1542876337 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightEffectBlocker.cs b/Assets/HighlightPlus/Scripts/HighlightEffectBlocker.cs new file mode 100644 index 0000000..4678547 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffectBlocker.cs @@ -0,0 +1,52 @@ +using UnityEngine; + +namespace HighlightPlus { + + [ExecuteInEditMode] + [DefaultExecutionOrder(-100)] + public class HighlightEffectBlocker : MonoBehaviour { + + MeshFilter mf; + public bool blockOutlineAndGlow; + public bool blockOverlay; + + Material blockerOutlineAndGlowMat; + Material blockerOverlayMat; + Material blockerAllMat; + + void OnEnable () { + mf = GetComponentInChildren(); + if (blockerOutlineAndGlowMat == null) { + blockerOutlineAndGlowMat = Resources.Load("HighlightPlus/HighlightBlockerOutlineAndGlow"); + } + if (blockerOverlayMat == null) { + blockerOverlayMat = Resources.Load("HighlightPlus/HighlightBlockerOverlay"); + } + if (blockerAllMat == null) { + blockerAllMat = Resources.Load("HighlightPlus/HighlightUIMask"); + } + } + + + void Update () { + int stencilID = 0; + if (blockOutlineAndGlow) { + stencilID = 2; + } + if (blockOverlay) { + stencilID += 4; + } + if (stencilID == 0 || mf == null || mf.sharedMesh == null) return; + + if (stencilID == 2) { + Graphics.DrawMesh(mf.sharedMesh, mf.transform.localToWorldMatrix, blockerOutlineAndGlowMat, gameObject.layer); + } + else if (stencilID == 4) { + Graphics.DrawMesh(mf.sharedMesh, mf.transform.localToWorldMatrix, blockerOverlayMat, gameObject.layer); + } + else if (stencilID == 6) { + Graphics.DrawMesh(mf.sharedMesh, mf.transform.localToWorldMatrix, blockerAllMat, gameObject.layer); + } + } + } +} diff --git a/Assets/HighlightPlus/Scripts/HighlightEffectBlocker.cs.meta b/Assets/HighlightPlus/Scripts/HighlightEffectBlocker.cs.meta new file mode 100644 index 0000000..3b9a168 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffectBlocker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bf27e8a45e8e248faaec25d9934b288a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightEffectOccluderManager.cs b/Assets/HighlightPlus/Scripts/HighlightEffectOccluderManager.cs new file mode 100644 index 0000000..a149282 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffectOccluderManager.cs @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +namespace HighlightPlus { + + + public partial class HighlightEffect : MonoBehaviour { + + static readonly List occluders = new List(); + static readonly Dictionary occludersFrameCount = new Dictionary(); + static CommandBuffer cbOccluder; + static Material fxMatSeeThroughOccluder, fxMatDepthWrite; + static RaycastHit[] hits; + static Collider[] colliders; + + /// + /// True if the see-through is cancelled by an occluder using raycast method + /// + public bool IsSeeThroughOccluded(Camera cam) { + // Compute bounds + Bounds bounds = new Bounds(); + for (int r = 0; r < rms.Length; r++) { + if (rms[r].renderer != null) { + if (bounds.size.x == 0) { + bounds = rms[r].renderer.bounds; + } else { + bounds.Encapsulate(rms[r].renderer.bounds); + } + } + } + Vector3 pos = bounds.center; + Vector3 camPos = cam.transform.position; + Vector3 offset = pos - camPos; + float maxDistance = Vector3.Distance(pos, camPos); + if (hits == null || hits.Length == 0) { + hits = new RaycastHit[64]; + } + int occludersCount = occluders.Count; + int hitCount = Physics.BoxCastNonAlloc(pos - offset, bounds.extents * 0.9f, offset.normalized, hits, Quaternion.identity, maxDistance); + for (int k = 0; k < hitCount; k++) { + for (int j = 0; j < occludersCount; j++) { + if (hits[k].collider.transform == occluders[j].transform) { + return true; + } + } + } + return false; + } + + public static void RegisterOccluder(HighlightSeeThroughOccluder occluder) { + if (!occluders.Contains(occluder)) { + occluders.Add(occluder); + } + } + + public static void UnregisterOccluder(HighlightSeeThroughOccluder occluder) { + if (occluders.Contains(occluder)) { + occluders.Remove(occluder); + } + } + + /// + /// Test see-through occluders. + /// + /// The camera to be tested + /// Returns true if there's no raycast-based occluder cancelling the see-through effect + public bool RenderSeeThroughOccluders(Camera cam) { + + int occludersCount = occluders.Count; + if (occludersCount == 0 || rmsCount == 0) return true; + + bool useRayCastCheck = false; + // Check if raycast method is needed + for (int k = 0; k < occludersCount; k++) { + HighlightSeeThroughOccluder occluder = occluders[k]; + if (occluder == null || !occluder.isActiveAndEnabled) continue; + if (occluder.mode == OccluderMode.BlocksSeeThrough && occluder.detectionMethod == DetectionMethod.RayCast) { + useRayCastCheck = true; + break; + } + } + if (useRayCastCheck) { + if (IsSeeThroughOccluded(cam)) return false; + } + + // do not render see-through occluders more than once this frame per camera (there can be many highlight effect scripts in the scene, we only need writing to stencil once) + int lastFrameCount; + occludersFrameCount.TryGetValue(cam, out lastFrameCount); + int currentFrameCount = Time.frameCount; + if (currentFrameCount == lastFrameCount) return true; + occludersFrameCount[cam] = currentFrameCount; + + if (cbOccluder == null) { + cbOccluder = new CommandBuffer(); + cbOccluder.name = "Occluder"; + } + + if (fxMatSeeThroughOccluder == null) { + InitMaterial(ref fxMatSeeThroughOccluder, "HighlightPlus/Geometry/SeeThroughOccluder"); + if (fxMatSeeThroughOccluder == null) return true; + } + if (fxMatDepthWrite == null) { + InitMaterial(ref fxMatDepthWrite, "HighlightPlus/Geometry/JustDepth"); + if (fxMatDepthWrite == null) return true; + } + + cbOccluder.Clear(); + for (int k = 0; k < occludersCount; k++) { + HighlightSeeThroughOccluder occluder = occluders[k]; + if (occluder == null || !occluder.isActiveAndEnabled) continue; + if (occluder.detectionMethod == DetectionMethod.Stencil) { + if (occluder.meshData == null) continue; + int meshDataLength = occluder.meshData.Length; + // Per renderer + for (int m = 0; m < meshDataLength; m++) { + // Per submesh + Renderer renderer = occluder.meshData[m].renderer; + if (renderer.isVisible) { + for (int s = 0; s < occluder.meshData[m].subMeshCount; s++) { + cbOccluder.DrawRenderer(renderer, occluder.mode == OccluderMode.BlocksSeeThrough ? fxMatSeeThroughOccluder : fxMatDepthWrite, s); + } + } + } + } + } + Graphics.ExecuteCommandBuffer(cbOccluder); + + return true; + } + + bool CheckOcclusion(Camera cam) { + + if (!perCameraOcclusionData.TryGetValue(cam, out PerCameraOcclusionData occlusionData)) { + occlusionData = new PerCameraOcclusionData(); + perCameraOcclusionData[cam] = occlusionData; + } + + float now = GetTime(); + int frameCount = Time.frameCount; // ensure all cameras are checked this frame + + if (now - occlusionData.checkLastTime < seeThroughOccluderCheckInterval && Application.isPlaying && occlusionData.occlusionRenderFrame != frameCount) return occlusionData.lastOcclusionTestResult; + + occlusionData.cachedOccluders.Clear(); + occlusionData.cachedOccluderCollider = null; + + if (rms == null || rms.Length == 0 || rms[0].renderer == null) return false; + + occlusionData.checkLastTime = now; + occlusionData.occlusionRenderFrame = frameCount; + + Vector3 camPos = cam.transform.position; + if (colliders == null || colliders.Length == 0) { + colliders = new Collider[1]; + } + + if (seeThroughOccluderCheckIndividualObjects) { + for (int r = 0; r < rms.Length; r++) { + if (rms[r].renderer != null) { + Bounds bounds = rms[r].renderer.bounds; + Vector3 pos = bounds.center; + float maxDistance = Vector3.Distance(pos, camPos); + Vector3 extents = bounds.extents * seeThroughOccluderThreshold; + if (Physics.BoxCast(pos, extents, (camPos - pos).normalized, out RaycastHit hitInfo, Quaternion.identity, maxDistance, seeThroughOccluderMask)) { + occlusionData.cachedOccluderCollider = hitInfo.collider; + occlusionData.lastOcclusionTestResult = true; + return true; + } + // Need to check if the occluder is overlapping the object + if (Physics.OverlapBoxNonAlloc(pos, extents, colliders, Quaternion.identity, seeThroughOccluderMask) > 0) { + occlusionData.cachedOccluderCollider = colliders[0]; + occlusionData.lastOcclusionTestResult = true; + return true; + } + } + } + occlusionData.lastOcclusionTestResult = false; + return false; + } else { + // Compute combined bounds + Bounds bounds = rms[0].renderer.bounds; + for (int r = 1; r < rms.Length; r++) { + if (rms[r].renderer != null) { + bounds.Encapsulate(rms[r].renderer.bounds); + } + } + Vector3 pos = bounds.center; + float maxDistance = Vector3.Distance(pos, camPos); + Vector3 extents = bounds.extents * seeThroughOccluderThreshold; + if (Physics.BoxCast(pos, extents, (camPos - pos).normalized, out RaycastHit hitInfo, Quaternion.identity, maxDistance, seeThroughOccluderMask)) { + occlusionData.cachedOccluderCollider = hitInfo.collider; + occlusionData.lastOcclusionTestResult = true; + return true; + } + + // Need to check if the occluder is overlapping the object + if (Physics.OverlapBoxNonAlloc(pos, extents, colliders, Quaternion.identity, seeThroughOccluderMask) > 0) { + occlusionData.cachedOccluderCollider = colliders[0]; + occlusionData.lastOcclusionTestResult = true; + return true; + } + occlusionData.lastOcclusionTestResult = false; + return false; + } + } + + + const int MAX_OCCLUDER_HITS = 50; + static RaycastHit[] occluderHits; + + void AddWithoutRepetition(List target, List source, LayerMask layerMask) { + int sourceCount = source.Count; + for (int k = 0; k < sourceCount; k++) { + Renderer entry = source[k]; + if (entry != null && !target.Contains(entry) && ValidRenderer(entry) && ((1< 0) { + cbSeeThrough.Clear(); + for (int k = 0; k < occluderRenderersCount; k++) { + Renderer r = occlusionData.cachedOccluders[k]; + if (r != null) { + cbSeeThrough.DrawRenderer(r, fxMatSeeThroughMask); + } + } + Graphics.ExecuteCommandBuffer(cbSeeThrough); + } + } + + public void GetOccluders(Camera camera, List occluders) { + occluders.Clear(); + if (perCameraOcclusionData.TryGetValue(camera, out PerCameraOcclusionData occlusionData)) { + if (occlusionData.cachedOccluderCollider != null) { + occluders.Add(occlusionData.cachedOccluderCollider.transform); + return; + } + foreach (Renderer r in occlusionData.cachedOccluders) { + if (r != null) { + occluders.Add(r.transform); + } + } + } + } + } +} diff --git a/Assets/HighlightPlus/Scripts/HighlightEffectOccluderManager.cs.meta b/Assets/HighlightPlus/Scripts/HighlightEffectOccluderManager.cs.meta new file mode 100644 index 0000000..c459f5e --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightEffectOccluderManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d0bc1f04199a64e66ae9630062b3a6ad +timeCreated: 1542876337 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightManager.cs b/Assets/HighlightPlus/Scripts/HighlightManager.cs new file mode 100644 index 0000000..eca9118 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightManager.cs @@ -0,0 +1,466 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace HighlightPlus { + + [RequireComponent(typeof(HighlightEffect))] + [DefaultExecutionOrder(100)] + [HelpURL("https://kronnect.com/guides/highlight-plus-introduction/")] + public class HighlightManager : MonoBehaviour { + + [Tooltip("Enables highlight when pointer is over this object.")] + [SerializeField] + bool _highlightOnHover = true; + + public bool highlightOnHover { + get { return _highlightOnHover; } + set { + if (_highlightOnHover != value) { + _highlightOnHover = value; + if (!_highlightOnHover) { + if (currentEffect != null) { + Highlight(false); + } + } + + } + } + } + + public LayerMask layerMask = -1; + public Camera raycastCamera; + public RayCastSource raycastSource = RayCastSource.MousePosition; + [Tooltip("Minimum distance for target.")] + public float minDistance; + [Tooltip("Maximum distance for target. 0 = infinity")] + public float maxDistance; + [Tooltip("Blocks interaction if pointer is over an UI element")] + public bool respectUI = true; + + [Tooltip("If the object will be selected by clicking with mouse or tapping on it.")] + public bool selectOnClick; + [Tooltip("Optional profile for objects selected by clicking on them")] + public HighlightProfile selectedProfile; + [Tooltip("Profile to use whtn object is selected and highlighted.")] + public HighlightProfile selectedAndHighlightedProfile; + [Tooltip("Automatically deselects other previously selected objects")] + public bool singleSelection; + [Tooltip("Toggles selection on/off when clicking object")] + public bool toggle; + [Tooltip("Keeps current selection when clicking outside of any selectable object")] + public bool keepSelection = true; + + HighlightEffect baseEffect, currentEffect; + Transform currentObject; + RaycastHit2D[] hitInfo2D; + + public readonly static List selectedObjects = new List(); + public event OnObjectSelectionEvent OnObjectSelected; + public event OnObjectSelectionEvent OnObjectUnSelected; + public event OnObjectHighlightEvent OnObjectHighlightStart; + public event OnObjectHighlightEvent OnObjectHighlightStay; + public event OnObjectHighlightEvent OnObjectHighlightEnd; + public static int lastTriggerFrame; + + static HighlightManager _instance; + public static HighlightManager instance { + get { + if (_instance == null) { + _instance = Misc.FindObjectOfType(); + } + return _instance; + } + } + + [RuntimeInitializeOnLoadMethod] + static void DomainReloadDisabledSupport() { + selectedObjects.Clear(); + lastTriggerFrame = 0; + _instance = null; + } + + void OnEnable() { + currentObject = null; + currentEffect = null; + if (baseEffect == null) { + baseEffect = GetComponent(); + if (baseEffect == null) { + baseEffect = gameObject.AddComponent(); + } + } + if (raycastCamera == null) { + raycastCamera = GetCamera(); + if (raycastCamera == null) { + Debug.LogError("Highlight Manager: no camera found!"); + } + } + hitInfo2D = new RaycastHit2D[1]; + InputProxy.Init(); + } + + + void OnDisable () { + SwitchesObject (null); + internal_DeselectAll(); + } + + void Update() { + if (raycastCamera == null) + return; + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + if (respectUI) { + EventSystem es = EventSystem.current; + if (es == null) { + es = CreateEventSystem(); + } + List raycastResults = new List(); + PointerEventData eventData = new PointerEventData(es); + Vector3 cameraPos = raycastCamera.transform.position; + if (raycastSource == RayCastSource.MousePosition) { + eventData.position = InputProxy.mousePosition; + } else { + eventData.position = new Vector2(raycastCamera.pixelWidth * 0.5f, raycastCamera.pixelHeight * 0.5f); + } + es.RaycastAll(eventData, raycastResults); + int hitCount = raycastResults.Count; + // check UI blocker + bool blocked = false; + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + if (rr.module is UnityEngine.UI.GraphicRaycaster) { + blocked = true; + break; + } + } + if (blocked) return; + + // look for our gameobject + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + float distance = Vector3.Distance(rr.worldPosition, cameraPos); + if (distance < minDistance || (maxDistance > 0 && distance > maxDistance)) continue; + + GameObject theGameObject = rr.gameObject; + if ((layerMask & (1 << rr.gameObject.layer)) == 0) continue; + + // is this object state controller by Highlight Trigger? + HighlightTrigger trigger = theGameObject.GetComponent(); + if (trigger != null) return; + + // Toggles selection + Transform t = theGameObject.transform; + if (InputProxy.GetMouseButtonDown(0)) { + if (selectOnClick) { + ToggleSelection(t, !toggle); + } + } else { + // Check if the object has a Highlight Effect + if (t != currentObject) { + SwitchesObject(t); + } + } + return; + } + } + // if not blocked by UI and no hit found, fallback to raycast (required if no PhysicsRaycaster is present on the camera) +#endif + + Ray ray; + if (raycastSource == RayCastSource.MousePosition) { +#if !(ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER) + if (!CanInteract()) { + return; + } +#endif + ray = raycastCamera.ScreenPointToRay(InputProxy.mousePosition); + } else { + ray = new Ray(raycastCamera.transform.position, raycastCamera.transform.forward); + } + + VerifyHighlightStay(); + + RaycastHit hitInfo; + if (Physics.Raycast(ray, out hitInfo, maxDistance > 0 ? maxDistance : raycastCamera.farClipPlane, layerMask) && Vector3.Distance(hitInfo.point, ray.origin) >= minDistance) { + Transform t = hitInfo.collider.transform; + // is this object state controller by Highlight Trigger? + HighlightTrigger trigger = t.GetComponent(); + if (trigger != null) return; + + // Toggles selection + if (InputProxy.GetMouseButtonDown(0)) { + if (selectOnClick) { + ToggleSelection(t, !toggle); + } + } else { + // Check if the object has a Highlight Effect + if (t != currentObject) { + SwitchesObject(t); + } + } + return; + } else // check sprites + if (Physics2D.GetRayIntersectionNonAlloc(ray, hitInfo2D, maxDistance > 0 ? maxDistance : raycastCamera.farClipPlane, layerMask) > 0 && Vector3.Distance(hitInfo2D[0].point, ray.origin) >= minDistance) { + Transform t = hitInfo2D[0].collider.transform; + // is this object state controller by Highlight Trigger? + HighlightTrigger trigger = t.GetComponent(); + if (trigger != null) return; + + // Toggles selection + if (InputProxy.GetMouseButtonDown(0)) { + if (selectOnClick) { + ToggleSelection(t, !toggle); + } + } else { + // Check if the object has a Highlight Effect + if (t != currentObject) { + SwitchesObject(t); + } + } + return; + } + + // no hit + if (selectOnClick && !keepSelection && InputProxy.GetMouseButtonDown(0) && lastTriggerFrame < Time.frameCount) { + internal_DeselectAll(); + } + SwitchesObject (null); + } + + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + EventSystem CreateEventSystem() { + GameObject eo = new GameObject("Event System created by Highlight Plus", typeof(EventSystem), typeof(UnityEngine.InputSystem.UI.InputSystemUIInputModule)); + return eo.GetComponent(); + } +#endif + void VerifyHighlightStay() { + if (currentObject == null || currentEffect == null || !currentEffect.highlighted) return; + if (OnObjectHighlightStay != null && !OnObjectHighlightStay(currentObject.gameObject)) { + SwitchesObject(null); + } + } + + void SwitchesObject (Transform newObject) { + if (currentEffect != null) { + if (highlightOnHover) { + Highlight(false); + } + currentEffect = null; + } + currentObject = newObject; + if (newObject == null) return; + HighlightTrigger ht = newObject.GetComponent(); + if (ht != null && ht.enabled) + return; + + HighlightEffect otherEffect = newObject.GetComponent(); + if (otherEffect == null) { + // Check if there's a parent highlight effect that includes this object + HighlightEffect parentEffect = newObject.GetComponentInParent(); + if (parentEffect != null && parentEffect.Includes(newObject)) { + currentEffect = parentEffect; + if (highlightOnHover) { + Highlight(true); + } + return; + } + } + currentEffect = otherEffect != null ? otherEffect : baseEffect; + baseEffect.enabled = currentEffect == baseEffect; + currentEffect.SetTarget(currentObject); + + if (highlightOnHover) { + Highlight(true); + } + } + +#if !(ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER) + bool CanInteract() { + if (!respectUI) return true; + EventSystem es = EventSystem.current; + if (es == null) return true; + if (Application.isMobilePlatform && InputProxy.touchCount > 0 && es.IsPointerOverGameObject(InputProxy.GetFingerIdFromTouch(0))) { + return false; + } else if (es.IsPointerOverGameObject(-1)) + return false; + return true; + } +#endif + + void ToggleSelection(Transform t, bool forceSelection) { + + // We need a highlight effect on each selected object + HighlightEffect hb = t.GetComponent(); + if (hb == null) { + HighlightEffect parentEffect = t.GetComponentInParent(); + if (parentEffect != null && parentEffect.Includes(t)) { + hb = parentEffect; + if (hb.previousSettings == null) { + hb.previousSettings = ScriptableObject.CreateInstance(); + } + hb.previousSettings.Save(hb); + } else { + hb = t.gameObject.AddComponent(); + hb.previousSettings = ScriptableObject.CreateInstance(); + // copy default highlight effect settings from this manager into this highlight plus component + hb.previousSettings.Save(baseEffect); + hb.previousSettings.Load(hb); + } + } + + bool currentState = hb.isSelected; + bool newState = forceSelection ? true : !currentState; + if (newState == currentState) return; + + if (newState) { + if (OnObjectSelected != null && !OnObjectSelected(t.gameObject)) return; + } else { + if (OnObjectUnSelected != null && !OnObjectUnSelected(t.gameObject)) return; + } + + if (singleSelection) { + internal_DeselectAll(); + } + + currentEffect = hb; + currentEffect.isSelected = newState; + baseEffect.enabled = false; + + if (currentEffect.isSelected) { + if (currentEffect.previousSettings == null) { + currentEffect.previousSettings = ScriptableObject.CreateInstance(); + } + hb.previousSettings.Save(hb); + + if (!selectedObjects.Contains(currentEffect)) { + selectedObjects.Add(currentEffect); + } + } else { + if (currentEffect.previousSettings != null) { + currentEffect.previousSettings.Load(hb); + } + if (selectedObjects.Contains(currentEffect)) { + selectedObjects.Remove(currentEffect); + } + } + + Highlight(newState); + } + + void Highlight(bool state) { + if (currentEffect == null) return; + + if (state) { + if (!currentEffect.highlighted) { + if (OnObjectHighlightStart != null && currentEffect.target != null) { + if (!OnObjectHighlightStart(currentEffect.target.gameObject)) { + currentObject = null; // allows re-checking so it keeps checking with the event + return; + } + } + } + } else { + if (currentEffect.highlighted) { + if (OnObjectHighlightEnd != null && currentEffect.target != null) { + OnObjectHighlightEnd(currentEffect.target.gameObject); + } + } + } + if (selectOnClick || currentEffect.isSelected) { + if (currentEffect.isSelected) { + if (state && selectedAndHighlightedProfile != null) { + selectedAndHighlightedProfile.Load(currentEffect); + } else if (selectedProfile != null) { + selectedProfile.Load(currentEffect); + } else { + currentEffect.previousSettings.Load(currentEffect); + } + if (currentEffect.highlighted && currentEffect.fading != HighlightEffect.FadingState.FadingOut) { + currentEffect.UpdateMaterialProperties(); + } else { + currentEffect.SetHighlighted(true); + } + return; + } else if (!highlightOnHover) { + currentEffect.SetHighlighted(false); + return; + } + } + currentEffect.SetHighlighted(state); + } + + public static Camera GetCamera() { + Camera raycastCamera = Camera.main; + if (raycastCamera == null) { + raycastCamera = Misc.FindObjectOfType(); + } + return raycastCamera; + } + + void internal_DeselectAll() { + foreach (HighlightEffect hb in selectedObjects) { + if (hb != null && hb.gameObject != null) { + if (OnObjectUnSelected != null) { + if (!OnObjectUnSelected(hb.gameObject)) continue; + } + hb.RestorePreviousHighlightEffectSettings(); + hb.isSelected = false; + hb.SetHighlighted(false); + } + } + selectedObjects.Clear(); + } + + /// + /// Deselects any selected object in the scene + /// + public static void DeselectAll () { + if (instance != null) { + _instance.internal_DeselectAll(); + return; + } + + foreach (HighlightEffect hb in selectedObjects) { + if (hb != null && hb.gameObject != null) { + hb.RestorePreviousHighlightEffectSettings(); + hb.isSelected = false; + hb.SetHighlighted(false); + } + } + selectedObjects.Clear(); + } + + /// + /// Manually causes highlight manager to select an object + /// + public void SelectObject(Transform t) { + ToggleSelection(t, true); + } + + /// + /// Manually causes highlight manager to toggle selection on an object + /// + public void ToggleObject(Transform t) { + ToggleSelection(t, false); + } + + /// + /// Manually causes highlight manager to unselect an object + /// + public void UnselectObject(Transform t) { + if (t == null) return; + HighlightEffect hb = t.GetComponent(); + if (hb == null) return; + + if (hb.isSelected) { + ToggleSelection(t, false); + } + } + + + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Scripts/HighlightManager.cs.meta b/Assets/HighlightPlus/Scripts/HighlightManager.cs.meta new file mode 100644 index 0000000..5f9c58e --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: af4d46fd89b9543e5be2358ac0c9ced0 +timeCreated: 1542876337 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightProfile.cs b/Assets/HighlightPlus/Scripts/HighlightProfile.cs new file mode 100644 index 0000000..8e447ca --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightProfile.cs @@ -0,0 +1,506 @@ +using UnityEngine; + +namespace HighlightPlus { + + [CreateAssetMenu(menuName = "Highlight Plus Profile", fileName = "Highlight Plus Profile", order = 100)] + [HelpURL("https://www.dropbox.com/s/v9qgn68ydblqz8x/Documentation.pdf?dl=0")] + public class HighlightProfile : ScriptableObject { + + [Tooltip("Different options to specify which objects are affected by this Highlight Effect component.")] + public TargetOptions effectGroup = TargetOptions.Children; + [Tooltip("The layer that contains the affected objects by this effect when effectGroup is set to LayerMask.")] + public LayerMask effectGroupLayer = -1; + + [Tooltip("Only include objects whose names contains this text.")] + public string effectNameFilter; + + [Tooltip("Use RegEx to determine if an object name matches the effectNameFilter.")] + public bool effectNameUseRegEx; + + [Tooltip("Combine meshes of all objects in this group affected by Highlight Effect reducing draw calls.")] + public bool combineMeshes; + [Tooltip("The alpha threshold for transparent cutout objects. Pixels with alpha below this value will be discarded.")] + [Range(0, 1)] + public float alphaCutOff; + [Tooltip("If back facing triangles are ignored.Backfaces triangles are not visible but you may set this property to false to force highlight effects to act on those triangles as well.")] + public bool cullBackFaces = true; + [Tooltip("Adds a empty margin between the mesh and the effects")] + public float padding; + + public bool depthClip; + [Tooltip("Normals handling option:\nPreserve original: use original mesh normals.\nSmooth: average normals to produce a smoother outline/glow mesh based effect.\nReorient: recomputes normals based on vertex direction to centroid.")] + public NormalsOption normalsOption; + + public float fadeInDuration; + public float fadeOutDuration; + + [Tooltip("Fades out effects based on distance to camera")] + public bool cameraDistanceFade; + + [Tooltip("The closest distance particles can get to the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeNear; + + [Tooltip("The farthest distance particles can get away from the camera before they fade from the camera’s view.")] + public float cameraDistanceFadeFar = 1000; + + [Tooltip("Keeps the outline/glow size unaffected by object distance.")] + public bool constantWidth = true; + + [Tooltip("Increases the screen coverage for the outline/glow to avoid cuts when using cloth or vertex shader that transform mesh vertices")] + public int extraCoveragePixels; + + [Tooltip("Minimum width when the constant width option is not used")] + [Range(0, 1)] + public float minimumWidth; + + [Range(0, 1)] + [Tooltip("Intensity of the overlay effect. A value of 0 disables the overlay completely.")] + public float overlay; + public OverlayMode overlayMode = OverlayMode.WhenHighlighted; + [ColorUsage(true, true)] public Color overlayColor = Color.yellow; + public float overlayAnimationSpeed = 1f; + [Range(0, 1)] + public float overlayMinIntensity = 0.5f; + [Range(0, 1)] + [Tooltip("Controls the blending or mix of the overlay color with the natural colors of the object.")] + public float overlayBlending = 1.0f; + [Tooltip("Optional overlay texture.")] + public Texture2D overlayTexture; + public TextureUVSpace overlayTextureUVSpace; + public float overlayTextureScale = 1f; + public Vector2 overlayTextureScrolling; + public Visibility overlayVisibility = Visibility.Normal; + + [Range(0, 1)] + [Tooltip("Intensity of the outline. A value of 0 disables the outline completely.")] + public float outline = 1f; + [ColorUsage(true, true)] public Color outlineColor = Color.black; + public ColorStyle outlineColorStyle = ColorStyle.SingleColor; + [GradientUsage(hdr: true, ColorSpace.Linear)] public Gradient outlineGradient; + public bool outlineGradientInLocalSpace; + [Range(1, 3)] + public int outlineBlurPasses = 2; + public float outlineWidth = 0.45f; + public QualityLevel outlineQuality = QualityLevel.High; + public OutlineEdgeMode outlineEdgeMode = OutlineEdgeMode.Exterior; + public float outlineEdgeThreshold = 0.995f; + public float outlineSharpness = 1f; + [Range(1, 8)] + [Tooltip("Reduces the quality of the outline but improves performance a bit.")] + public int outlineDownsampling = 1; + public bool outlineOptimalBlit = true; + public ContourStyle outlineContourStyle = ContourStyle.AroundVisibleParts; + + public Visibility outlineVisibility = Visibility.Normal; + [Tooltip("If enabled, this object won't combine the outline with other objects.")] + public bool outlineIndependent; + + [Range(0, 5)] + [Tooltip("The intensity of the outer glow effect. A value of 0 disables the glow completely.")] + public float glow; + public float glowWidth = 0.4f; + public QualityLevel glowQuality = QualityLevel.High; + public BlurMethod glowBlurMethod = BlurMethod.Gaussian; + [Range(1, 8)] + [Tooltip("Reduces the quality of the glow but improves performance a bit.")] + public int glowDownsampling = 2; + [ColorUsage(true, true)] public Color glowHQColor = new Color(0.64f, 1f, 0f, 1f); + [Tooltip("When enabled, outer glow renders with dithering. When disabled, glow appears as a solid color.")] + [Range(0, 1)] + public float glowDithering = 1; + public GlowDitheringStyle glowDitheringStyle = GlowDitheringStyle.Pattern; + public bool glowOptimalBlit = true; + [Tooltip("Seed for the dithering effect")] + public float glowMagicNumber1 = 0.75f; + [Tooltip("Another seed for the dithering effect that combines with first seed to create different patterns")] + public float glowMagicNumber2 = 0.5f; + public float glowAnimationSpeed = 1f; + public Visibility glowVisibility = Visibility.Normal; + public GlowBlendMode glowBlendMode = GlowBlendMode.Additive; + [Tooltip("Blends glow passes one after another. If this option is disabled, glow passes won't overlap (in this case, make sure the glow pass 1 has a smaller offset than pass 2, etc.)")] + public bool glowBlendPasses = true; + public GlowPassData[] glowPasses; + [Tooltip("If enabled, glow effect will not use a stencil mask. This can be used to render the glow effect alone.")] + public bool glowIgnoreMask; + + [Range(0, 5f)] + [Tooltip("The intensity of the inner glow effect. A value of 0 disables the glow completely.")] + public float innerGlow; + [Range(0, 2)] + public float innerGlowWidth = 1f; + public InnerGlowBlendMode innerGlowBlendMode = InnerGlowBlendMode.Additive; + [ColorUsage(true, true)] public Color innerGlowColor = Color.white; + public Visibility innerGlowVisibility = Visibility.Normal; + + [Tooltip("Enables the targetFX effect. This effect draws an animated sprite over the object.")] + public bool targetFX; + public Texture2D targetFXTexture; + [ColorUsage(true, true)] public Color targetFXColor = Color.white; + public float targetFXRotationSpeed = 50f; + public float targetFXInitialScale = 4f; + public float targetFXEndScale = 1.5f; + [Tooltip("Makes target scale relative to object renderer bounds.")] + public bool targetFXScaleToRenderBounds; + [Tooltip("Places target FX sprite at the bottom of the highlighted object.")] + public bool targetFXAlignToGround; + [Tooltip("Max distance from the center of the highlighted object to the ground.")] + public float targetFXGroundMaxDistance = 15f; + public LayerMask targetFXGroundLayerMask = -1; + [Tooltip("Fade out effect with altitude")] + public float targetFXFadePower = 32; + [Tooltip("Enable to render a single target FX effect at the center of the enclosing bounds")] + public bool targetFXUseEnclosingBounds; + [Tooltip("Optional world space offset for the position of the targetFX effect")] + public Vector3 targetFXOffset; + public float targetFXTransitionDuration = 0.5f; + public float targetFXStayDuration = 1.5f; + public Visibility targetFXVisibility = Visibility.AlwaysOnTop; + + + [Tooltip("Enables the iconFX effect. This effect draws an animated object over the object.")] + public bool iconFX; + public Mesh iconFXMesh; + [ColorUsage(true, true)] public Color iconFXLightColor = Color.white; + [ColorUsage(true, true)] public Color iconFXDarkColor = Color.gray; + public float iconFXRotationSpeed = 50f; + public IconAnimationOption iconFXAnimationOption = IconAnimationOption.None; + public float iconFXAnimationAmount = 0.1f; + public float iconFXAnimationSpeed = 3f; + public float iconFXScale = 1f; + [Tooltip("Makes target scale relative to object renderer bounds.")] + public bool iconFXScaleToRenderBounds; + [Tooltip("Optional world space offset for the position of the iconFX effect")] + public Vector3 iconFXOffset = new Vector3(0, 1, 0); + public float iconFXTransitionDuration = 0.5f; + [Tooltip("0 = stay forever")] + public float iconFXStayDuration = 1.5f; + + [Tooltip("See-through mode for this Highlight Effect component.")] + public SeeThroughMode seeThrough = SeeThroughMode.Never; + [Tooltip("This mask setting let you specify which objects will be considered as occluders and cause the see-through effect for this Highlight Effect component. For example, you assign your walls to a different layer and specify that layer here, so only walls and not other objects, like ground or ceiling, will trigger the see-through effect.")] + public LayerMask seeThroughOccluderMask = -1; + [Tooltip("Uses stencil buffers to ensure pixel-accurate occlusion test. If this option is disabled, only physics raycasting is used to test for occlusion.")] + public bool seeThroughOccluderMaskAccurate; + [Tooltip("A multiplier for the occluder volume size which can be used to reduce the actual size of occluders when Highlight Effect checks if they're occluding this object.")] + [Range(0.01f, 0.9f)] public float seeThroughOccluderThreshold = 0.4f; + [Tooltip("The interval of time between occlusion tests.")] + public float seeThroughOccluderCheckInterval = 1f; + [Tooltip("If enabled, occlusion test is performed for each children element. If disabled, the bounds of all children is combined and a single occlusion test is performed for the combined bounds.")] + public bool seeThroughOccluderCheckIndividualObjects; + [Tooltip("Shows the see-through effect only if the occluder if at this 'offset' distance from the object.")] + public float seeThroughDepthOffset; + [Tooltip("Hides the see-through effect if the occluder is further than this distance from the object (0 = infinite)")] + public float seeThroughMaxDepth; + [Range(0, 5f)] public float seeThroughIntensity = 0.8f; + [Range(0, 1)] public float seeThroughTintAlpha = 0.5f; + public Color seeThroughTintColor = Color.red; + [Range(0, 1)] public float seeThroughNoise = 1f; + [Range(0, 1)] public float seeThroughBorder; + public Color seeThroughBorderColor = Color.black; + public float seeThroughBorderWidth = 0.45f; + [Tooltip("Only display the border instead of the full see-through effect.")] + public bool seeThroughBorderOnly; + [Tooltip("Renders see-through effect on overlapping objects in a sequence that's relative to the distance to the camera")] + public bool seeThroughOrdered = true; + [Tooltip("Optional see-through mask effect texture.")] + public Texture2D seeThroughTexture; + public TextureUVSpace seeThroughTextureUVSpace; + public float seeThroughTextureScale = 1f; + [Tooltip("The order by which children objects are rendered by the see-through effect")] + public SeeThroughSortingMode seeThroughChildrenSortingMode = SeeThroughSortingMode.Default; + + [Range(0, 1)] public float hitFxInitialIntensity; + public HitFxMode hitFxMode = HitFxMode.Overlay; + public float hitFxFadeOutDuration = 0.25f; + [ColorUsage(true, true)] public Color hitFxColor = Color.white; + public float hitFxRadius = 0.5f; + + public void Load (HighlightEffect effect) { + effect.effectGroup = effectGroup; + effect.effectGroupLayer = effectGroupLayer; + effect.effectNameFilter = effectNameFilter; + effect.effectNameUseRegEx = effectNameUseRegEx; + effect.combineMeshes = combineMeshes; + effect.alphaCutOff = alphaCutOff; + effect.cullBackFaces = cullBackFaces; + effect.padding = padding; + effect.depthClip = depthClip; + effect.normalsOption = normalsOption; + effect.fadeInDuration = fadeInDuration; + effect.fadeOutDuration = fadeOutDuration; + effect.cameraDistanceFade = cameraDistanceFade; + effect.cameraDistanceFadeFar = cameraDistanceFadeFar; + effect.cameraDistanceFadeNear = cameraDistanceFadeNear; + effect.constantWidth = constantWidth; + effect.extraCoveragePixels = extraCoveragePixels; + effect.minimumWidth = minimumWidth; + effect.overlay = overlay; + effect.overlayMode = overlayMode; + effect.overlayColor = overlayColor; + effect.overlayAnimationSpeed = overlayAnimationSpeed; + effect.overlayMinIntensity = overlayMinIntensity; + effect.overlayBlending = overlayBlending; + effect.overlayTexture = overlayTexture; + effect.overlayTextureUVSpace = overlayTextureUVSpace; + effect.overlayTextureScale = overlayTextureScale; + effect.overlayTextureScrolling = overlayTextureScrolling; + effect.overlayVisibility = overlayVisibility; + effect.outline = outline; + effect.outlineColor = outlineColor; + effect.outlineColorStyle = outlineColorStyle; + effect.outlineGradient = outlineGradient; + effect.outlineGradientInLocalSpace = outlineGradientInLocalSpace; + effect.outlineWidth = outlineWidth; + effect.outlineBlurPasses = outlineBlurPasses; + effect.outlineQuality = outlineQuality; + effect.outlineEdgeMode = outlineEdgeMode; + effect.outlineEdgeThreshold = outlineEdgeThreshold; + effect.outlineOptimalBlit = outlineOptimalBlit; + effect.outlineSharpness = outlineSharpness; + effect.outlineDownsampling = outlineDownsampling; + effect.outlineVisibility = outlineVisibility; + effect.outlineIndependent = outlineIndependent; + effect.outlineContourStyle = outlineContourStyle; + effect.glow = glow; + effect.glowWidth = glowWidth; + effect.glowQuality = glowQuality; + effect.glowBlurMethod = glowBlurMethod; + effect.glowOptimalBlit = glowOptimalBlit; + effect.glowDownsampling = glowDownsampling; + effect.glowHQColor = glowHQColor; + effect.glowDithering = glowDithering; + effect.glowDitheringStyle = glowDitheringStyle; + effect.glowMagicNumber1 = glowMagicNumber1; + effect.glowMagicNumber2 = glowMagicNumber2; + effect.glowAnimationSpeed = glowAnimationSpeed; + effect.glowVisibility = glowVisibility; + effect.glowBlendMode = glowBlendMode; + effect.glowBlendPasses = glowBlendPasses; + effect.glowPasses = GetGlowPassesCopy(glowPasses); + effect.glowIgnoreMask = glowIgnoreMask; + effect.innerGlow = innerGlow; + effect.innerGlowWidth = innerGlowWidth; + effect.innerGlowColor = innerGlowColor; + effect.innerGlowBlendMode = innerGlowBlendMode; + effect.innerGlowVisibility = innerGlowVisibility; + effect.targetFX = targetFX; + effect.targetFXColor = targetFXColor; + effect.targetFXInitialScale = targetFXInitialScale; + effect.targetFXEndScale = targetFXEndScale; + effect.targetFXScaleToRenderBounds = targetFXScaleToRenderBounds; + effect.targetFXAlignToGround = targetFXAlignToGround; + effect.targetFXGroundMaxDistance = targetFXGroundMaxDistance; + effect.targetFXGroundLayerMask = targetFXGroundLayerMask; + effect.targetFXFadePower = targetFXFadePower; + effect.targetFXRotationSpeed = targetFXRotationSpeed; + effect.targetFXStayDuration = targetFXStayDuration; + effect.targetFXTexture = targetFXTexture; + effect.targetFXTransitionDuration = targetFXTransitionDuration; + effect.targetFXVisibility = targetFXVisibility; + effect.targetFXUseEnclosingBounds = targetFXUseEnclosingBounds; + effect.targetFXOffset = targetFXOffset; + effect.iconFX = iconFX; + effect.iconFXMesh = iconFXMesh; + effect.iconFXLightColor = iconFXLightColor; + effect.iconFXDarkColor = iconFXDarkColor; + effect.iconFXAnimationOption = iconFXAnimationOption; + effect.iconFXAnimationAmount = iconFXAnimationAmount; + effect.iconFXAnimationSpeed = iconFXAnimationSpeed; + effect.iconFXScale = iconFXScale; + effect.iconFXScaleToRenderBounds = iconFXScaleToRenderBounds; + effect.iconFXOffset = iconFXOffset; + effect.iconFXRotationSpeed = iconFXRotationSpeed; + effect.iconFXStayDuration = iconFXStayDuration; + effect.iconFXTransitionDuration = iconFXTransitionDuration; + effect.seeThrough = seeThrough; + effect.seeThroughOccluderMask = seeThroughOccluderMask; + effect.seeThroughOccluderMaskAccurate = seeThroughOccluderMaskAccurate; + effect.seeThroughOccluderThreshold = seeThroughOccluderThreshold; + effect.seeThroughOccluderCheckInterval = seeThroughOccluderCheckInterval; + effect.seeThroughOccluderCheckIndividualObjects = seeThroughOccluderCheckIndividualObjects; + effect.seeThroughIntensity = seeThroughIntensity; + effect.seeThroughTintAlpha = seeThroughTintAlpha; + effect.seeThroughTintColor = seeThroughTintColor; + effect.seeThroughNoise = seeThroughNoise; + effect.seeThroughBorder = seeThroughBorder; + effect.seeThroughBorderColor = seeThroughBorderColor; + effect.seeThroughBorderWidth = seeThroughBorderWidth; + effect.seeThroughBorderOnly = seeThroughBorderOnly; + effect.seeThroughDepthOffset = seeThroughDepthOffset; + effect.seeThroughMaxDepth = seeThroughMaxDepth; + effect.seeThroughOrdered = seeThroughOrdered; + effect.seeThroughTexture = seeThroughTexture; + effect.seeThroughTextureScale = seeThroughTextureScale; + effect.seeThroughTextureUVSpace = seeThroughTextureUVSpace; + effect.seeThroughChildrenSortingMode = seeThroughChildrenSortingMode; + effect.hitFxInitialIntensity = hitFxInitialIntensity; + effect.hitFxMode = hitFxMode; + effect.hitFxFadeOutDuration = hitFxFadeOutDuration; + effect.hitFxColor = hitFxColor; + effect.hitFxRadius = hitFxRadius; + effect.UpdateMaterialProperties(); + } + + public void Save (HighlightEffect effect) { + effectGroup = effect.effectGroup; + effectGroupLayer = effect.effectGroupLayer; + effectNameFilter = effect.effectNameFilter; + effectNameUseRegEx = effect.effectNameUseRegEx; + combineMeshes = effect.combineMeshes; + alphaCutOff = effect.alphaCutOff; + cullBackFaces = effect.cullBackFaces; + padding = effect.padding; + depthClip = effect.depthClip; + normalsOption = effect.normalsOption; + fadeInDuration = effect.fadeInDuration; + fadeOutDuration = effect.fadeOutDuration; + cameraDistanceFade = effect.cameraDistanceFade; + cameraDistanceFadeFar = effect.cameraDistanceFadeFar; + cameraDistanceFadeNear = effect.cameraDistanceFadeNear; + constantWidth = effect.constantWidth; + extraCoveragePixels = effect.extraCoveragePixels; + minimumWidth = effect.minimumWidth; + overlay = effect.overlay; + overlayMode = effect.overlayMode; + overlayColor = effect.overlayColor; + overlayAnimationSpeed = effect.overlayAnimationSpeed; + overlayMinIntensity = effect.overlayMinIntensity; + overlayBlending = effect.overlayBlending; + overlayTexture = effect.overlayTexture; + overlayTextureUVSpace = effect.overlayTextureUVSpace; + overlayTextureScale = effect.overlayTextureScale; + overlayTextureScrolling = effect.overlayTextureScrolling; + overlayVisibility = effect.overlayVisibility; + outline = effect.outline; + outlineColor = effect.outlineColor; + outlineColorStyle = effect.outlineColorStyle; + outlineGradient = effect.outlineGradient; + outlineGradientInLocalSpace = effect.outlineGradientInLocalSpace; + outlineWidth = effect.outlineWidth; + outlineBlurPasses = effect.outlineBlurPasses; + outlineQuality = effect.outlineQuality; + outlineEdgeMode = effect.outlineEdgeMode; + outlineEdgeThreshold = effect.outlineEdgeThreshold; + outlineSharpness = effect.outlineSharpness; + outlineDownsampling = effect.outlineDownsampling; + outlineVisibility = effect.outlineVisibility; + outlineIndependent = effect.outlineIndependent; + outlineOptimalBlit = effect.outlineOptimalBlit; + outlineContourStyle = effect.outlineContourStyle; + glow = effect.glow; + glowWidth = effect.glowWidth; + glowQuality = effect.glowQuality; + glowBlurMethod = effect.glowBlurMethod; + glowOptimalBlit = effect.glowOptimalBlit; + glowDownsampling = effect.glowDownsampling; + glowHQColor = effect.glowHQColor; + glowDithering = effect.glowDithering; + glowDitheringStyle = effect.glowDitheringStyle; + glowMagicNumber1 = effect.glowMagicNumber1; + glowMagicNumber2 = effect.glowMagicNumber2; + glowAnimationSpeed = effect.glowAnimationSpeed; + glowVisibility = effect.glowVisibility; + glowBlendMode = effect.glowBlendMode; + glowBlendPasses = effect.glowBlendPasses; + glowPasses = GetGlowPassesCopy(effect.glowPasses); + glowIgnoreMask = effect.glowIgnoreMask; + innerGlow = effect.innerGlow; + innerGlowWidth = effect.innerGlowWidth; + innerGlowColor = effect.innerGlowColor; + innerGlowBlendMode = effect.innerGlowBlendMode; + innerGlowVisibility = effect.innerGlowVisibility; + targetFX = effect.targetFX; + targetFXColor = effect.targetFXColor; + targetFXInitialScale = effect.targetFXInitialScale; + targetFXEndScale = effect.targetFXEndScale; + targetFXScaleToRenderBounds = effect.targetFXScaleToRenderBounds; + targetFXAlignToGround = effect.targetFXAlignToGround; + targetFXGroundMaxDistance = effect.targetFXGroundMaxDistance; + targetFXGroundLayerMask = effect.targetFXGroundLayerMask; + targetFXFadePower = effect.targetFXFadePower; + targetFXRotationSpeed = effect.targetFXRotationSpeed; + targetFXStayDuration = effect.targetFXStayDuration; + targetFXTexture = effect.targetFXTexture; + targetFXTransitionDuration = effect.targetFXTransitionDuration; + targetFXVisibility = effect.targetFXVisibility; + targetFXUseEnclosingBounds = effect.targetFXUseEnclosingBounds; + targetFXOffset = effect.targetFXOffset; + iconFX = effect.iconFX; + iconFXMesh = effect.iconFXMesh; + iconFXLightColor = effect.iconFXLightColor; + iconFXDarkColor = effect.iconFXDarkColor; + iconFXAnimationOption = effect.iconFXAnimationOption; + iconFXAnimationAmount = effect.iconFXAnimationAmount; + iconFXAnimationSpeed = effect.iconFXAnimationSpeed; + iconFXScaleToRenderBounds = effect.iconFXScaleToRenderBounds; + iconFXScale = effect.iconFXScale; + iconFXOffset = effect.iconFXOffset; + iconFXRotationSpeed = effect.iconFXRotationSpeed; + iconFXStayDuration = effect.iconFXStayDuration; + iconFXTransitionDuration = effect.iconFXTransitionDuration; + seeThrough = effect.seeThrough; + seeThroughOccluderMask = effect.seeThroughOccluderMask; + seeThroughOccluderMaskAccurate = effect.seeThroughOccluderMaskAccurate; + seeThroughOccluderThreshold = effect.seeThroughOccluderThreshold; + seeThroughOccluderCheckInterval = effect.seeThroughOccluderCheckInterval; + seeThroughOccluderCheckIndividualObjects = effect.seeThroughOccluderCheckIndividualObjects; + seeThroughIntensity = effect.seeThroughIntensity; + seeThroughTintAlpha = effect.seeThroughTintAlpha; + seeThroughTintColor = effect.seeThroughTintColor; + seeThroughNoise = effect.seeThroughNoise; + seeThroughBorder = effect.seeThroughBorder; + seeThroughBorderColor = effect.seeThroughBorderColor; + seeThroughBorderWidth = effect.seeThroughBorderWidth; + seeThroughDepthOffset = effect.seeThroughDepthOffset; + seeThroughBorderOnly = effect.seeThroughBorderOnly; + seeThroughMaxDepth = effect.seeThroughMaxDepth; + seeThroughOrdered = effect.seeThroughOrdered; + seeThroughTexture = effect.seeThroughTexture; + seeThroughTextureScale = effect.seeThroughTextureScale; + seeThroughTextureUVSpace = effect.seeThroughTextureUVSpace; + seeThroughChildrenSortingMode = effect.seeThroughChildrenSortingMode; + hitFxInitialIntensity = effect.hitFxInitialIntensity; + hitFxMode = effect.hitFxMode; + hitFxFadeOutDuration = effect.hitFxFadeOutDuration; + hitFxColor = effect.hitFxColor; + hitFxRadius = effect.hitFxRadius; + } + + GlowPassData[] GetGlowPassesCopy (GlowPassData[] glowPasses) { + if (glowPasses == null) { + return new GlowPassData[0]; + } + GlowPassData[] pd = new GlowPassData[glowPasses.Length]; + for (int k = 0; k < glowPasses.Length; k++) { + pd[k].alpha = glowPasses[k].alpha; + pd[k].color = glowPasses[k].color; + pd[k].offset = glowPasses[k].offset; + } + return pd; + } + + public void OnValidate () { + outlineEdgeThreshold = Mathf.Clamp01(outlineEdgeThreshold); + outlineSharpness = Mathf.Max(outlineSharpness, 1f); + extraCoveragePixels = Mathf.Max(0, extraCoveragePixels); + seeThroughDepthOffset = Mathf.Max(0, seeThroughDepthOffset); + seeThroughMaxDepth = Mathf.Max(0, seeThroughMaxDepth); + seeThroughBorderWidth = Mathf.Max(0, seeThroughBorderWidth); + targetFXFadePower = Mathf.Max(0, targetFXFadePower); + cameraDistanceFadeNear = Mathf.Max(0, cameraDistanceFadeNear); + cameraDistanceFadeFar = Mathf.Max(0, cameraDistanceFadeFar); + iconFXScale = Mathf.Max(0, iconFXScale); + iconFXAnimationAmount = Mathf.Max(0, iconFXAnimationAmount); + iconFXAnimationSpeed = Mathf.Max(0, iconFXAnimationSpeed); + if (glowPasses == null || glowPasses.Length == 0) { + glowPasses = new GlowPassData[4]; + glowPasses[0] = new GlowPassData() { offset = 4, alpha = 0.1f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[1] = new GlowPassData() { offset = 3, alpha = 0.2f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[2] = new GlowPassData() { offset = 2, alpha = 0.3f, color = new Color(0.64f, 1f, 0f, 1f) }; + glowPasses[3] = new GlowPassData() { offset = 1, alpha = 0.4f, color = new Color(0.64f, 1f, 0f, 1f) }; + } + } + + } +} + diff --git a/Assets/HighlightPlus/Scripts/HighlightProfile.cs.meta b/Assets/HighlightPlus/Scripts/HighlightProfile.cs.meta new file mode 100644 index 0000000..9238d3e --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightProfile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8e9253636bf2648bd813257f451f8486 +timeCreated: 1549831900 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightSeeThroughOccluder.cs b/Assets/HighlightPlus/Scripts/HighlightSeeThroughOccluder.cs new file mode 100644 index 0000000..807d13c --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightSeeThroughOccluder.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace HighlightPlus { + + public struct MeshData { + public Renderer renderer; + public int subMeshCount; + } + + public enum OccluderMode { + BlocksSeeThrough, + TriggersSeeThrough + } + + public enum DetectionMethod { + Stencil = 0, + RayCast = 1 + } + [ExecuteInEditMode] + public class HighlightSeeThroughOccluder : MonoBehaviour { + + public OccluderMode mode = OccluderMode.BlocksSeeThrough; + + public DetectionMethod detectionMethod = DetectionMethod.Stencil; + + [NonSerialized] + public MeshData[] meshData; + + List rr; + + void OnEnable () { + if (gameObject.activeInHierarchy) { + Init(); + } + } + + void Init() { + + if (mode == OccluderMode.BlocksSeeThrough && detectionMethod == DetectionMethod.RayCast) { + HighlightEffect.RegisterOccluder(this); + return; + } + + if (rr == null) { + rr = new List(); + } else { + rr.Clear(); + } + GetComponentsInChildren(rr); + int rrCount = rr.Count; + meshData = new MeshData[rrCount]; + for (int k = 0; k < rrCount; k++) { + meshData[k].renderer = rr[k]; + meshData[k].subMeshCount = 1; + if (rr[k] is MeshRenderer) { + MeshFilter mf = rr[k].GetComponent(); + if (mf != null && mf.sharedMesh != null) { + meshData[k].subMeshCount = mf.sharedMesh.subMeshCount; + } + } else if (rr[k] is SkinnedMeshRenderer) { + SkinnedMeshRenderer smr = (SkinnedMeshRenderer)rr[k]; + meshData[k].subMeshCount = smr.sharedMesh.subMeshCount; + } + } + if (rrCount > 0) { + HighlightEffect.RegisterOccluder(this); + } + } + + void OnDisable () { + HighlightEffect.UnregisterOccluder(this); + } + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Scripts/HighlightSeeThroughOccluder.cs.meta b/Assets/HighlightPlus/Scripts/HighlightSeeThroughOccluder.cs.meta new file mode 100644 index 0000000..677b0f5 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightSeeThroughOccluder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8dd965ceab19c4729a9dabd8aeb2972a +timeCreated: 1542876337 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/HighlightTrigger.cs b/Assets/HighlightPlus/Scripts/HighlightTrigger.cs new file mode 100644 index 0000000..933b86e --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightTrigger.cs @@ -0,0 +1,456 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace HighlightPlus { + + public enum TriggerMode { + ColliderEventsOnlyOnThisObject = 0, + RaycastOnThisObjectAndChildren = 1, + Volume = 2 + } + + public enum RayCastSource { + MousePosition = 0, + CameraDirection = 1 + } + + + [RequireComponent(typeof(HighlightEffect))] + [ExecuteInEditMode] + [HelpURL("https://kronnect.com/guides/highlight-plus-introduction/")] + public class HighlightTrigger : MonoBehaviour { + + [Tooltip("Enables highlight when pointer is over this object.")] + public bool highlightOnHover = true; + [Tooltip("Used to trigger automatic highlighting including children objects.")] +#if ENABLE_INPUT_SYSTEM + public TriggerMode triggerMode = TriggerMode.RaycastOnThisObjectAndChildren; +#else + public TriggerMode triggerMode = TriggerMode.ColliderEventsOnlyOnThisObject; +#endif + public Camera raycastCamera; + public RayCastSource raycastSource = RayCastSource.MousePosition; + public LayerMask raycastLayerMask = -1; + [Tooltip("Minimum distance for target.")] + public float minDistance; + [Tooltip("Maximum distance for target. 0 = infinity")] + public float maxDistance; + [Tooltip("Blocks interaction if pointer is over an UI element")] + public bool respectUI = true; + public LayerMask volumeLayerMask; + + const int MAX_RAYCAST_HITS = 100; + + + [Tooltip("If the object will be selected by clicking with mouse or tapping on it.")] + public bool selectOnClick; + [Tooltip("Profile to use when object is selected by clicking on it.")] + public HighlightProfile selectedProfile; + [Tooltip("Profile to use whtn object is selected and highlighted.")] + public HighlightProfile selectedAndHighlightedProfile; + [Tooltip("Automatically deselects any other selected object prior selecting this one")] + public bool singleSelection; + [Tooltip("Toggles selection on/off when clicking object")] + public bool toggle; + [Tooltip("Keeps current selection when clicking outside of any selectable object")] + public bool keepSelection = true; + + [NonSerialized] public Collider[] colliders; + [NonSerialized] public Collider2D[] colliders2D; + + public bool hasColliders => colliders != null && colliders.Length > 0; + public bool hasColliders2D => colliders2D != null && colliders2D.Length > 0; + + UnityEngine.Object currentCollider; + static RaycastHit[] hits; + static RaycastHit2D[] hits2D; + HighlightEffect hb; + + public HighlightEffect highlightEffect { get { return hb; } } + + public event OnObjectSelectionEvent OnObjectSelected; + public event OnObjectSelectionEvent OnObjectUnSelected; + public event OnObjectHighlightEvent OnObjectHighlightStart; + public event OnObjectHighlightEvent OnObjectHighlightStay; + public event OnObjectHighlightEvent OnObjectHighlightEnd; + + TriggerMode currentTriggerMode; + + + [RuntimeInitializeOnLoadMethod] + static void DomainReloadDisabledSupport() { + HighlightManager.selectedObjects.Clear(); + } + + void OnEnable() { + Init(); + } + + private void OnValidate() { + if (currentTriggerMode != triggerMode) { + UpdateTriggers(); + } + } + + void UpdateTriggers() { + currentTriggerMode = triggerMode; + if (currentTriggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + colliders = GetComponentsInChildren(); + colliders2D = GetComponentsInChildren(); + if (hits == null || hits.Length != MAX_RAYCAST_HITS) { + hits = new RaycastHit[MAX_RAYCAST_HITS]; + } + if (hits2D == null || hits2D.Length != MAX_RAYCAST_HITS) { + hits2D = new RaycastHit2D[MAX_RAYCAST_HITS]; + } + if (Application.isPlaying) { + StopAllCoroutines(); + if (isActiveAndEnabled) { + StartCoroutine(DoRayCast()); + } + } + } + } + + + public void Init() { + if (raycastCamera == null) { + raycastCamera = HighlightManager.GetCamera(); + } + UpdateTriggers(); + if (hb == null) { + hb = GetComponent(); + } + InputProxy.Init(); + } + + void Start() { + UpdateTriggers(); + if (triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + if (raycastCamera == null) { + raycastCamera = HighlightManager.GetCamera(); + if (raycastCamera == null) { + Debug.LogError("Highlight Trigger on " + gameObject.name + ": no camera found!"); + } + } + } else { + Collider collider = GetComponent(); + if (collider == null) { + if (GetComponent() != null) { + gameObject.AddComponent(); + } + } + } + } + + + IEnumerator DoRayCast() { + yield return null; + WaitForEndOfFrame w = new WaitForEndOfFrame(); + while (triggerMode == TriggerMode.RaycastOnThisObjectAndChildren) { + if (raycastCamera == null) { + yield return null; + continue; + } + + int hitCount; + bool hit = false; + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + if (respectUI) { + EventSystem es = EventSystem.current; + if (es == null) { + es = CreateEventSystem(); + } + List raycastResults = new List(); + PointerEventData eventData = new PointerEventData(es); + Vector3 cameraPos = raycastCamera.transform.position; + if (raycastSource == RayCastSource.MousePosition) { + eventData.position = InputProxy.mousePosition; + } else { + eventData.position = new Vector2(raycastCamera.pixelWidth * 0.5f, raycastCamera.pixelHeight * 0.5f); + } + es.RaycastAll(eventData, raycastResults); + hitCount = raycastResults.Count; + // check UI blocker + bool blocked = false; + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + if (rr.module is UnityEngine.UI.GraphicRaycaster) { + blocked = true; + break; + } + } + if (blocked) { + yield return null; + continue; + } + // look for our gameobject + for (int k = 0; k < hitCount; k++) { + RaycastResult rr = raycastResults[k]; + float distance = Vector3.Distance(rr.worldPosition, cameraPos); + if (distance < minDistance || (maxDistance > 0 && distance > maxDistance)) continue; + + GameObject theGameObject = rr.gameObject; + for (int c = 0; c < colliders.Length; c++) { + if (colliders[c].gameObject == theGameObject) { + Collider theCollider = colliders[c]; + hit = true; + if (selectOnClick && InputProxy.GetMouseButtonDown(0)) { + ToggleSelection(); + break; + } else if (theCollider != currentCollider) { + SwitchCollider(theCollider); + k = hitCount; + break; + } + } + } + } + } + // if not blocked by UI and no hit found, fallback to raycast (required if no PhysicsRaycaster is present on the camera) + +#endif + Ray ray; + if (raycastSource == RayCastSource.MousePosition) { +#if !(ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER) + + if (!CanInteract()) { + yield return null; + continue; + } +#endif + ray = raycastCamera.ScreenPointToRay(InputProxy.mousePosition); + } else { + ray = new Ray(raycastCamera.transform.position, raycastCamera.transform.forward); + } + + + VerifyHighlightStay(); + + bool isMouseButonDown = InputProxy.GetMouseButtonDown(0); + if (hasColliders2D) { + if (maxDistance > 0) { + hitCount = Physics2D.GetRayIntersectionNonAlloc(ray, hits2D, maxDistance, raycastLayerMask); + } else { + hitCount = Physics2D.GetRayIntersectionNonAlloc(ray, hits2D, float.MaxValue, raycastLayerMask); + } + for (int k = 0; k < hitCount; k++) { + if (Vector3.Distance(hits2D[k].point, ray.origin) < minDistance) continue; + Collider2D theCollider = hits2D[k].collider; + int colliders2DCount = colliders2D.Length; + for (int c = 0; c < colliders2DCount; c++) { + if (colliders2D[c] == theCollider) { + hit = true; + if (selectOnClick && isMouseButonDown) { + ToggleSelection(); + break; + } else if (theCollider != currentCollider) { + SwitchCollider(theCollider); + k = hitCount; + break; + } + } + } + } + } + if (hasColliders) { + if (maxDistance > 0) { + hitCount = Physics.RaycastNonAlloc(ray, hits, maxDistance, raycastLayerMask); + } else { + hitCount = Physics.RaycastNonAlloc(ray, hits, float.MaxValue, raycastLayerMask); + } + for (int k = 0; k < hitCount; k++) { + if (Vector3.Distance(hits[k].point, ray.origin) < minDistance) continue; + Collider theCollider = hits[k].collider; + int collidersCount = colliders.Length; + for (int c = 0; c < collidersCount; c++) { + if (colliders[c] == theCollider) { + hit = true; + if (selectOnClick && isMouseButonDown) { + ToggleSelection(); + break; + } else if (theCollider != currentCollider) { + SwitchCollider(theCollider); + k = hitCount; + break; + } + } + } + } + } + + + if (!hit && currentCollider != null) { + SwitchCollider(null); + } + + if (selectOnClick && isMouseButonDown && !keepSelection && !hit) { + yield return w; // wait for other potential triggers to act + if (HighlightManager.lastTriggerFrame < Time.frameCount) { + if (OnObjectUnSelected != null) OnObjectUnSelected(gameObject); + HighlightManager.DeselectAll(); + } + } + + yield return null; + } + } + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + EventSystem CreateEventSystem() { + GameObject eo = new GameObject("Event System created by Highlight Plus", typeof(EventSystem), typeof(UnityEngine.InputSystem.UI.InputSystemUIInputModule)); + return eo.GetComponent(); + } +#endif + + void VerifyHighlightStay() { + if (hb == null || !hb.highlighted) return; + if (OnObjectHighlightStay != null && !OnObjectHighlightStay(hb.gameObject)) { + SwitchCollider(null); + } + } + + void SwitchCollider(UnityEngine.Object newCollider) { + if (!highlightOnHover && !hb.isSelected) return; + + currentCollider = newCollider; + if (currentCollider != null) { + Highlight(true); + } else { + Highlight(false); + } + } + + bool CanInteract() { + if (!respectUI) return true; + EventSystem es = EventSystem.current; + if (es == null) return true; + if (Application.isMobilePlatform && InputProxy.touchCount > 0 && es.IsPointerOverGameObject(InputProxy.GetFingerIdFromTouch(0))) { + return false; + } else if (es.IsPointerOverGameObject(-1)) + return false; + return true; + } + + + void OnMouseDown() { + if (isActiveAndEnabled && triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + if (!CanInteract()) return; + if (selectOnClick && InputProxy.GetMouseButtonDown(0)) { + ToggleSelection(); + return; + } + Highlight(true); + } + } + + void OnMouseEnter() { + if (isActiveAndEnabled && triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + if (!CanInteract()) return; + Highlight(true); + } + } + + void OnMouseExit() { + if (isActiveAndEnabled && triggerMode == TriggerMode.ColliderEventsOnlyOnThisObject) { + if (!CanInteract()) return; + Highlight(false); + } + } + + void Highlight(bool state) { + if (state) { + if (!hb.highlighted) { + if (OnObjectHighlightStart != null && hb.target != null) { + if (!OnObjectHighlightStart(hb.target.gameObject)) { + currentCollider = null; + return; + } + } + } + } else { + if (hb.highlighted) { + if (OnObjectHighlightEnd != null && hb.target != null) { + OnObjectHighlightEnd(hb.target.gameObject); + } + } + } + if (selectOnClick || hb.isSelected) { + if (hb.isSelected) { + if (state && selectedAndHighlightedProfile != null) { + selectedAndHighlightedProfile.Load(hb); + } else if (selectedProfile != null) { + selectedProfile.Load(hb); + } else { + hb.previousSettings.Load(hb); + } + if (hb.highlighted) { + hb.UpdateMaterialProperties(); + } else { + hb.SetHighlighted(true); + } + return; + } else if (!highlightOnHover) { + hb.SetHighlighted(false); + return; + } + } + hb.SetHighlighted(state); + } + + + void ToggleSelection() { + + HighlightManager.lastTriggerFrame = Time.frameCount; + + bool newState = toggle ? !hb.isSelected : true; + if (newState) { + if (OnObjectSelected != null && !OnObjectSelected(gameObject)) return; + } else { + if (OnObjectUnSelected != null && !OnObjectUnSelected(gameObject)) return; + } + + if (singleSelection && newState) { + HighlightManager.DeselectAll(); + } + hb.isSelected = newState; + if (newState && !HighlightManager.selectedObjects.Contains(hb)) { + HighlightManager.selectedObjects.Add(hb); + } else if (!newState && HighlightManager.selectedObjects.Contains(hb)) { + HighlightManager.selectedObjects.Remove(hb); + } + + if (hb.isSelected) { + if (hb.previousSettings == null) { + hb.previousSettings = ScriptableObject.CreateInstance(); + } + hb.previousSettings.Save(hb); + } else { + hb.RestorePreviousHighlightEffectSettings(); + } + + Highlight(true); + } + + public void OnTriggerEnter(Collider other) { + if (triggerMode == TriggerMode.Volume) { + if ((volumeLayerMask & (1 << other.gameObject.layer)) != 0) { + Highlight(true); + } + } + } + + public void OnTriggerExit(Collider other) { + if (triggerMode == TriggerMode.Volume) { + if ((volumeLayerMask & (1 << other.gameObject.layer)) != 0) { + Highlight(false); + } + } + } + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Scripts/HighlightTrigger.cs.meta b/Assets/HighlightPlus/Scripts/HighlightTrigger.cs.meta new file mode 100644 index 0000000..614f970 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/HighlightTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5009cbb7e54994bb586cde7a70f34e6b +timeCreated: 1542876337 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/InputProxy.cs b/Assets/HighlightPlus/Scripts/InputProxy.cs new file mode 100644 index 0000000..b1fdcf7 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/InputProxy.cs @@ -0,0 +1,90 @@ +using UnityEngine; + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Controls; +using EnhancedTouch = UnityEngine.InputSystem.EnhancedTouch; +#endif + +namespace HighlightPlus { + + public static class InputProxy { + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + + static Vector3 lastPointerPosition; + + public static void Init() { + if (!EnhancedTouch.EnhancedTouchSupport.enabled) { + EnhancedTouch.EnhancedTouchSupport.Enable(); + } + } + + public static Vector3 mousePosition { + get { + if (touchCount > 0) { + lastPointerPosition = EnhancedTouch.Touch.activeTouches[0].screenPosition; + } else { + Mouse m = Mouse.current; + if (m != null) { + lastPointerPosition = m.position.ReadValue(); + } + } + return lastPointerPosition; + } + } + + public static bool GetMouseButtonDown(int buttonIndex) { + if (touchCount > 0) { + return EnhancedTouch.Touch.activeTouches[0].phase == UnityEngine.InputSystem.TouchPhase.Began; + } else { + Mouse m = Mouse.current; + if (m == null) return false; + switch (buttonIndex) { + case 1: return m.rightButton.wasPressedThisFrame; + case 2: return m.middleButton.wasPressedThisFrame; + default: return m.leftButton.wasPressedThisFrame; + } + } + } + + public static int touchCount { get { return EnhancedTouch.Touch.activeTouches.Count; } } + + public static int GetFingerIdFromTouch(int touchIndex) { + EnhancedTouch.Touch touch = EnhancedTouch.Touch.activeTouches[touchIndex]; + return touch.finger.index; + } + + public static bool GetKeyDown(string name) { + return ((KeyControl)Keyboard.current[name]).wasPressedThisFrame; + } + +#else + public static void Init() {} + + public static Vector3 mousePosition { + get { + return Input.mousePosition; + } + } + + public static bool GetMouseButtonDown(int buttonIndex) { + return Input.GetMouseButtonDown(buttonIndex); + } + + public static int touchCount { + get { return Input.touchCount; } + } + + public static int GetFingerIdFromTouch(int touchIndex) { + return Input.GetTouch(touchIndex).fingerId; + } + + public static bool GetKeyDown(string name) { + return Input.GetKeyDown(name); + } + +#endif + + } +} diff --git a/Assets/HighlightPlus/Scripts/InputProxy.cs.meta b/Assets/HighlightPlus/Scripts/InputProxy.cs.meta new file mode 100644 index 0000000..d11561a --- /dev/null +++ b/Assets/HighlightPlus/Scripts/InputProxy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc62c86f3459d4fc29db51cfe5ecb977 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/Misc.cs b/Assets/HighlightPlus/Scripts/Misc.cs new file mode 100644 index 0000000..6f2465e --- /dev/null +++ b/Assets/HighlightPlus/Scripts/Misc.cs @@ -0,0 +1,33 @@ + +using UnityEngine; +using System; + +namespace HighlightPlus { + public class Misc { + public static T FindObjectOfType(bool includeInactive = false) where T : UnityEngine.Object { +#if UNITY_2023_1_OR_NEWER + return UnityEngine.Object.FindAnyObjectByType(includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude); +#else + return UnityEngine.Object.FindObjectOfType(includeInactive); +#endif + } + + public static UnityEngine.Object[] FindObjectsOfType(Type type, bool includeInactive = false) { +#if UNITY_2023_1_OR_NEWER + return UnityEngine.Object.FindObjectsByType(type, includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude, FindObjectsSortMode.None); +#else + return UnityEngine.Object.FindObjectsOfType(type, includeInactive); +#endif + } + + + public static T[] FindObjectsOfType(bool includeInactive = false) where T : UnityEngine.Object { +#if UNITY_2023_1_OR_NEWER + return UnityEngine.Object.FindObjectsByType(includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude, FindObjectsSortMode.None); +#else + return UnityEngine.Object.FindObjectsOfType(includeInactive); +#endif + } + } + +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Scripts/Misc.cs.meta b/Assets/HighlightPlus/Scripts/Misc.cs.meta new file mode 100644 index 0000000..4eaff52 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/Misc.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c0c11b15f37b4c428157e609942c8b5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/ShaderParams.cs b/Assets/HighlightPlus/Scripts/ShaderParams.cs new file mode 100644 index 0000000..bfbace2 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/ShaderParams.cs @@ -0,0 +1,104 @@ +using UnityEngine; + +namespace HighlightPlus { + + public static class ShaderParams { + + // general uniforms + public static int Cull = Shader.PropertyToID("_Cull"); + public static int BlurScale = Shader.PropertyToID("_BlurScale"); + public static int BlurScaleFirstHoriz = Shader.PropertyToID("_BlurScaleFirstHoriz"); + public static int Speed = Shader.PropertyToID("_Speed"); + public static int ConstantWidth = Shader.PropertyToID("_ConstantWidth"); + public static int MinimumWidth = Shader.PropertyToID("_MinimumWidth"); + public static int CutOff = Shader.PropertyToID("_CutOff"); + public static int ZTest = Shader.PropertyToID("_ZTest"); + public static int Flip = Shader.PropertyToID("_Flip"); + public static int Debug = Shader.PropertyToID("_Debug"); + public static int Color = Shader.PropertyToID("_Color"); + public static int MainTex = Shader.PropertyToID("_MainTex"); + public static int BlendSrc = Shader.PropertyToID("_BlendSrc"); + public static int BlendDst = Shader.PropertyToID("_BlendDst"); + public static int FadeFactor = Shader.PropertyToID("_HP_Fade"); + public static int ZShift = Shader.PropertyToID("_ZShift"); + public static int Padding = Shader.PropertyToID("_Padding"); + public static int ResampleScale = Shader.PropertyToID("_ResampleScale"); + public static int NoiseTex = Shader.PropertyToID("_NoiseTex"); + + // outline uniforms + public static int OutlineWidth = Shader.PropertyToID("_OutlineWidth"); + public static int OutlineZTest = Shader.PropertyToID("_OutlineZTest"); + public static int OutlineDirection = Shader.PropertyToID("_OutlineDirection"); + public static int OutlineColor = Shader.PropertyToID("_OutlineColor"); + public static int OutlineVertexWidth = Shader.PropertyToID("_OutlineVertexWidth"); + public static int OutlineGradientTex = Shader.PropertyToID("_OutlineGradientTex"); + public static int OutlineVertexData = Shader.PropertyToID("_OutlineVertexData"); + public static int OutlineStencilCompareFunction = Shader.PropertyToID("_OutlineStencilComp"); + public static int OutlineEdgeThreshold = Shader.PropertyToID("_EdgeThreshold"); + public static int OutlineSharpness = Shader.PropertyToID("_OutlineSharpness"); + + // glow uniforms + public static int GlowZTest = Shader.PropertyToID("_GlowZTest"); + public static int GlowStencilComp = Shader.PropertyToID("_GlowStencilComp"); + public static int GlowStencilOp = Shader.PropertyToID("_GlowStencilOp"); + public static int GlowDirection = Shader.PropertyToID("_GlowDirection"); + public static int Glow = Shader.PropertyToID("_Glow"); + public static int GlowColor = Shader.PropertyToID("_GlowColor"); + public static int Glow2 = Shader.PropertyToID("_Glow2"); + + // see-through uniforms + public static int SeeThrough = Shader.PropertyToID("_SeeThrough"); + public static int SeeThroughNoise = Shader.PropertyToID("_SeeThroughNoise"); + public static int SeeThroughBorderWidth = Shader.PropertyToID("_SeeThroughBorderWidth"); + public static int SeeThroughBorderConstantWidth = Shader.PropertyToID("_SeeThroughBorderConstantWidth"); + public static int SeeThroughBorderMinimumWidth = Shader.PropertyToID("_SeeThroughBorderMinimumWidth"); + public static int SeeThroughTintColor = Shader.PropertyToID("_SeeThroughTintColor"); + public static int SeeThroughBorderColor = Shader.PropertyToID("_SeeThroughBorderColor"); + public static int SeeThroughStencilRef = Shader.PropertyToID("_SeeThroughStencilRef"); + public static int SeeThroughStencilComp = Shader.PropertyToID("_SeeThroughStencilComp"); + public static int SeeThroughStencilPassOp = Shader.PropertyToID("_SeeThroughStencilPassOp"); + public static int SeeThroughDepthOffset = Shader.PropertyToID("_SeeThroughDepthOffset"); + public static int SeeThroughMaxDepth = Shader.PropertyToID("_SeeThroughMaxDepth"); + public static int SeeThroughOrdered = Shader.PropertyToID("_SeeThroughOrdered"); + public static int SeeThroughTexture = Shader.PropertyToID("_SeeThroughTexture"); + public static int SeeThroughTextureScale = Shader.PropertyToID("_SeeThroughTextureScale"); + + // inner glow uniforms + public static int InnerGlowWidth = Shader.PropertyToID("_InnerGlowWidth"); + public static int InnerGlowZTest = Shader.PropertyToID("_InnerGlowZTest"); + public static int InnerGlowColor = Shader.PropertyToID("_InnerGlowColor"); + public static int InnerGlowBlendMode = Shader.PropertyToID("_InnerGlowBlendMode"); + + // overlay uniforms + public static int OverlayData = Shader.PropertyToID("_OverlayData"); + public static int OverlayBackColor = Shader.PropertyToID("_OverlayBackColor"); + public static int OverlayColor = Shader.PropertyToID("_OverlayColor"); + public static int OverlayHitPosData = Shader.PropertyToID("_OverlayHitPosData"); + public static int OverlayHitStartTime = Shader.PropertyToID("_OverlayHitStartTime"); + public static int OverlayTexture = Shader.PropertyToID("_OverlayTexture"); + public static int OverlayTextureScrolling = Shader.PropertyToID("_OverlayTextureScrolling"); + public static int OverlayZTest = Shader.PropertyToID("_OverlayZTest"); + + // target uniforms + public static int TargetFXRenderData = Shader.PropertyToID("_TargetFXRenderData"); + public static int GlowRT = Shader.PropertyToID("_HPComposeGlowFinal"); + public static int OutlineRT = Shader.PropertyToID("_HPComposeOutlineFinal"); + + // icon uniforms + public static int IconFXDarkColor = Shader.PropertyToID("_DarkColor"); + + // keywords + public const string SKW_ALPHACLIP = "HP_ALPHACLIP"; + public const string SKW_OUTLINE_GRADIENT_WS = "HP_OUTLINE_GRADIENT_WS"; + public const string SKW_OUTLINE_GRADIENT_LS = "HP_OUTLINE_GRADIENT_LS"; + public const string SKW_ALL_EDGES = "HP_ALL_EDGES"; + public const string SKW_DEPTHCLIP = "HP_DEPTHCLIP"; + public const string SKW_DEPTH_OFFSET = "HP_DEPTH_OFFSET"; + public const string SKW_TEXTURE_TRIPLANAR = "HP_TEXTURE_TRIPLANAR"; + public const string SKW_TEXTURE_SCREENSPACE = "HP_TEXTURE_SCREENSPACE"; + public const string SKW_TEXTURE_OBJECTSPACE = "HP_TEXTURE_OBJECTSPACE"; + public const string SKW_SEETHROUGH_ONLY_BORDER = "HP_SEETHROUGH_ONLY_BORDER"; + public const string SKW_DITHER_BLUENOISE = "HP_DITHER_BLUENOISE"; + } +} + diff --git a/Assets/HighlightPlus/Scripts/ShaderParams.cs.meta b/Assets/HighlightPlus/Scripts/ShaderParams.cs.meta new file mode 100644 index 0000000..e076e9c --- /dev/null +++ b/Assets/HighlightPlus/Scripts/ShaderParams.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 43d6485e67bc3460fabef0a5962f8e42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HighlightPlus/Scripts/VRCheck.cs b/Assets/HighlightPlus/Scripts/VRCheck.cs new file mode 100644 index 0000000..d406de8 --- /dev/null +++ b/Assets/HighlightPlus/Scripts/VRCheck.cs @@ -0,0 +1,72 @@ +// Comment this line to disable usage of XR module +#define ENABLE_XR + +using System.Collections.Generic; +using UnityEngine; + +#if ENABLE_XR +using UnityEngine.XR; +#endif + +namespace HighlightPlus { + + static class VRCheck { + + public static bool isActive; + public static bool isVrRunning; + public static RenderTextureDescriptor vrTextureDescriptor; + +#if !ENABLE_XR + static bool IsActive() { + return false; + } + + static bool IsVrRunning() { + return false; + } + + static RenderTextureDescriptor GetVRTextureDescriptor() { + return new RenderTextureDescriptor(); + } + +#else + + static readonly List displaysDescs = new List(); + static readonly List displays = new List(); + + 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; + } + + static bool IsVrRunning() { + bool vrIsRunning = false; + displays.Clear(); + SubsystemManager.GetSubsystems(displays); + foreach (var displaySubsystem in displays) { + if (displaySubsystem.running) { + vrIsRunning = true; + break; + } + } + + return vrIsRunning; + } + + static RenderTextureDescriptor GetVRTextureDescriptor() { + return UnityEngine.XR.XRSettings.eyeTextureDesc; + } + +#endif + + public static void Init() { + vrTextureDescriptor = GetVRTextureDescriptor(); + isActive = IsActive(); + isVrRunning = vrTextureDescriptor.width != 0 && (IsVrRunning() || (isActive && Application.isPlaying)); + } + + } +} \ No newline at end of file diff --git a/Assets/HighlightPlus/Scripts/VRCheck.cs.meta b/Assets/HighlightPlus/Scripts/VRCheck.cs.meta new file mode 100644 index 0000000..140bb0c --- /dev/null +++ b/Assets/HighlightPlus/Scripts/VRCheck.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e58450590aacd44aeac5723573171402 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlusBundle.meta b/Assets/Plugins/HighlightPlusBundle.meta new file mode 100644 index 0000000..79b6e6d --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68ae7b96c4d474fbb89db44167089a60 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlusBundle/Builtin.meta b/Assets/Plugins/HighlightPlusBundle/Builtin.meta new file mode 100644 index 0000000..772d961 --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle/Builtin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d04d6c36e2bc14d5c831b9afeb270cf9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlusBundle/Builtin/HighlightPlus_Builtin_Pipeline.unitypackage.meta b/Assets/Plugins/HighlightPlusBundle/Builtin/HighlightPlus_Builtin_Pipeline.unitypackage.meta new file mode 100644 index 0000000..645dfac --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle/Builtin/HighlightPlus_Builtin_Pipeline.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4c87a0e1993f7439285693c04d6dab68 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlusBundle/URP.meta b/Assets/Plugins/HighlightPlusBundle/URP.meta new file mode 100644 index 0000000..080f8fe --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle/URP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 33be22ed704cc4513850fb40f2298226 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlusBundle/URP/HighlightPlus_URP_Pipeline.unitypackage.meta b/Assets/Plugins/HighlightPlusBundle/URP/HighlightPlus_URP_Pipeline.unitypackage.meta new file mode 100644 index 0000000..20bc586 --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle/URP/HighlightPlus_URP_Pipeline.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 52f45c84fa7e04a17922d3833762b05c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/HighlightPlusBundle/_README.txt b/Assets/Plugins/HighlightPlusBundle/_README.txt new file mode 100644 index 0000000..ae97379 --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle/_README.txt @@ -0,0 +1,24 @@ + +This asset contains 2 main packages. Please use the appropriate package according to the rendering pipeline of your project: + +** Built-in pipeline ** +- Import the package from the folder /Builtin. +- Requires Unity 2021.3 or later. + +** Universal Rendering Pipeline ** +- Import the package from the folder /URP +- Requires Unity 2021.3 or later. Setup video: https://youtu.be/wXNS3gaBxHE?si=QkPaidmBHrmSeeua + + +Once imported, read the PDF documentation for additional details. +Thanks for using Highlight Plus. + + +Questions / Suggestions / Support +--------------------------------- + +* Support-Web: https://kronnect.com/support +* Support-Discord: https://discord.gg/EH2GMaM +* Email: contact@kronnect.com +* Twitter: @Kronnect + diff --git a/Assets/Plugins/HighlightPlusBundle/_README.txt.meta b/Assets/Plugins/HighlightPlusBundle/_README.txt.meta new file mode 100644 index 0000000..2c50cd1 --- /dev/null +++ b/Assets/Plugins/HighlightPlusBundle/_README.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2b60423aba8cd4a19bf6f546a883a794 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/main.unity b/Assets/Scenes/main.unity index f339f50..09d3f7a 100644 --- a/Assets/Scenes/main.unity +++ b/Assets/Scenes/main.unity @@ -32254,7 +32254,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.000038004546} + m_AnchoredPosition: {x: 0, y: -0.00011867129} m_SizeDelta: {x: 0, y: 300} m_Pivot: {x: 0, y: 1} --- !u!114 &478527198 @@ -90712,7 +90712,7 @@ MonoBehaviour: m_HandleRect: {fileID: 1614015367} m_Direction: 2 m_Value: 0 - m_Size: 0.9923016 + m_Size: 0.9999856 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -108259,6 +108259,10 @@ PrefabInstance: propertyPath: m_Name value: 03-01-04 objectReference: {fileID: 0} + - target: {fileID: 4171191479554702113, guid: 7827ccff2c5319541bbaf34e30e83074, type: 3} + propertyPath: m_LocalPosition.z + value: -0.084 + objectReference: {fileID: 0} - target: {fileID: 4243280607525023188, guid: 7827ccff2c5319541bbaf34e30e83074, type: 3} propertyPath: m_Name value: 03-01-06 @@ -109117,7 +109121,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8516180839313075434, guid: 7827ccff2c5319541bbaf34e30e83074, type: 3} propertyPath: m_LocalPosition.z - value: 18.132004 + value: 18.175001 objectReference: {fileID: 0} - target: {fileID: 8560599259290696241, guid: 7827ccff2c5319541bbaf34e30e83074, type: 3} propertyPath: m_Name @@ -109181,7 +109185,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 9149438089919446606, guid: 7827ccff2c5319541bbaf34e30e83074, type: 3} propertyPath: m_LocalPosition.z - value: 0.082 + value: 0.087 objectReference: {fileID: 0} - target: {fileID: 9164810454042893205, guid: 7827ccff2c5319541bbaf34e30e83074, type: 3} propertyPath: m_Name