diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle.meta b/FactoryNumeric/Assets/AssetArt/Model.meta similarity index 77% rename from FactoryNumeric/Assets/Plugins/HighlightPlusBundle.meta rename to FactoryNumeric/Assets/AssetArt/Model.meta index 79b6e6da..0d0aa87b 100644 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle.meta +++ b/FactoryNumeric/Assets/AssetArt/Model.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 68ae7b96c4d474fbb89db44167089a60 +guid: a8389cb4bbc41864793915c887f702f7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/FactoryNumeric/Assets/DefaultVolumeProfile.asset b/FactoryNumeric/Assets/DefaultVolumeProfile.asset index 36c3781a..cb994b4a 100644 --- a/FactoryNumeric/Assets/DefaultVolumeProfile.asset +++ b/FactoryNumeric/Assets/DefaultVolumeProfile.asset @@ -1,5 +1,451 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7707754020513436991 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 5485954d14dfb9a4c8ead8edb0ded5b1, type: 3} + m_Name: LiftGammaGain + m_EditorClassIdentifier: + active: 1 + lift: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gamma: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gain: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} +--- !u!114 &-7185315400875881637 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: fb60a22f311433c4c962b888d1393f88, type: 3} + m_Name: PaniniProjection + m_EditorClassIdentifier: + active: 1 + distance: + m_OverrideState: 1 + m_Value: 0 + cropToFit: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-4271096819607658770 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: cdfbdbb87d3286943a057f7791b43141, type: 3} + m_Name: ChannelMixer + m_EditorClassIdentifier: + active: 1 + redOutRedIn: + m_OverrideState: 1 + m_Value: 100 + redOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + redOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + greenOutRedIn: + m_OverrideState: 1 + m_Value: 0 + greenOutGreenIn: + m_OverrideState: 1 + m_Value: 100 + greenOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + blueOutRedIn: + m_OverrideState: 1 + m_Value: 0 + blueOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + blueOutBlueIn: + m_OverrideState: 1 + m_Value: 100 +--- !u!114 &-2962007604292024600 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 81180773991d8724ab7f2d216912b564, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-2609276020461255734 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 29fa0085f50d5e54f8144f766051a691, type: 3} + m_Name: FilmGrain + m_EditorClassIdentifier: + active: 1 + type: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + response: + m_OverrideState: 1 + m_Value: 0.8 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} +--- !u!114 &-1574570209925202361 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 70afe9e12c7a7ed47911bb608a23a8ff, type: 3} + m_Name: SplitToning + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + highlights: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + balance: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-1268620209422604119 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 3eb4b772797da9440885e8bd939e9560, type: 3} + m_Name: ColorCurves + m_EditorClassIdentifier: + active: 1 + master: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + red: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + green: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + blue: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsHue: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + satVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + lumVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!114 &-381078061536052809 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 06437c1ff663d574d9447842ba0a72e4, type: 3} + m_Name: ScreenSpaceLensFlare + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + tintColor: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomMip: + m_OverrideState: 1 + m_Value: 1 + firstFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + secondaryFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareScale: + m_OverrideState: 1 + m_Value: {x: 1, y: 1} + samples: + m_OverrideState: 1 + m_Value: 1 + sampleDimmer: + m_OverrideState: 1 + m_Value: 0.5 + vignetteEffect: + m_OverrideState: 1 + m_Value: 1 + startingPosition: + m_OverrideState: 1 + m_Value: 1.25 + scale: + m_OverrideState: 1 + m_Value: 1.5 + streaksIntensity: + m_OverrideState: 1 + m_Value: 0 + streaksLength: + m_OverrideState: 1 + m_Value: 0.5 + streaksOrientation: + m_OverrideState: 1 + m_Value: 0 + streaksThreshold: + m_OverrideState: 1 + m_Value: 0.25 + resolution: + m_OverrideState: 1 + m_Value: 4 + chromaticAbberationIntensity: + m_OverrideState: 1 + m_Value: 0.5 +--- !u!114 &-106127946526838736 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c01700fd266d6914ababb731e09af2eb, type: 3} + m_Name: DepthOfField + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + gaussianStart: + m_OverrideState: 1 + m_Value: 10 + gaussianEnd: + m_OverrideState: 1 + m_Value: 30 + gaussianMaxRadius: + m_OverrideState: 1 + m_Value: 1 + highQualitySampling: + m_OverrideState: 1 + m_Value: 0 + focusDistance: + m_OverrideState: 1 + m_Value: 10 + aperture: + m_OverrideState: 1 + m_Value: 5.6 + focalLength: + m_OverrideState: 1 + m_Value: 50 + bladeCount: + m_OverrideState: 1 + m_Value: 5 + bladeCurvature: + m_OverrideState: 1 + m_Value: 1 + bladeRotation: + m_OverrideState: 1 + m_Value: 0 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -12,4 +458,338 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} m_Name: DefaultVolumeProfile m_EditorClassIdentifier: - components: [] + components: + - {fileID: -2962007604292024600} + - {fileID: 1821760366418801896} + - {fileID: 4680773932023791427} + - {fileID: 7772766054368332667} + - {fileID: 92707066250336811} + - {fileID: 8936260653261141704} + - {fileID: -106127946526838736} + - {fileID: 7508608045624175407} + - {fileID: 2422589717818678714} + - {fileID: -4271096819607658770} + - {fileID: -7707754020513436991} + - {fileID: 1625001409669962625} + - {fileID: -1268620209422604119} + - {fileID: -7185315400875881637} + - {fileID: -2609276020461255734} + - {fileID: 2492440995571696254} + - {fileID: -381078061536052809} + - {fileID: -1574570209925202361} + - {fileID: 5430352265552507261} +--- !u!114 &92707066250336811 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 97c23e3b12dc18c42a140437e53d3951, type: 3} + m_Name: Tonemapping + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + neutralHDRRangeReductionMode: + m_OverrideState: 1 + m_Value: 2 + acesPreset: + m_OverrideState: 1 + m_Value: 3 + hueShiftAmount: + m_OverrideState: 1 + m_Value: 0 + detectPaperWhite: + m_OverrideState: 1 + m_Value: 0 + paperWhite: + m_OverrideState: 1 + m_Value: 300 + detectBrightnessLimits: + m_OverrideState: 1 + m_Value: 1 + minNits: + m_OverrideState: 1 + m_Value: 0.005 + maxNits: + m_OverrideState: 1 + m_Value: 1000 +--- !u!114 &1625001409669962625 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 0b2db86121404754db890f4c8dfe81b2, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + skipIterations: + m_OverrideState: 1 + m_Value: 1 + threshold: + m_OverrideState: 1 + m_Value: 0.9 + intensity: + m_OverrideState: 1 + m_Value: 0 + scatter: + m_OverrideState: 1 + m_Value: 0.7 + clamp: + m_OverrideState: 1 + m_Value: 65472 + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + highQualityFiltering: + m_OverrideState: 1 + m_Value: 0 + downscale: + m_OverrideState: 1 + m_Value: 0 + maxIterations: + m_OverrideState: 1 + m_Value: 6 + dirtTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 1 + dirtIntensity: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &1821760366418801896 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: e021b4c809a781e468c2988c016ebbea, type: 3} + m_Name: ColorLookup + m_EditorClassIdentifier: + active: 1 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 1 + contribution: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &2422589717818678714 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 899c54efeace73346a0a16faa3afe726, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + color: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0 + smoothness: + m_OverrideState: 1 + m_Value: 0.2 + rounded: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &2492440995571696254 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c5e1dc532bcb41949b58bc4f2abfbb7e, type: 3} + m_Name: LensDistortion + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + xMultiplier: + m_OverrideState: 1 + m_Value: 1 + yMultiplier: + m_OverrideState: 1 + m_Value: 1 + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + scale: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &4680773932023791427 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 221518ef91623a7438a71fef23660601, type: 3} + m_Name: WhiteBalance + m_EditorClassIdentifier: + active: 1 + temperature: + m_OverrideState: 1 + m_Value: 0 + tint: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &5430352265552507261 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 6bd486065ce11414fa40e631affc4900, type: 3} + m_Name: ProbeVolumesOptions + m_EditorClassIdentifier: + active: 1 + normalBias: + m_OverrideState: 1 + m_Value: 0.05 + viewBias: + m_OverrideState: 1 + m_Value: 0.1 + scaleBiasWithMinProbeDistance: + m_OverrideState: 1 + m_Value: 0 + samplingNoise: + m_OverrideState: 1 + m_Value: 0.1 + animateSamplingNoise: + m_OverrideState: 1 + m_Value: 1 + leakReductionMode: + m_OverrideState: 1 + m_Value: 2 + minValidDotProductValue: + m_OverrideState: 1 + m_Value: 0.1 + occlusionOnlyReflectionNormalization: + m_OverrideState: 1 + m_Value: 1 + intensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + skyOcclusionIntensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + worldOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} +--- !u!114 &7508608045624175407 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 66f335fb1ffd8684294ad653bf1c7564, type: 3} + m_Name: ColorAdjustments + m_EditorClassIdentifier: + active: 1 + postExposure: + m_OverrideState: 1 + m_Value: 0 + contrast: + m_OverrideState: 1 + m_Value: 0 + colorFilter: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + m_OverrideState: 1 + m_Value: 0 + saturation: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &7772766054368332667 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: ccf1aba9553839d41ae37dd52e9ebcce, type: 3} + m_Name: MotionBlur + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + quality: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + clamp: + m_OverrideState: 1 + m_Value: 0.05 +--- !u!114 &8936260653261141704 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 558a8e2b6826cf840aae193990ba9f2e, type: 3} + m_Name: ShadowsMidtonesHighlights + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + midtones: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + highlights: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + shadowsStart: + m_OverrideState: 1 + m_Value: 0 + shadowsEnd: + m_OverrideState: 1 + m_Value: 0.3 + highlightsStart: + m_OverrideState: 1 + m_Value: 0.55 + highlightsEnd: + m_OverrideState: 1 + m_Value: 1 diff --git a/FactoryNumeric/Assets/Editor/Rendering/Factory_URP.asset b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP.asset new file mode 100644 index 00000000..e69e607f --- /dev/null +++ b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP.asset @@ -0,0 +1,136 @@ +%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: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: Factory_URP + m_EditorClassIdentifier: + k_AssetVersion: 12 + k_AssetPreviousVersion: 12 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: 82847c45d6c56684a959b5a5517f95ba, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 0 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_SupportsHDR: 1 + m_HDRColorBufferPrecision: 0 + m_MSAA: 1 + m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_EnableLODCrossFade: 1 + m_LODCrossFadeDitheringType: 1 + m_ShEvalMode: 0 + m_LightProbeSystem: 0 + m_ProbeVolumeMemoryBudget: 1024 + m_ProbeVolumeBlendingMemoryBudget: 256 + m_SupportProbeVolumeGPUStreaming: 0 + m_SupportProbeVolumeDiskStreaming: 0 + m_SupportProbeVolumeScenarios: 0 + m_SupportProbeVolumeScenarioBlending: 0 + m_ProbeVolumeSHBands: 1 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 2048 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 4 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 2048 + m_AdditionalLightsShadowResolutionTierLow: 256 + m_AdditionalLightsShadowResolutionTierMedium: 512 + m_AdditionalLightsShadowResolutionTierHigh: 1024 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.2 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 + m_SoftShadowsSupported: 0 + m_ConservativeEnclosingSphere: 1 + m_NumIterationsEnclosingSphere: 64 + m_SoftShadowQuality: 2 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightCookies: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_StoreActionsOptimization: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_AllowPostProcessAlphaOutput: 0 + m_UseFastSRGBLinearConversion: 0 + m_SupportDataDrivenLensFlare: 1 + m_SupportScreenSpaceLensFlare: 1 + m_GPUResidentDrawerMode: 0 + m_SmallMeshScreenPercentage: 0 + m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_VolumeFrameworkUpdateMode: 0 + m_VolumeProfile: {fileID: 0} + apvScenesData: + obsoleteSceneBounds: + m_Keys: [] + m_Values: [] + obsoleteHasProbeVolumes: + m_Keys: [] + m_Values: + m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeAdditionalLight: 4 + m_PrefilteringModeAdditionalLightShadows: 1 + m_PrefilterXRKeywords: 0 + m_PrefilteringModeForwardPlus: 1 + m_PrefilteringModeDeferredRendering: 1 + m_PrefilteringModeScreenSpaceOcclusion: 1 + m_PrefilterDebugKeywords: 0 + m_PrefilterWriteRenderingLayers: 0 + m_PrefilterHDROutput: 0 + m_PrefilterAlphaOutput: 0 + m_PrefilterSSAODepthNormals: 0 + m_PrefilterSSAOSourceDepthLow: 0 + m_PrefilterSSAOSourceDepthMedium: 0 + m_PrefilterSSAOSourceDepthHigh: 0 + m_PrefilterSSAOInterleaved: 0 + m_PrefilterSSAOBlueNoise: 0 + m_PrefilterSSAOSampleCountLow: 0 + m_PrefilterSSAOSampleCountMedium: 0 + m_PrefilterSSAOSampleCountHigh: 0 + m_PrefilterDBufferMRT1: 0 + m_PrefilterDBufferMRT2: 0 + m_PrefilterDBufferMRT3: 0 + m_PrefilterSoftShadowsQualityLow: 0 + m_PrefilterSoftShadowsQualityMedium: 0 + m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilterSoftShadows: 0 + m_PrefilterScreenCoord: 0 + m_PrefilterNativeRenderPass: 0 + m_PrefilterUseLegacyLightmaps: 0 + m_ShaderVariantLogLevel: 0 + m_ShadowCascades: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} diff --git a/FactoryNumeric/Assets/Editor/Rendering/Factory_URP.asset.meta b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP.asset.meta new file mode 100644 index 00000000..a7cf9064 --- /dev/null +++ b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5bb0103cf329784e9bdc18d06597a7c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Editor/Rendering/Factory_URP_Renderer.asset b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP_Renderer.asset new file mode 100644 index 00000000..b8314170 --- /dev/null +++ b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP_Renderer.asset @@ -0,0 +1,53 @@ +%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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: Factory_URP_Renderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} + hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} + probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959, type: 3} + probeVolumeResources: + probeVolumeDebugShader: {fileID: 0} + probeVolumeFragmentationDebugShader: {fileID: 0} + probeVolumeOffsetDebugShader: {fileID: 0} + probeVolumeSamplingDebugShader: {fileID: 0} + probeSamplingDebugMesh: {fileID: 0} + probeSamplingDebugTexture: {fileID: 0} + probeVolumeBlendStatesCS: {fileID: 0} + m_RendererFeatures: [] + m_RendererFeatureMap: + m_UseNativeRenderPass: 0 + xrSystemData: {fileID: 0} + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + m_AssetVersion: 2 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 2 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 0 + m_CopyDepthMode: 1 + m_DepthAttachmentFormat: 0 + m_DepthTextureFormat: 0 + m_AccurateGbufferNormals: 0 + m_IntermediateTextureMode: 1 diff --git a/FactoryNumeric/Assets/Editor/Rendering/Factory_URP_Renderer.asset.meta b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP_Renderer.asset.meta new file mode 100644 index 00000000..a29c275a --- /dev/null +++ b/FactoryNumeric/Assets/Editor/Rendering/Factory_URP_Renderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 82847c45d6c56684a959b5a5517f95ba +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus.meta new file mode 100644 index 00000000..a3bbead6 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5db7164e964ae4c6b82d2283320ad13d +folderAsset: yes +timeCreated: 1557315954 +licenseType: Store +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo.meta new file mode 100644 index 00000000..c699cd39 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b0c676f447c26429db5c9404720e279c +folderAsset: yes +timeCreated: 1542876294 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity new file mode 100644 index 00000000..05cdaeef --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity @@ -0,0 +1,2132 @@ +%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.44717538, g: 0.49709505, b: 0.5751526, 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: 112000000, guid: 334c1ca31d9f941d69425982909406b3, + 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 &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} + - component: {fileID: 472769858} + 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.5596046, y: 0.71660864, z: -0.3668599, w: -0.19679597} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 48.249, y: 168.87, z: -80.97} +--- !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: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 0.5 + m_Bias: 1 + m_NormalBias: 1 + 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!114 &472769858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472769855} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UsePipelineSettings: 1 +--- !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. + + This + asset requires Universal Rendering Pipeline. Please check README for setup instructions.' +--- !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: 1202089666} + m_RootOrder: 2 + 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 + 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.62 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.71 + glowWidth: 0.14 + glowQuality: 1 + 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 + 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: 0 + 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 &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.14} + 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!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: 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 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.488 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.62 + outlineQuality: 0 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 1.71 + glowWidth: 4.5 + glowQuality: 2 + glowDownsampling: 1 + glowHQColor: {r: 0.6392157, g: 1, b: 0, a: 1} + glowDithering: 1 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + 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: 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: 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} + - component: {fileID: 965526241} + 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!114 &965526241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !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: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + 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: 2 + 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 &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: 0 + 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} + - 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: 1202089666} + m_RootOrder: 0 + 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 + 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.62 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + glow: 5 + glowWidth: 0.14 + glowQuality: 1 + 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 + 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: 0 + targetFXAlignToGround: 0 + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 2 + 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} + 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: 1 + 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: 4 + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo1_HighlightExample.unity.meta new file mode 100644 index 00000000..ee3f98eb --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity new file mode 100644 index 00000000..c6f46d97 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity @@ -0,0 +1,2106 @@ +%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: 994670537} +--- !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 &54660272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 54660274} + - component: {fileID: 54660273} + m_Layer: 0 + m_Name: ManualSelectionExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &54660273 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 54660272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9dfa112658ab74560a6251002174910b, type: 3} + m_Name: + m_EditorClassIdentifier: + objectToSelect: {fileID: 656694098} +--- !u!4 &54660274 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 54660272} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.5509014, y: -4.251323, z: 28.678097} + 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 &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 &171019437 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 171019439} + - component: {fileID: 171019438} + m_Layer: 0 + m_Name: EventsExample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &171019438 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 171019437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbe1fcf5ef14345779fec3adb4479bc3, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &171019439 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 171019437} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.5509014, y: -4.251323, z: 28.678097} + 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 &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 &207714439 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 207714440} + m_Layer: 0 + m_Name: --- SCENE --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &207714440 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 207714439} + 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} +--- !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 &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. Click outside to clear selection. 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 &900649477 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 900649478} + m_Layer: 0 + m_Name: --- DEMO SCRIPTS --- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &900649478 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 900649477} + 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: 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} + - component: {fileID: 965526241} + 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!114 &965526241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !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!850595691 &994670537 +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 &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 &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: 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 + 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 + 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: 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 + 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!1 &1925176807 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1925176808} + 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 &1925176808 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1925176807} + 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: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/URP/HighlightPlus_URP_Pipeline.unitypackage.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta similarity index 74% rename from FactoryNumeric/Assets/Plugins/HighlightPlusBundle/URP/HighlightPlus_URP_Pipeline.unitypackage.meta rename to FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta index 20bc5863..5501c5d6 100644 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/URP/HighlightPlus_URP_Pipeline.unitypackage.meta +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo2_SelectionExample.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 52f45c84fa7e04a17922d3833762b05c +guid: eb334622a9e1f41368317711b187e4c2 DefaultImporter: externalObjects: {} userData: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity new file mode 100644 index 00000000..3d7ddb3a --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity @@ -0,0 +1,2116 @@ +%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 + 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 + 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 + 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 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0.5 + flipY: 0 + constantWidth: 1 + subMeshMask: -1 + overlay: 0.05 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 0 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 2800000, guid: aeb7aff1c8c1241ee8bfdfc05e9a9e92, type: 3} + overlayTextureScale: 1 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineWidth: 0.4 + outlineQuality: 0 + outlineDownsampling: 2 + outlineVisibility: 0 + 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 + 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.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!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} + - component: {fileID: 965526241} + 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!114 &965526241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 965526239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !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 + 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 + 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 + 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: b2533fb71c5d747c58192bcd7d6cd276, type: 3} + m_Name: + m_EditorClassIdentifier: + hitSound: {fileID: 8300000, guid: 9c2f7decce97e409a8ecfc1181535dc2, 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/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/Builtin/HighlightPlus_Builtin_Pipeline.unitypackage.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta similarity index 74% rename from FactoryNumeric/Assets/Plugins/HighlightPlusBundle/Builtin/HighlightPlus_Builtin_Pipeline.unitypackage.meta rename to FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta index 645dfac7..37d1f5e3 100644 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/Builtin/HighlightPlus_Builtin_Pipeline.unitypackage.meta +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Demo3_HitFXExample.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4c87a0e1993f7439285693c04d6dab68 +guid: a9ed051e57e7249a89531758bd685c7f DefaultImporter: externalObjects: {} userData: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials.meta new file mode 100644 index 00000000..e3f2752b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat new file mode 100644 index 00000000..a2bfdb4b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat @@ -0,0 +1,149 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8558442800701317947 +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: 9 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Floor + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _NORMALMAP + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 13ea04b5d27644ccba761e09947624da, type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _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} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 0.02 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EmissionScaleUI: 1 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0.538 + - _Glossiness: 0.34 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0.1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.0104 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.34 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _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} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat.meta new file mode 100644 index 00000000..9218940c --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Floor.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d681c1d72c3c16149abd2f0f25ca628c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat new file mode 100644 index 00000000..646d0a93 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat @@ -0,0 +1,148 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-5610605729892836785 +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: 9 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Gold + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + 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} + - _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} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EmissionScaleUI: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.9 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.9 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.96078426, g: 0.8392157, b: 0.47450978, a: 1} + - _Color: {r: 0.96078426, g: 0.8392157, b: 0.47450978, 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} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SpecularColor: {r: 0.8088235, g: 0.6295969, b: 0.3033088, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat.meta new file mode 100644 index 00000000..dd5d3820 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Gold.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 5b12cf4be3e7c5149a5f24108ee6a551 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat new file mode 100644 index 00000000..68352665 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat @@ -0,0 +1,148 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2992342339722848979 +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: 9 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PlasticGlossy + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + 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} + - _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} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EmissionScaleUI: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.8 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.8 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0.78942597, b: 0.79607844, a: 1} + - _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} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SpecularColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta new file mode 100644 index 00000000..e0d7375d --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/PlasticGlossy.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 958abb01761e1dc4ebf9ffdf8252d20e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat new file mode 100644 index 00000000..6c4d0595 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat @@ -0,0 +1,148 @@ +%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: Silk + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + 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} + - _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} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EmissionScaleUI: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.6 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0.75 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.6 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.49411762, g: 0.145098, b: 0.16470584, a: 1} + - _Color: {r: 0.49411762, g: 0.145098, b: 0.16470584, 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} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SpecularColor: {r: 0.74264705, g: 0.20750435, b: 0.216731, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &7254247028269435741 +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: 9 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat.meta new file mode 100644 index 00000000..6bc0ff46 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Silk.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3134ae80e55101b468fe9ea362327f28 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat new file mode 100644 index 00000000..5ab9dfd9 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat @@ -0,0 +1,151 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6803998695329737601 +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: 9 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Wall + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _NORMALMAP + - _OCCLUSIONMAP + - _PARALLAXMAP + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: dc645ec4f4eba40dd8f0e8b0c21b99b0, type: 3} + m_Scale: {x: 3, y: 3} + m_Offset: {x: 0, y: 0} + - _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} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaTestRef: 0.5 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 0.02 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EmissionScaleUI: 1 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0.325 + - _Glossiness: 0.311 + - _GlossyReflections: 1 + - _Lightmapping: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.0203 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.311 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _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} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat.meta new file mode 100644 index 00000000..4eee5dfc --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Materials/Wall.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0062779a7c303451ab69ea6fc7893dc8 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/Builtin.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles.meta similarity index 77% rename from FactoryNumeric/Assets/Plugins/HighlightPlusBundle/Builtin.meta rename to FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles.meta index 772d961d..bbe2259a 100644 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/Builtin.meta +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d04d6c36e2bc14d5c831b9afeb270cf9 +guid: 57d6d25f642564dc6a34dfaebd77480c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset new file mode 100644 index 00000000..8ccdb842 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset.meta new file mode 100644 index 00000000..01010cdb --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/Selected.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6e74f38237364260b68bef0cd1b8795 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset new file mode 100644 index 00000000..27ff7915 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta new file mode 100644 index 00000000..8235df4e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/SelectedAndHighlighted.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77128a10e40704023952e72c2046e685 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/UniversalRenderPipelineGlobalSettings.asset b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/UniversalRenderPipelineGlobalSettings.asset new file mode 100644 index 00000000..a996a2e6 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/UniversalRenderPipelineGlobalSettings.asset @@ -0,0 +1,27 @@ +%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: 2ec995e51a6e251468d2a3fd8a686257, type: 3} + m_Name: UniversalRenderPipelineGlobalSettings + m_EditorClassIdentifier: + k_AssetVersion: 2 + lightLayerName0: Light Layer default + lightLayerName1: Light Layer 1 + lightLayerName2: Light Layer 2 + lightLayerName3: Light Layer 3 + lightLayerName4: Light Layer 4 + lightLayerName5: Light Layer 5 + lightLayerName6: Light Layer 6 + lightLayerName7: Light Layer 7 + m_StripDebugVariants: 1 + m_StripUnusedPostProcessingVariants: 0 + m_StripUnusedVariants: 1 + supportRuntimeDebugDisplay: 0 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/UniversalRenderPipelineGlobalSettings.asset.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/UniversalRenderPipelineGlobalSettings.asset.meta new file mode 100644 index 00000000..cd59a7f6 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Profiles/UniversalRenderPipelineGlobalSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69dff4121b7484885be70422e6f3db1c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts.meta new file mode 100644 index 00000000..914c5e0f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs new file mode 100644 index 00000000..b042385e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta new file mode 100644 index 00000000..5915f95d --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/HitFxDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b2533fb71c5d747c58192bcd7d6cd276 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs new file mode 100644 index 00000000..4ef44f4a --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta new file mode 100644 index 00000000..37019e98 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/ManualSelectionDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9dfa112658ab74560a6251002174910b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs new file mode 100644 index 00000000..09300bda --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereHighlightEventExample.cs.meta new file mode 100644 index 00000000..1e37e814 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs new file mode 100644 index 00000000..76d0dd56 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta new file mode 100644 index 00000000..e0e58b25 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Scripts/SphereSelectionEventsExample.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dbe1fcf5ef14345779fec3adb4479bc3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/URP.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds.meta similarity index 77% rename from FactoryNumeric/Assets/Plugins/HighlightPlusBundle/URP.meta rename to FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds.meta index 080f8fe8..bca913cb 100644 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/URP.meta +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 33be22ed704cc4513850fb40f2298226 +guid: 94906fdd445a54f2badd67d0d36a3d55 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav new file mode 100644 index 00000000..405c8536 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav.meta new file mode 100644 index 00000000..a5b51f8f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Sounds/metalHit.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9c2f7decce97e409a8ecfc1181535dc2 +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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures.meta new file mode 100644 index 00000000..9442ca0c --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png new file mode 100644 index 00000000..05469a08 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_diff_1k.png.meta new file mode 100644 index 00000000..74e9e454 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png new file mode 100644 index 00000000..9bbac775 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/floor_tiles_06_nor_1k.png.meta new file mode 100644 index 00000000..6ec877c1 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png new file mode 100644 index 00000000..32099ab2 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta new file mode 100644 index 00000000..59a80b29 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/overlaySampleTex.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: aeb7aff1c8c1241ee8bfdfc05e9a9e92 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + 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: 1 + 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 + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png new file mode 100644 index 00000000..e4491ca6 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_AO_1k.png.meta new file mode 100644 index 00000000..d6db09d2 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png new file mode 100644 index 00000000..1f5d9264 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_Nor_1k.png.meta new file mode 100644 index 00000000..9988515f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png new file mode 100644 index 00000000..1d80ba8f Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_bump_1k.png.meta new file mode 100644 index 00000000..ebd4111e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png new file mode 100644 index 00000000..10e299c9 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/Textures/red_brick_plaster_patch_02_diff_1k.png.meta new file mode 100644 index 00000000..025f6edb --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings.meta new file mode 100644 index 00000000..94662b28 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6ec7787befe3645f7a6f10c3762dc3df +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/HighlightPlusForwardRenderer.asset b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/HighlightPlusForwardRenderer.asset new file mode 100644 index 00000000..d417049e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/HighlightPlusForwardRenderer.asset @@ -0,0 +1,78 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7137549924450841197 +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: 473a86c9e274347dfbdde619584cebe9, type: 3} + m_Name: NewHighlightPlusRenderPassFeature + m_EditorClassIdentifier: + m_Active: 1 + renderPassEvent: 500 + clearStencil: 0 + previewInEditMode: 1 + showInPreviewCamera: 1 +--- !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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: HighlightPlusForwardRenderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} + m_RendererFeatures: + - {fileID: -7137549924450841197} + m_RendererFeatureMap: 93cd7dfa2854f29c + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, + type: 3} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + m_AssetVersion: 2 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 0 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 0 + m_CopyDepthMode: 0 + m_AccurateGbufferNormals: 0 + m_ClusteredRendering: 0 + m_TileSize: 32 + m_IntermediateTextureMode: 1 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/HighlightPlusForwardRenderer.asset.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/HighlightPlusForwardRenderer.asset.meta new file mode 100644 index 00000000..69856d5f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/HighlightPlusForwardRenderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 47db18f3169384f6b87445e6447e189e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/UniversalRenderPipelineAsset.asset b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/UniversalRenderPipelineAsset.asset new file mode 100644 index 00000000..f64cdb99 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/UniversalRenderPipelineAsset.asset @@ -0,0 +1,75 @@ +%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: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: UniversalRenderPipelineAsset + m_EditorClassIdentifier: + k_AssetVersion: 9 + k_AssetPreviousVersion: 9 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: 47db18f3169384f6b87445e6447e189e, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 1 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_StoreActionsOptimization: 0 + m_SupportsHDR: 1 + m_MSAA: 2 + m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 2048 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 4 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 + m_SoftShadowsSupported: 1 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_ShaderVariantLogLevel: 0 + m_VolumeFrameworkUpdateMode: 0 + m_ShadowCascades: 0 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/UniversalRenderPipelineAsset.asset.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/UniversalRenderPipelineAsset.asset.meta new file mode 100644 index 00000000..a3eec97c --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Demo/URP settings/UniversalRenderPipelineAsset.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7cb1de89cd1dc44c5be43a3f6664fb90 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation.meta new file mode 100644 index 00000000..640bc9b1 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6b6ed63a44dd4e0b9e9de96d34d9930 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url new file mode 100644 index 00000000..e6b8bab6 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url.meta new file mode 100644 index 00000000..5ab1ff6f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation Online.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 05f4a9095f69c4ec6bc8fb97dcdbacfb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url new file mode 100644 index 00000000..12209c0d --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.dropbox.com/s/4nx9pv977wvvrv8/Documentation.pdf?dl=0 \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url.meta new file mode 100644 index 00000000..9dced4a5 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Documentation PDF.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e3af944b32d74aaa9bd0bb1850bed61 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf new file mode 100644 index 00000000..3d1fda1b Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf.meta new file mode 100644 index 00000000..90d0c870 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Documentation/Kronnect Assets.pdf.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 782ce379ea1624a349b1c53de1f90c95 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor.meta new file mode 100644 index 00000000..dbe74023 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c1cfaabf0583f44b4871807a898aaf31 +folderAsset: yes +timeCreated: 1542886534 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs new file mode 100644 index 00000000..e77d1f11 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs @@ -0,0 +1,882 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightEffect))] + [CanEditMultipleObjects] + public class HighlightEffectEditor : UnityEditor.Editor { + +#pragma warning disable 0618 + + SerializedProperty profile, profileSync, camerasLayerMask, ignoreObjectVisibility, reflectionProbes, GPUInstancing, optimizeSkinnedMesh, sortingPriority; + SerializedProperty ignore, effectGroup, effectGroupLayer, effectNameFilter, effectNameUseRegEx, effectTarget, combineMeshes, alphaCutOff, cullBackFaces, padding, normalsOption; + SerializedProperty highlighted, fadeInDuration, fadeOutDuration, flipY, constantWidth, extraCoveragePixels, subMeshMask, minimumWidth; + SerializedProperty overlay, overlayMode, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayBlending, overlayTexture, overlayTextureUVSpace, overlayTextureScale, overlayTextureScrolling, overlayVisibility; + SerializedProperty outline, outlineColor, outlineColorStyle, outlineGradient, outlineGradientInLocalSpace, outlineBlurPasses, outlineWidth, outlineQuality, outlineEdgeMode, outlineEdgeThreshold, outlineSharpness; + SerializedProperty outlineDownsampling, outlineVisibility, outlineBlitDebug, outlineIndependent, outlineContourStyle, outlineMaskMode; + SerializedProperty glow, glowWidth, glowQuality, glowBlurMethod, glowDownsampling, glowHQColor, glowDithering, glowDitheringStyle, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed; + SerializedProperty glowBlendPasses, glowPasses, glowVisibility, glowBlendMode, glowBlitDebug, glowMaskMode; + 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, forceRefresh, enableProfileApply; + + UniversalRenderPipelineAsset pipe; + 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"); + ignoreObjectVisibility = serializedObject.FindProperty("ignoreObjectVisibility"); + reflectionProbes = serializedObject.FindProperty("reflectionProbes"); + optimizeSkinnedMesh = serializedObject.FindProperty("optimizeSkinnedMesh"); + sortingPriority = serializedObject.FindProperty("sortingPriority"); + normalsOption = serializedObject.FindProperty("normalsOption"); + GPUInstancing = serializedObject.FindProperty("GPUInstancing"); + ignore = serializedObject.FindProperty("ignore"); + 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"); + 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"); + subMeshMask = serializedObject.FindProperty("subMeshMask"); + 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"); + outlineBlitDebug = serializedObject.FindProperty("outlineBlitDebug"); + outlineIndependent = serializedObject.FindProperty("outlineIndependent"); + outlineContourStyle = serializedObject.FindProperty("outlineContourStyle"); + outlineMaskMode = serializedObject.FindProperty("outlineMaskMode"); + glow = serializedObject.FindProperty("glow"); + glowWidth = serializedObject.FindProperty("glowWidth"); + glowQuality = serializedObject.FindProperty("glowQuality"); + glowBlurMethod = serializedObject.FindProperty("glowBlurMethod"); + 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"); + glowBlitDebug = serializedObject.FindProperty("glowBlitDebug"); + glowMaskMode = serializedObject.FindProperty("glowMaskMode"); + glowDownsampling = serializedObject.FindProperty("glowDownsampling"); + 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 () { + + forceRefresh = false; + EditorGUILayout.Separator(); + + // URP setup helpers + pipe = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + if (pipe == null) { + EditorGUILayout.HelpBox("You must assign the Universal Rendering Pipeline asset in Project Settings / Graphics. Then, add the Highlight Plus Scriptable Render Feature to the list of Renderer Features of the Forward Renderer.", MessageType.Error); + if (GUILayout.Button("Watch Setup Video Tutorial")) { + Application.OpenURL("https://youtu.be/wXNS3gaBxHE"); + } + return; + } + + if (!HighlightPlusRenderPassFeature.installed) { + EditorGUILayout.HelpBox("Highlight Plus Render Feature must be added to the list of features of the Forward Renderer in the Universal Rendering Pipeline asset.", MessageType.Warning); + if (GUILayout.Button("Watch Setup Video Tutorial")) { + Application.OpenURL("https://youtu.be/wXNS3gaBxHE"); + } + if (GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.Separator(); + } + + bool isManager = IsDefaultEffectUsedByManager(); + 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; + } + GUI.enabled = enableProfileApply; + 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) { + DrawLayerMaskField(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.PropertyField(sortingPriority); + 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++; + DrawLayerMaskField(effectGroupLayer, "Layer"); + EditorGUI.indentLevel--; + } + if (effectGroup.intValue != (int)TargetOptions.OnlyThisObject && effectGroup.intValue != (int)TargetOptions.Scripting) { + 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(); + if (combineMeshes.boolValue) { + string warning = thisEffect.ValidateCombineMeshes(); + if (!string.IsNullOrEmpty(warning)) { + EditorGUILayout.HelpBox(warning, MessageType.Warning); + } + } + } + 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 ((outlineQuality.intValue == (int)QualityLevel.Highest && outline.floatValue > 0) || (glowQuality.intValue == (int)QualityLevel.Highest && glow.floatValue > 0)) { + GUI.enabled = true; + } + else { + GUI.enabled = false; + } + 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.")); + GUI.enabled = true; + 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.")); + } + EditorGUILayout.PropertyField(extraCoveragePixels); + } + } + + 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) { + CheckDepthTextureSupport("Highest Quality"); + EditorGUILayout.PropertyField(outlineDownsampling, new GUIContent("Downsampling")); + } + + if (outlineQuality.intValue == (int)QualityLevel.Highest && (glow.floatValue > 0 && glowQuality.intValue == (int)QualityLevel.Highest)) { + outlineVisibility.intValue = glowVisibility.intValue; + } + EditorGUILayout.PropertyField(outlineVisibility, new GUIContent("Visibility")); + if (outlineQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(outlineBlitDebug, new GUIContent("Debug View", "Shows the blitting rectangle on the screen.")); + if (!Application.isPlaying && outlineBlitDebug.boolValue && (!HighlightPlusRenderPassFeature.showingInEditMode || !highlighted.boolValue)) { + EditorGUILayout.HelpBox("Enable \"Preview In Editor\" in the Highlight Render Feature and \"Highlighted\" to display the outline Debug View.", MessageType.Warning); + } + } + EditorGUILayout.PropertyField(outlineMaskMode, new GUIContent("Mask Mode")); + 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) { + CheckDepthTextureSupport("Highest Quality"); + 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")); + } + else { + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + } + EditorGUILayout.PropertyField(glowMaskMode, new GUIContent("Mask Mode")); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + EditorGUILayout.PropertyField(glowBlendMode, new GUIContent("Blend Mode")); + } + else { + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + 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) { + if (thisEffect.glowPasses != null) { + for (int k = 0; k < thisEffect.glowPasses.Length - 1; k++) { + if (thisEffect.glowPasses[k].offset > thisEffect.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")); + if (glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowBlitDebug, new GUIContent("Debug View", "Shows the blitting rectangle on the screen.")); + if (!Application.isPlaying && glowBlitDebug.boolValue && (!HighlightPlusRenderPassFeature.showingInEditMode || !highlighted.boolValue)) { + EditorGUILayout.HelpBox("Enable \"Preview In Editor\" in the Highlight Render Feature and \"Highlighted\" to display the glow Debug View.", MessageType.Warning); + } + } + 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) { + CheckDepthTextureSupport("Align To Ground option"); + 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")); + DrawLayerMaskField(targetFXGroundLayerMask, "Ground Layer Mask"); + if ((targetFXGroundLayerMask.intValue & (1 << thisEffect.gameObject.layer)) != 0) { + EditorGUILayout.HelpBox("Ground Layer Mask should not include this object layer.", MessageType.Warning); + } + else { + if (thisEffect.alignToGroundTried && !thisEffect.alignToGroundHitGood) { + EditorGUILayout.HelpBox("The Target Fx image is not being aligned because the ground was not found. Make sure it has a collider and verify the ground layer mask.", 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) { + thisEffect.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) ? " •" : ""))); + if (seeThroughDepthOffset.floatValue > 0 || seeThroughMaxDepth.floatValue > 0) { + CheckDepthTextureSupport("See-Through Depth Options"); + } + 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() || forceRefresh || profileChanged || "UndoRedoPerformed".Equals(Event.current.commandName)) { + if (thisEffect.profile != null) { + if (profileChanged) { + thisEffect.profile.Load(thisEffect); + EditorUtility.SetDirty(target); + profileChanged = false; + enableProfileApply = false; + } + else { + enableProfileApply = true; + } + } + + foreach (HighlightEffect effect in targets) { + effect.Refresh(); + effect.ResetHighlightStartTime(); + } + } + } + + void DrawLayerMaskField (SerializedProperty layerMaskProperty, string label = null) { + GUIContent propertyLabel = new GUIContent(layerMaskProperty.displayName, layerMaskProperty.tooltip); + if (!string.IsNullOrEmpty(label)) { + propertyLabel.text = label; + } + + EditorGUI.BeginChangeCheck(); + + // Convierte el valor del LayerMask en un entero + int oldLayerMaskValue = layerMaskProperty.intValue; + + // Obtén los nombres de las capas y transforma el valor del LayerMask + string[] layerNames = GetLayerNames(); + int newLayerMaskValue = EditorGUILayout.MaskField(propertyLabel, UnityEditorInternal.InternalEditorUtility.LayerMaskToConcatenatedLayersMask(oldLayerMaskValue), layerNames); + + if (EditorGUI.EndChangeCheck()) { + // Aplica el nuevo valor de LayerMask tras la conversión adecuada + layerMaskProperty.intValue = UnityEditorInternal.InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(newLayerMaskValue); + forceRefresh = true; + } + } + + string[] GetLayerNames () { + List layerNames = new List(); + for (int i = 0; i < 32; i++) { + string layerName = LayerMask.LayerToName(i); + if (!string.IsNullOrEmpty(layerName)) { + layerNames.Add(layerName); + } + } + return layerNames.ToArray(); + } + + + 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 && PlayerSettings.virtualRealitySupported) { + 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); + } + } + } + + void CheckDepthTextureSupport (string feature) { +#if !UNITY_2021_2_OR_NEWER + if (pipe == null) return; + if (!pipe.supportsCameraDepthTexture && !thisEffect.spriteMode) { + EditorGUILayout.HelpBox(feature + " requires Depth Texture support and currently it's not enabled in the Rendering Pipeline asset.", MessageType.Error); + if (pipe != null && GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.Separator(); + } +#endif + } + + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs.meta new file mode 100644 index 00000000..4c1a7dc6 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightEffectEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: be287539f47634552a716f0705710448 +timeCreated: 1542886545 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs new file mode 100644 index 00000000..f94667a1 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs.meta new file mode 100644 index 00000000..7edb76b6 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightManagerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ace58d1d278d649c98e5a2b5a066b3cd +timeCreated: 1548711355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs new file mode 100644 index 00000000..64224e58 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs @@ -0,0 +1,441 @@ +using UnityEditor; +using UnityEngine; + +namespace HighlightPlus { + + [CustomEditor(typeof(HighlightProfile))] + [CanEditMultipleObjects] + public class HighlightProfileEditor : UnityEditor.Editor { + + SerializedProperty effectGroup, effectGroupLayer, effectNameFilter, effectNameUseRegEx, combineMeshes, alphaCutOff, cullBackFaces, padding; + SerializedProperty overlay, overlayMode, overlayColor, overlayAnimationSpeed, overlayMinIntensity, overlayTexture, overlayTextureScale, overlayTextureScrolling, overlayTextureUVSpace, overlayBlending, overlayVisibility; + SerializedProperty fadeInDuration, fadeOutDuration, constantWidth, normalsOption, minimumWidth, extraCoveragePixels; + SerializedProperty outline, outlineColor, outlineColorStyle, outlineGradient, outlineGradientInLocalSpace, outlineWidth, outlineBlurPasses, outlineQuality, outlineEdgeMode, outlineEdgeThreshold, outlineSharpness; + SerializedProperty outlineDownsampling, outlineVisibility, outlineIndependent, outlineContourStyle, outlineMaskMode; + SerializedProperty glow, glowWidth, glowQuality, glowBlurMethod, glowDownsampling, glowHQColor, glowDithering, glowDitheringStyle, glowMagicNumber1, glowMagicNumber2, glowAnimationSpeed; + SerializedProperty glowBlendPasses, glowVisibility, glowBlendMode, glowPasses, glowMaskMode; + 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"); + 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"); + outlineSharpness = serializedObject.FindProperty("outlineSharpness"); + outlineDownsampling = serializedObject.FindProperty("outlineDownsampling"); + outlineVisibility = serializedObject.FindProperty("outlineVisibility"); + outlineIndependent = serializedObject.FindProperty("outlineIndependent"); + outlineContourStyle = serializedObject.FindProperty("outlineContourStyle"); + outlineMaskMode = serializedObject.FindProperty("outlineMaskMode"); + 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"); + 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"); + glowMaskMode = serializedObject.FindProperty("glowMaskMode"); + 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() { + + serializedObject.Update(); + + 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(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.PropertyField(extraCoveragePixels); + + 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 && glowQuality.intValue == (int)QualityLevel.Highest) { + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + } else { + EditorGUILayout.PropertyField(outlineVisibility, new GUIContent("Visibility")); + } + EditorGUILayout.PropertyField(outlineMaskMode, new GUIContent("Mask Mode")); + 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")); + } else { + EditorGUILayout.PropertyField(glowWidth, new GUIContent("Width")); + } + EditorGUILayout.PropertyField(glowAnimationSpeed, new GUIContent("Animation Speed")); + EditorGUILayout.PropertyField(glowVisibility, new GUIContent("Visibility")); + EditorGUILayout.PropertyField(glowMaskMode, new GUIContent("Mask Mode")); + 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); + } + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs.meta new file mode 100644 index 00000000..dfa2e441 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightProfileEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b3b0e551d6f4f4f3987e8e5be2e89285 +timeCreated: 1542886545 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs new file mode 100644 index 00000000..93776a98 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs @@ -0,0 +1,32 @@ +using UnityEditor; + +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/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta new file mode 100644 index 00000000..0edc1b04 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightSeeThroughOccluderEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11e725ecbe4d74569b232e1a0d57efba +timeCreated: 1548711355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs new file mode 100644 index 00000000..1bdd1089 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta new file mode 100644 index 00000000..fa1a7143 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/HighlightTriggerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eaf7f56fbcfa343efb5081d4309cb76b +timeCreated: 1548711355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs new file mode 100644 index 00000000..49a566a9 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs @@ -0,0 +1,92 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEditor; + +namespace HighlightPlus { + + public class TransparentWithDepth { + + static Material bmDepthOnly; + + + [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/Remove Depth Compatibility", false, 101)] + static void RemoveDepthOption () { + + Renderer renderer = GetRenderer (); + if (renderer == null) + return; + + Material[] materials = renderer.sharedMaterials; + for (int k = 0; k < materials.Length; k++) { + if (materials [k] == bmDepthOnly) { + List newMaterials = new List (renderer.sharedMaterials); + newMaterials.RemoveAt (k); + renderer.sharedMaterials = newMaterials.ToArray (); + return; + } + } + + for (int k = 0; k < materials.Length; k++) { + if (materials [k] == bmDepthOnly) { + EditorUtility.DisplayDialog ("Depth Support", "This object was not previously modified! Nothing to do.", "Ok"); + return; + } + } + + } + + + 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; + } + } + + return renderer; + } + + + } +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs.meta new file mode 100644 index 00000000..7221edbd --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Editor/TransparentWithDepth.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: be6e3be6d17ed49a3bd16d816815d6fd +timeCreated: 1515683694 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/README.txt b/FactoryNumeric/Assets/Plugins/HighlightPlus/README.txt new file mode 100644 index 00000000..c536d91c --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/README.txt @@ -0,0 +1,454 @@ +************************************** +* HIGHLIGHT PLUS * +* Created by Ramiro Oliva (Kronnect) * +* README FILE * +************************************** + + +Notice about Universal Rendering Pipeline +----------------------------------------- +This package is designed for URP. +It requires Unity 2021.3 or later +To install the plugin correctly: + +1) Make sure you have Universal Rendering Pipeline asset installed (from Package Manager). +2) Go to Project Settings / Graphics. +3) Double click the Universal Rendering Pipeline asset. +4) Double click the Forward Renderer asset. +5) Click "+" to add the Highlight Plus Renderer Feature to the list of the Forward Renderer Features. + +Note: URP assets can be assigned to Settings / Graphics and also Settings / Quality. Check both sections! + +You can also find a HighlightPlusForwardRenderer asset in the Highlight Plus / Pipelines / URP folder. +Make sure the Highlight Plus Scriptable Renderer Feature is listed in the Renderer Features of the Forward Renderer in the pipeline asset. + +Video instructions: https://youtu.be/d4onpE5RDNs + + +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! + + + + +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 +- Added "Highlight Effect Blocker" component. You can use it to cancel background outline/glow/overlay when a sprite or transparent object is highlighted. + +Version 21.1 +- Performance optimizations when using independent option +- QoL improvements: additional warnings in inspector + +Version 21.0 +- New effect: icon +- Improved "Combine Meshes" option which now supports meshes with 32 bit index format + +Version 20.1.2 +- Changes to improve compatibility with custom assembly definitions (requires removal and reimport of the plugin) + +Version 20.1.1 +- [Fix] VR fixes + +Version 20.1 +- Added "Padding" option: creates an empty space between the mesh and the objects +- Added "Sorting Priority" option to Highlight Effect inspector. Useful to ensure certain effects render on top of others. +- 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 20.0.2 +- See-through: improved Editor debug of occluders in non-accurate/collider based mode + +Version 20.0.1 +- [Fix] Fixed GPU instancing on skinned mesh renderers + +Version 20.0 +- Added support for Unity 2023.3 RenderGraph +- 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 +- Change: removed "Glow Ignore Mask" and replaced by "Mask Mode" +- Added "Mask Mode" to Outline section +- 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 +- Added "Show In Preview Camera" option to Highlight Plus render feature +- Preview in Editor option has moved to the Highlight Plus render feature +- 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 +- [Fix] Fixed rendering sorting issue when several highlighted objects share same position + +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 +- Performance optimizations when using a high number of Highlight Effect components in the scene +- [Fix] Fixed shader compatibility issue on PS4 + +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 +- [Fix] Fixed VR issue in Unity 2022.1 with Single Pass Instanced + +Version 9.1.1 +- [Fix] Fixed potential issue with Unity 2021.2 related to depthCameraAttachment handling + +Version 9.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.1 +- [Fix] Fixed unnecessary memory allocation in the render feature + +Version 8.4 +- Added "Border Only" option to See-Through effect +- Adding a Highlight Effect component to a parent no longer deactivates highlighted children + +Version 8.3 +- Upgraded to Unity 2020.3.16 as minimum + +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 outer glow not showing in higher quality with visibility set to normal and orthographic camera +- [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 apply custom sorting to effects (check documentation: Custom sorting section) +- Independent option is now moved to Highlight Options section and affects both outline and glow +- Added "Clear Stencil" option to Highlight Plus Render Feature (useful to solve compatibility with other assets that use stencil buffers) + +Version 7.9.2 +- [Fix] Fixed an issue in Unity 2021.2 when using MSAA and High Quality outline/glow + +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.1 +- [Fix] Fixed regression bug with Outline in High Quality mode + +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 +- Added support for Single Pass Instanced +- Internal improvements and fixes + +Version 6.9 +- Added "Ordered" option to see-through +- Removed "Non Overlap" option from see-through as now it pervents overdraw by default + +Version 6.8 +- Improvements to see-through rendering order +- [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.2 +- Added inspector tooltips and improved documentation + +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 4/Apr/2021 +- [Fix] Fixed glow overlay when MSAA is disabled on Windows + +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.4 22/01/2021 +- Optimizations to material setters +- [Fix] Fixed outline color issue with quality level set to medium + +Version 5.3.3 +- Effects now reflect object transform changes when combines meshes option is enabled + +Version 5.3 +- Added "Combine Meshes" option to profile +- Optimizations and fixes + +Version 5.2 +- Added "Object Name Filter" option to profile + +Version 5.1 +- Added "Border When Hidden" effect (outline when see-through triggers) + +Version 5.0.1 +- Added support for Unity 2020.2 beta + +Version 5.0 +- API: added "TargetFX" method to programmatically start the target effect +- Added support for double-sided shader effects + +Version 4.9 +- Added "Medium" quality level + +Version 4.8.2 +- [Fix] Fixed issue with outline set to fastest and glow using highest in latest URP version + +Version 4.8.1 +- [Fix] Fixed issue with outline/glow when overlay cameras are present on the stack + +Version 4.8 +- Added "Outer Glow Blend Passes" option +- [Fix] Fixed outline & glow issue with alpha cutout when using non-highest quality mode + +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.4 +- Exposed "Smooth Normals" option in inspector. + +Version 4.3.2 +- Added HitFX effect +- Improvements to SeeThrough Occluder when Detection Mode is set to RayCast + +Version 4.3.1 +- [Fix] Fixed issue with Highlight Effect Occluder script + +Version 4.3 +- Added GPU instancing support for outline / outer glow effects + +Version 4.2.2 +- [Fix] Fixed effect being rendered when object is outside of frustum camera + +Version 4.2.1 +- Profile: added "Constant Width" property +- Enabled HDR color picker to Color properties +- [Fix] Fixed missing outline with flat surfaces like quads under certain angles + +Version 4.2 +- Glow/Outline downsampling option added to profiles +- [Fix] Removed VR API usage console warning + +Version 4.1 +- Added Outline Independent option +- [Fix] Fixed error when highlight script is added to an empty gameobject + +Version 4.0 +- Support for URP Scriptable Rendering Feature diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/_README.txt.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/README.txt.meta similarity index 54% rename from FactoryNumeric/Assets/Plugins/HighlightPlusBundle/_README.txt.meta rename to FactoryNumeric/Assets/Plugins/HighlightPlus/README.txt.meta index 2c50cd1c..a386b105 100644 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/_README.txt.meta +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/README.txt.meta @@ -1,7 +1,8 @@ fileFormatVersion: 2 -guid: 2b60423aba8cd4a19bf6f546a883a794 +guid: 53265a9967ed548efaf71f5807638781 +timeCreated: 1542901568 +licenseType: Store TextScriptImporter: - externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime.meta new file mode 100644 index 00000000..c95baa04 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a233cc5176ac642f89469b5d4c676c89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources.meta new file mode 100644 index 00000000..7a6440c1 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3a476022645d74299b862c36d0daa1df +folderAsset: yes +timeCreated: 1542876301 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus.meta new file mode 100644 index 00000000..85f2d99d --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6bd97436761b94109a0785ed6823647c +folderAsset: yes +timeCreated: 1542893576 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc new file mode 100644 index 00000000..60241d24 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc @@ -0,0 +1,10 @@ +#ifndef CUSTOM_VERTEX_TRANSFORM_INCLUDED +#define CUSTOM_VERTEX_TRANSFORM_INCLUDED + +float4 ComputeVertexPosition(float4 vertex) { + // Add here any custom vertex transform + float4 pos = UnityObjectToClipPos(vertex); + return pos; +} + +#endif diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc.meta new file mode 100644 index 00000000..00350b8c --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/CustomVertexTransform.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 26b31a85c4f4c4b11850968651dddfeb +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader new file mode 100644 index 00000000..de2579cf --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader @@ -0,0 +1,51 @@ +Shader "HighlightPlus/Geometry/JustDepth" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + ColorMask 0 + Name "Write Depth" + + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader.meta new file mode 100644 index 00000000..1857474e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightAddDepth.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 058a572e30b2d446bade2dda32bcef0f +timeCreated: 1515682635 +licenseType: Store +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat new file mode 100644 index 00000000..d024ee31 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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: 3e461a1484e2948598abca48b53d8b58, 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat.meta new file mode 100644 index 00000000..d56481ee --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOutlineAndGlow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d753c051e36754eef85b1868da81e4c7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOverlay.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOverlay.mat new file mode 100644 index 00000000..01a5ea8f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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: 3e461a1484e2948598abca48b53d8b58, 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOverlay.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOverlay.mat.meta new file mode 100644 index 00000000..cbb82a17 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlockerOverlay.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9f2b7b7a5532e473e9bbba32efa31c4e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader new file mode 100644 index 00000000..318c7b29 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader @@ -0,0 +1,182 @@ +Shader "HighlightPlus/Geometry/BlurGlow" { +Properties { + _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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + + 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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + + 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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + + 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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader.meta new file mode 100644 index 00000000..32335c20 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 84c84ee93ec484bdda371ffbdebfcc7c +timeCreated: 1556874239 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader new file mode 100644 index 00000000..48ec0b83 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader @@ -0,0 +1,168 @@ +Shader "HighlightPlus/Geometry/BlurOutline" { +Properties { + _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 + { + 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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + + 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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + 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 = v.vertex; + o.pos.y *= _ProjectionParams.x; + + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader.meta new file mode 100644 index 00000000..31a942bf --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightBlurOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 74f3491dcf1224f0c91238381c035439 +timeCreated: 1556874239 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader new file mode 100644 index 00000000..b8c0c99b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader @@ -0,0 +1,95 @@ +Shader "HighlightPlus/ClearStencil" +{ + Properties + { + } + SubShader + { + Stencil { + Ref 2 + Comp Always + Pass zero + } + ZTest Always + ZWrite Off + Cull Off + ColorMask 0 + + Pass // clear stencil 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 // clear stencil 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader.meta new file mode 100644 index 00000000..39152518 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightClearStencil.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 844773224daae4c31a9160897f833c5b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader new file mode 100644 index 00000000..ec7a8daf --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader @@ -0,0 +1,168 @@ +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" "DisableBatching" = "True" } + 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 + #pragma multi_compile_local _ HP_MASK_CUTOUT + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeGlowFinal); + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPSourceRT); + float4 _HPSourceRT_TexelSize; + + 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_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = 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_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + + float2 uv = i.scrPos.xy/i.scrPos.w; + fixed glow = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPComposeGlowFinal, uv).r; + + #if HP_MASK_CUTOUT + fixed maskN = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(0, 1) * _HPSourceRT_TexelSize.xy).r; + fixed maskS = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(0, -1) * _HPSourceRT_TexelSize.xy).r; + fixed maskW = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(-1, 0) * _HPSourceRT_TexelSize.xy).r; + fixed maskE = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(1, 0) * _HPSourceRT_TexelSize.xy).r; + glow *= maskN == 0 || maskS == 0 || maskW == 0 || maskE == 0; + #endif + + fixed4 color = _Color; + color *= glow; + + + 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_INSTANCE_ID(i); + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader.meta new file mode 100644 index 00000000..186a4c95 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 975a91ee935da4d9c8a3e807fecd8047 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader new file mode 100644 index 00000000..6b29c137 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader @@ -0,0 +1,181 @@ +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" "DisableBatching" = "True" } + 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 + #pragma multi_compile_local _ HP_MASK_CUTOUT + + #include "UnityCG.cginc" + + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal); + UNITY_DECLARE_SCREENSPACE_TEXTURE(_HPSourceRT); + float4 _HPSourceRT_TexelSize; + + 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_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = 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_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 uv = i.scrPos.xy/i.scrPos.w; + fixed4 outline = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPComposeOutlineFinal, uv); + fixed4 color = _Color; + color.a *= OUTLINE_SOURCE; + + #if HP_MASK_CUTOUT + fixed4 maskN = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(0, 1) * _HPSourceRT_TexelSize.xy); + fixed4 maskS = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(0, -1) * _HPSourceRT_TexelSize.xy); + fixed4 maskW = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(-1, 0) * _HPSourceRT_TexelSize.xy); + fixed4 maskE = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_HPSourceRT, uv + float2(1, 0) * _HPSourceRT_TexelSize.xy); + color.a *= all(maskN.rgb==0) || all(maskS.rgb == 0) || all(maskW.rgb == 0) || all(maskE.rgb == 0); + #endif + + 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_TRANSFER_INSTANCE_ID(v, 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_INSTANCE_ID(i); + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader.meta new file mode 100644 index 00000000..ced1aa18 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightComposeOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a6de74b6cfa9440182f8f56e4a0e4f1 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat new file mode 100644 index 00000000..484639dc --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat @@ -0,0 +1,105 @@ +%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: + - _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} + - _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} + - _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 + - _ConstantWidth: 1 + - _Cull: 2 + - _CutOff: 0.5 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _GlowStencilComp: 6 + - _GlowStencilOp: 0 + - _GlowZTest: 4 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _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} + - _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} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &8957597210722627563 +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 diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat.meta new file mode 100644 index 00000000..43f7b20e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41672e7b4c6544aedbffb9e271c7ef7c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader new file mode 100644 index 00000000..5d0bda31 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader @@ -0,0 +1,134 @@ +Shader "HighlightPlus/Geometry/Glow" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _Glow2 ("Glow2", Vector) = (0.01, 1, 0.5, 0) + _Color ("Color", Color) = (1,1,1) // not used; dummy property to avoid inspector warning "material has no _Color property" + _Cull ("Cull Mode", Int) = 2 + _ConstantWidth ("Constant Width", Float) = 1 + _MinimumWidth ("Minimum Width", Float) = 0 + _GlowZTest ("ZTest", Int) = 4 + _GlowStencilOp ("Stencil Operation", Int) = 0 + _CutOff("CutOff", Float ) = 0.5 + _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 normal : 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 intensity + float _ConstantWidth, _MinimumWidth; + fixed _CutOff; + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + sampler2D _NoiseTex; + float4 _NoiseTex_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 pos = ComputeVertexPosition(v.vertex); + float3 norm = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal); + float2 offset = any(norm.xy)!=0 ? TransformViewToProjection(normalize(norm.xy)) : 0.0.xx; + float2 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 + offset += glowDirection; + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader.meta new file mode 100644 index 00000000..f4794319 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightGlow.shader.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 049d9e75e07674a78a703cf1203c07dd +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _NoiseTex: {fileID: 2800000, guid: 12319e92c3b5b45d193b1fe41ed05a1f, type: 3} + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightIconFX.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightIconFX.shader new file mode 100644 index 00000000..50e59bf8 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightIconFX.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightIconFX.shader.meta new file mode 100644 index 00000000..11d9a2ec --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightIconFX.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 102d0b94573b248649f49d8cf8cc8fa1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader new file mode 100644 index 00000000..f5a306f9 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader @@ -0,0 +1,98 @@ +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" } + + // 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 normal : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 wpos : TEXCOORD1; + float3 normal : NORMAL; + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + fixed _CutOff; + fixed4 _InnerGlowColor; + fixed _InnerGlowWidth; + + + v2f vert (appdata v) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + o.pos = ComputeVertexPosition(v.vertex); + o.wpos = mul(unity_ObjectToWorld, v.vertex).xyz; + o.normal = UnityObjectToWorldNormal(v.normal); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + + #if UNITY_REVERSED_Z + o.pos.z += 0.0001; + #else + o.pos.z -= 0.0001; + #endif + + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_ALPHACLIP + fixed4 color = tex2D(_MainTex, i.uv); + clip(color.a - _CutOff); + #endif + + float3 viewDir = normalize(i.wpos - _WorldSpaceCameraPos.xyz); + fixed dx = saturate(_InnerGlowWidth - abs(dot(viewDir, normalize(i.normal)))) / _InnerGlowWidth; + fixed4 col = _InnerGlowColor * dx; + return col; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader.meta new file mode 100644 index 00000000..d52a3f3f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightInnerGlow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e5a069457bd344391acd5af227c0ce11 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader new file mode 100644 index 00000000..303591cd --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader @@ -0,0 +1,117 @@ +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 + _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 _Padding; + 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); + v.vertex.xyz *= 1 + _Padding; + o.pos = ComputeVertexPosition(v.vertex); + o.uv = TRANSFORM_TEX (v.uv, _MainTex); + + #if UNITY_REVERSED_Z + o.pos.z += 0.0001; + #else + o.pos.z -= 0.0001; + #endif + + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + #if HP_ALPHACLIP + fixed4 col = tex2D(_MainTex, i.uv); + clip(col.a - _CutOff); + #endif + return 0; + } + + ENDCG + + + // Create mask + Pass + { + Name "Mask" + Stencil { + Ref 2 + Comp always + Pass replace + WriteMask 2 + ReadMask 2 + } + ColorMask 0 + ZWrite Off + Cull [_Cull] // default Cull Back improves glow in high quality) + ZTest [_ZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + ENDCG + } + + + // Create mask for see-through (the only difference is the ZTest) + Pass + { + Name "See-through Mask" + Stencil { + Ref 2 + Comp always + Pass replace + WriteMask 2 + ReadMask 2 + } + ColorMask 0 + ZWrite Off + Cull [_Cull] // default Cull Back improves glow in high quality) + ZTest LEqual + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + ENDCG + } + + } +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader.meta new file mode 100644 index 00000000..54d55089 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e694fa934b6db4a00b8d4b9887115332 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader new file mode 100644 index 00000000..6afbd182 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader @@ -0,0 +1,59 @@ +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" } + + // Create mask + Pass + { + Stencil { + Ref 3 + WriteMask 3 + Comp always + Pass replace + } + ColorMask 0 + ZWrite Off + Offset -1, -1 + + 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); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + + } +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader.meta new file mode 100644 index 00000000..b5eca912 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOccluder.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 229baf997355a43cda580dd4cf86b71e +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat new file mode 100644 index 00000000..701eed81 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat @@ -0,0 +1,94 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6555637095062934885 +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: 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: + - _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_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ConstantWidth: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _OutlineWidth: 0.01 + - _OutlineZTest: 4 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _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} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineDirection: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat.meta new file mode 100644 index 00000000..2b0dc0b0 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 580895c3d590f4760ba7d0ee2a5dc624 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader new file mode 100644 index 00000000..99217d75 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader @@ -0,0 +1,193 @@ +Shader "HighlightPlus/Geometry/Outline" { +Properties { + _MainTex ("Texture", Any) = "white" {} + _OutlineWidth ("Outline Offset", Float) = 0.01 + _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 + _ConstantWidth ("Constant Width", Float) = 1 + _MinimumWidth("Minimum Width", Float) = 0 + _OutlineZTest("ZTest", Int) = 4 + _CutOff("CutOff", Float ) = 0.5 + _OutlineStencilComp ("Stencil Comp", Int) = 6 +} + SubShader + { + Tags { "Queue"="Transparent+120" "RenderType"="Transparent" "DisableBatching"="True" } + + Pass + { + Name "Outline" + Stencil { + Ref 2 + Comp [_OutlineStencilComp] + Pass replace + ReadMask 2 + WriteMask 2 + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + 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 normal : 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 + }; + + fixed4 _OutlineColor; + sampler2D _OutlineGradientTex; + + float _OutlineWidth; + float _ConstantWidth, _MinimumWidth; + fixed _CutOff; + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + + 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 + o.pos = ComputeVertexPosition(v.vertex); + 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, _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 2 + Comp Always + Pass zero + } + + ColorMask 0 + ZWrite Off + Cull [_Cull] + ZTest [_OutlineZTest] + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + struct appdata + { + float4 vertex : POSITION; + float3 normal : NORMAL; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 pos : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO + }; + + fixed4 _OutlineColor; + float _OutlineWidth; + float _ConstantWidth; + + 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); + o.pos = ComputeVertexPosition(v.vertex); + 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]); + z = _ConstantWidth * (z - 2.0) + 2.0; + 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; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return 0; + } + ENDCG + } + + + } +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader.meta new file mode 100644 index 00000000..14bfdeb4 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOutline.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cbbf740e9c8644e8492d08b1a3fd0203 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader new file mode 100644 index 00000000..4538ea99 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader @@ -0,0 +1,144 @@ +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 + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader.meta new file mode 100644 index 00000000..80f16368 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightOverlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d17a98d19ada34bb7b4f86130e590159 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat new file mode 100644 index 00000000..a13e4883 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta new file mode 100644 index 00000000..7ce4eb28 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightPlusDepthWrite.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 825cb444e111842cf97788cbb7583edd +timeCreated: 1546857910 +licenseType: Store +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader new file mode 100644 index 00000000..1ac4edbe --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader @@ -0,0 +1,170 @@ +Shader "HighlightPlus/Geometry/SeeThrough" { +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 + _SeeThroughTexture("Mask Texture", 2D) = "white" {} + _SeeThroughTextureScale("Mask Texture Scale", Float) = 1.0 + _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 Greater + ZWrite 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; + 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 + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + float GetEyeDepth(float rawDepth) { + float persp = LinearEyeDepth(rawDepth); + float ortho = (_ProjectionParams.z-_ProjectionParams.y)*(1-rawDepth)+_ProjectionParams.y; + return lerp(persp,ortho,unity_OrthoParams.w); + } + + fixed4 frag (v2f i) : SV_Target + { + #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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader.meta new file mode 100644 index 00000000..8312b80f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThrough.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 47198bbf0b2a44882aceef6af17a467d +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader new file mode 100644 index 00000000..003ebb9b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader @@ -0,0 +1,124 @@ +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 + _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 + _Cull ("Cull Mode", Int) = 2 +} + SubShader + { + Tags { "Queue"="Transparent+201" "RenderType"="Transparent" "DisableBatching"="True" } + + // See through effect + Pass + { + Name "See-through border" + Stencil { + ReadMask 3 + WriteMask 3 + Ref [_SeeThroughStencilRef] + Comp [_SeeThroughStencilComp] + Pass [_SeeThroughStencilPassOp] + Fail [_SeeThroughStencilPassOp] + } + ZTest Greater + ZWrite 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 + + #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; + float _SeeThroughBorderWidth; + float _SeeThroughBorderConstantWidth; + 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]); + z = _SeeThroughBorderConstantWidth * (z - 2.0) + 2.0; + o.pos.xy += offset * z * _SeeThroughBorderWidth; + + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + float GetEyeDepth(float rawDepth) { + float persp = LinearEyeDepth(rawDepth); + float ortho = (_ProjectionParams.z-_ProjectionParams.y)*(1-rawDepth)+_ProjectionParams.y; + return lerp(persp,ortho,unity_OrthoParams.w); + } + + fixed4 frag (v2f i) : SV_Target + { + #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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta new file mode 100644 index 00000000..202bec65 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughBorder.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe0a98aa774224cf1bc4a800a586a33a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader new file mode 100644 index 00000000..8e417bf4 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader @@ -0,0 +1,62 @@ +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 + { + Name "See-through mask" + Stencil { + WriteMask 3 + Ref 1 + Comp always + Pass replace + } + + ZTest Always + ZWrite On + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta new file mode 100644 index 00000000..da76823f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSeeThroughMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 457d76fdfc7c4472faeb0297c0edab29 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader new file mode 100644 index 00000000..8efa079b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader @@ -0,0 +1,142 @@ +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 + _EdgeThreshold("Edge Threshold", Float) = 0.995 + _Padding("Padding", Float) = 0 +} + SubShader + { + Tags { "Queue"="Transparent+100" "RenderType"="Transparent" "DisableBatching" = "True" } + + // Compose effect on camera target + Pass + { + Name "Solid Color" + ZWrite Off + Cull [_Cull] + ZTest Always + Stencil { + Ref 2 + Comp NotEqual + Pass replace + } + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_local _ HP_ALPHACLIP + #pragma multi_compile_local _ HP_DEPTHCLIP HP_DEPTHCLIP_INV + #pragma multi_compile_local _ HP_ALL_EDGES + + #include "UnityCG.cginc" + #include "CustomVertexTransform.cginc" + + sampler2D _MainTex; + #if HP_DEPTHCLIP || HP_DEPTHCLIP_INV || HP_ALL_EDGES + UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); + float4 _CameraDepthTexture_TexelSize;; + float _EdgeThreshold; + #endif + + float4 _MainTex_ST; + float _Padding; + fixed _CutOff; + fixed4 _Color; + + 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 || HP_DEPTHCLIP_INV + 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 || HP_DEPTHCLIP_INV + COMPUTE_EYEDEPTH(o.depth); + #endif + return o; + } + +#if HP_ALL_EDGES + 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 normal = cross(p1, p2); + return normalize(normal); + } + + 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; + } +#endif + + 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 || HP_DEPTHCLIP_INV + float depthRaw = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv); + float depthPersp = LinearEyeDepth(depthRaw); + #if defined(UNITY_REVERSED_Z) + depthRaw = 1.0 - depthRaw; + #endif + float depthOrtho = lerp(_ProjectionParams.y, _ProjectionParams.z, depthRaw); + float vz = unity_OrthoParams.w ? depthOrtho : depthPersp; + #if HP_DEPTHCLIP_INV + clip( i.depth * 0.999 - vz); + #else + clip( vz - i.depth * 0.999); + #endif + #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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader.meta new file mode 100644 index 00000000..37f54c59 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightSolidColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 77643996218224478a471439e0ea5fb4 +timeCreated: 1544699251 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader new file mode 100644 index 00000000..e4aed23f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader @@ -0,0 +1,168 @@ +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" } + + // Target FX decal + Pass + { + Stencil { + Ref 2 + Comp NotEqual + ReadMask 2 + } + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ZTest [_ZTest] + Cull Off + + HLSLPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #pragma target 3.0 + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl" + + struct appdata + { + float3 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; + CBUFFER_START(UnityPerMaterial) + float4 _MainTex_ST; + half4 _Color; + float4 _TargetFXRenderData; + CBUFFER_END + + #define GROUND_NORMAL _TargetFXRenderData.xyz + #define FADE_POWER _TargetFXRenderData.w + + + v2f vert(appdata input) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + VertexPositionInputs vertexPositionInput = GetVertexPositionInputs(input.positionOS); + o.positionCS = vertexPositionInput.positionCS; + o.screenPos = ComputeScreenPos(o.positionCS); + + float3 viewRay = vertexPositionInput.positionVS; + 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; + } + + half4 frag(v2f i) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + + float depth = SampleSceneDepth(i.screenPos.xy / i.screenPos.w); + 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(GetWorldToObjectMatrix(), float4(wpos, 1)).xyz; + } else { + float depthEye = LinearEyeDepth(depth, _ZBufferParams); + decalPos = i.camPosVS + (i.rayVS.xyz / i.rayVS.w) * depthEye; + } + clip(0.5 - abs(decalPos)); + + // check normal + float3 normal = normalize(cross(ddx(decalPos), -ddy(decalPos))); + float slope = dot(normal, 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; + } + ENDHLSL + } + + Pass + { + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader.meta new file mode 100644 index 00000000..d768e87d --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightTarget.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 54328cae8f89d442da972097ce4f23d9 +timeCreated: 1544699250 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat new file mode 100644 index 00000000..31020b1e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.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: HighlightUIMask + m_Shader: {fileID: 4800000, guid: 3e461a1484e2948598abca48b53d8b58, 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: 6 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 6 + - _StencilWriteMask: 6 + - _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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat.meta new file mode 100644 index 00000000..e4c879a5 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 779128a8e84b44d4db81443c424af511 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader new file mode 100644 index 00000000..3f00bc44 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader @@ -0,0 +1,74 @@ +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 + { + Stencil { + Ref [_Stencil] + Comp always + Pass replace + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader.meta new file mode 100644 index 00000000..693ec2ba --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/HighlightUIMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3e461a1484e2948598abca48b53d8b58 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/IconMesh.fbx b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/IconMesh.fbx new file mode 100644 index 00000000..0e42ac64 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/IconMesh.fbx differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/IconMesh.fbx.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/IconMesh.fbx.meta new file mode 100644 index 00000000..746504b9 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/IconMesh.fbx.meta @@ -0,0 +1,106 @@ +fileFormatVersion: 2 +guid: 0619ab933f4044ef7bca0b64517837b3 +ModelImporter: + serializedVersion: 21300 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 0 + 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: 0 + importBlendShapes: 1 + importCameras: 0 + importLights: 0 + 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: 1 + tangentImportMode: 2 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 3 + referencedClips: [] + importAnimation: 0 + 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: 0 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png new file mode 100644 index 00000000..8229918b Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/blueNoiseVL.png.meta new file mode 100644 index 00000000..ecbca925 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png new file mode 100644 index 00000000..f9fadf84 Binary files /dev/null and b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png differ diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png.meta new file mode 100644 index 00000000..77c6102b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Resources/HighlightPlus/target.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 1de3c566a6c8c405b9f6f453137273ec +timeCreated: 1555360741 +licenseType: Store +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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts.meta new file mode 100644 index 00000000..1682aa49 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 89ce39cd6bb34454bbaf48f1d111f236 +folderAsset: yes +timeCreated: 1542876305 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs new file mode 100644 index 00000000..cdd48a9a --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs @@ -0,0 +1,3382 @@ +/// +/// 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 + } + + 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 enum MaskMode { + Stencil, + IgnoreMask, + StencilAndCutout + } + + 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; + + /// + /// 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; + + [Tooltip("Custom sorting priority for the highlight effect (useful to control which effects render on top of others")] + public int sortingPriority; + + /// + /// 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.")] + 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 outlineBlitDebug; + [Tooltip("If enabled, this object won't combine the outline with other objects.")] + public bool outlineIndependent; + public ContourStyle outlineContourStyle = ContourStyle.AroundVisibleParts; + [Tooltip("Select the mask mode used with this effect.")] + public MaskMode outlineMaskMode = MaskMode.Stencil; + + [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; + 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("Select the mask mode used with this effect.")] + public MaskMode glowMaskMode = MaskMode.Stencil; + + [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("This option clears the stencil buffer after rendering the see-through effect which results in correct rendering order and supports other stencil-based effects that render afterwards.")] + 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 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; + 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; + + [NonSerialized] + public bool alignToGroundTried, alignToGroundHitGood; + +#if UNITY_EDITOR + /// + /// True if there's some static children + /// + [NonSerialized] + public bool staticChildren; +#endif + + /// + /// Returns true if the renderer for this gameobject is visible by any camera + /// + [NonSerialized] + public bool isVisible; + + [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 () { + if (previousSettings != null) { + 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 cbHighlight; + bool cbHighlightEmpty; + int[] mipGlowBuffers, mipOutlineBuffers; + static Mesh quadMesh, cubeMesh; + int sourceRT; + Matrix4x4 quadGlowMatrix, quadOutlineMatrix; + Vector4[] corners; + RenderTextureDescriptor sourceDesc; + Color debugColor, blackColor; + Visibility lastOutlineVisibility; + bool requireUpdateMaterial; + + [NonSerialized] + public static List effects = new List(); + + public static bool customSorting; + [NonSerialized] + public float sortingOffset; // used to avoid two objects with same distance to camera during sorting + + bool useSmoothGlow, useSmoothOutline, useSmoothBlend; + 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; + + 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 () { + if (rms == null || !isInitialized || fxMatOutlineTemplate == null) { + Init(); + } + HighlightPlusRenderPassFeature.sortFrameCount = 0; + if (!effects.Contains(this)) { + effects.Add(this); + } + UpdateVisibilityState(); + } + + 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]; + } + InitCommandBuffer(); + 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(); + } + } + + InitTemplateMaterials(); + + 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 (combinedMeshes.ContainsKey(combinedMeshesHashId)) { + 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; + } + } + } + } + + private void OnBecameVisible () { + isVisible = true; + } + + private void OnBecameInvisible () { + if (rms == null || rms.Length != 1 || rms[0].transform != transform) { + // if effect group doesn't include exactly one object and this object is this same gameobject + // ignore this optimization + isVisible = true; + } + else { + isVisible = false; + } + } + + /// + /// 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(); + } + + + RenderTargetIdentifier colorAttachmentBuffer, depthAttachmentBuffer; + + public void SetCommandBuffer (CommandBuffer cmd) { + cbHighlight = cmd; + cbHighlightEmpty = false; + } + + public CommandBuffer BuildCommandBuffer (Camera cam, RenderTargetIdentifier colorAttachmentBuffer, RenderTargetIdentifier depthAttachmentBuffer, bool clearStencil, ref RenderTextureDescriptor sourceDesc) { + this.colorAttachmentBuffer = colorAttachmentBuffer; + this.depthAttachmentBuffer = depthAttachmentBuffer; + this.sourceDesc = sourceDesc; + BuildCommandBuffer(cam, clearStencil); + return cbHighlightEmpty ? null : cbHighlight; + } + + void BuildCommandBuffer (Camera cam, bool clearStencil) { + + if (colorAttachmentBuffer == 0) { + colorAttachmentBuffer = BuiltinRenderTextureType.CameraTarget; + } + if (depthAttachmentBuffer == 0) { + depthAttachmentBuffer = BuiltinRenderTextureType.CameraTarget; + } + + InitCommandBuffer(); + + if (requireUpdateMaterial) { + requireUpdateMaterial = false; + UpdateMaterialProperties(); + } + + bool independentFullScreenNotExecuted = true; + if (clearStencil) { + ConfigureOutput(); + cbHighlight.DrawMesh(quadMesh, Matrix4x4.identity, fxMatClearStencil, 0, 0); + independentFullScreenNotExecuted = false; + } + + bool seeThroughReal = usesSeeThrough; + if (seeThroughReal) { + ConfigureOutput(); + seeThroughReal = RenderSeeThroughOccluders(cbHighlight, cam); + if (seeThroughReal && seeThroughOccluderMask != -1) { + if (seeThroughOccluderMaskAccurate) { + CheckOcclusionAccurate(cbHighlight, cam); + } + else { + seeThroughReal = CheckOcclusion(cam); + } + } + } + + bool showOverlay = hitActive || overlayMode == OverlayMode.Always; + if (!_highlighted && !seeThroughReal && !showOverlay) { + return; + } + + ConfigureOutput(); + + 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; + } + } + } + + // Apply effect + float glowReal = _highlighted ? this.glow : 0; + if (fxMatMask == null) + return; + + float now = GetTime(); + + // Check smooth blend ztesting capability + Visibility smoothGlowVisibility = glowVisibility; + Visibility smoothOutlineVisibility = outlineVisibility; + + // First create masks + float aspect = cam.aspect; + 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; + } + + if (outlineIndependent) { + if (useSmoothBlend) { + if (independentFullScreenNotExecuted) { + independentFullScreenNotExecuted = false; + cbHighlight.DrawMesh(quadMesh, Matrix4x4.identity, fxMatClearStencil, 0, 0); + } + } + else if (outline > 0 || glow > 0) { + bool allowGPUInstancing = useGPUInstancing && (shouldBakeSkinnedMesh || !rms[k].isSkinnedMesh); + + float width = outlineWidth; + if (glow > 0) { + width = Mathf.Max(width, glowWidth); + } + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (outlineQuality.UsesMultipleOffsets()) { + matDataDirection.Clear(); + for (int o = outlineOffsetsMin; o <= outlineOffsetsMax; o++) { + Vector4 direction = offsets[o] * (width / 100f); + direction.y *= aspect; + + if (allowGPUInstancing) { + matDataDirection.Add(direction); + } + else { + + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, direction); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatOutline[l], l, 1); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 1); + } + + } + + } + + if (allowGPUInstancing) { + int instanceCount = matDataDirection.Count; + if (instanceCount > 0) { + outlinePropertyBlock.Clear(); + outlinePropertyBlock.SetVectorArray(ShaderParams.OutlineDirection, matDataDirection); + if (matrices == null || matrices.Length < instanceCount) { + matrices = new Matrix4x4[instanceCount]; + } + if (rms[k].isCombined) { + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + } + else { + Matrix4x4 objectToWorld = rms[k].transform.localToWorldMatrix; + for (int m = 0; m < instanceCount; m++) { + matrices[m] = objectToWorld; + } + } + cbHighlight.DrawMeshInstanced(mesh, l, rms[k].fxMatOutline[l], 1, matrices, instanceCount, outlinePropertyBlock); + } + } + + } + else { + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, Vector4.zero); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatOutline[l], l, 1); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 1); + } + } + } + } + } + + } + + 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; + } + + bool targetEffectRendered = false; + bool iconEffectRendered = false; + bool usesSeeThroughBorder = (seeThroughBorder * seeThroughBorderWidth) > 0; + + 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); + } + } + + } + + // Add mesh effects + 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); + } + cbHighlight.SetGlobalFloat(ShaderParams.FadeFactor, fade); + + + 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].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatOverlay[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOverlay[l], l); + } + } + + + // Inner Glow + if (innerGlowColorA.a > 0) { + rms[k].fxMatInnerGlow[l].SetColor(ShaderParams.InnerGlowColor, innerGlowColorA); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatInnerGlow[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatInnerGlow[l], l); + } + } + } + } + + if (!_highlighted) + continue; + + bool allowGPUInstancing = useGPUInstancing && (shouldBakeSkinnedMesh || !rms[k].isSkinnedMesh); + + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + // Glow + if (glow > 0 && glowQuality != QualityLevel.Highest) { + matDataGlow.Clear(); + matDataColor.Clear(); + matDataDirection.Clear(); + for (int glowPass = 0; glowPass < glowPasses.Length; glowPass++) { + if (glowQuality.UsesMultipleOffsets()) { + for (int o = glowOffsetsMin; o <= glowOffsetsMax; o++) { + Vector4 direction = offsets[o]; + direction.y *= aspect; + Color dataColor = glowPasses[glowPass].color; + Vector4 dataGlow = new Vector4(fade * glowReal * glowPasses[glowPass].alpha, glowPasses[glowPass].offset * glowWidth / 100f, glowMagicNumber1, glowMagicNumber2); + if (allowGPUInstancing) { + matDataDirection.Add(direction); + matDataGlow.Add(dataGlow); + matDataColor.Add(new Vector4(dataColor.r, dataColor.g, dataColor.b, dataColor.a)); + } + else { + cbHighlight.SetGlobalVector(ShaderParams.GlowDirection, direction); + cbHighlight.SetGlobalColor(ShaderParams.GlowColor, dataColor); + cbHighlight.SetGlobalVector(ShaderParams.Glow, dataGlow); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatGlow[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatGlow[l], l); + } + } + } + } + else { + Vector4 dataGlow = new Vector4(fade * glowReal * glowPasses[glowPass].alpha, glowPasses[glowPass].offset * glowWidth / 100f, glowMagicNumber1, glowMagicNumber2); + Color dataColor = glowPasses[glowPass].color; + if (allowGPUInstancing) { + matDataDirection.Add(Vector4.zero); + matDataGlow.Add(dataGlow); + matDataColor.Add(new Vector4(dataColor.r, dataColor.g, dataColor.b, dataColor.a)); + } + else { + int matIndex = glowPass * 8; + cbHighlight.SetGlobalColor(ShaderParams.GlowColor, dataColor); + cbHighlight.SetGlobalVector(ShaderParams.Glow, dataGlow); + cbHighlight.SetGlobalVector(ShaderParams.GlowDirection, Vector4.zero); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatGlow[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatGlow[l], l); + } + } + } + } + if (allowGPUInstancing) { + 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]; + } + if (rms[k].isCombined) { + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + } + else { + Matrix4x4 objectToWorld = rms[k].transform.localToWorldMatrix; + for (int m = 0; m < instanceCount; m++) { + matrices[m] = objectToWorld; + } + } + cbHighlight.DrawMeshInstanced(mesh, l, rms[k].fxMatGlow[l], 0, matrices, instanceCount, glowPropertyBlock); + } + } + } + + // Outline + if (outline > 0 && outlineQuality != QualityLevel.Highest) { + Color outlineColor = this.outlineColor; + if (outlineColorStyle == ColorStyle.Gradient) { + outlineColor.a *= outline * fade; + Bounds bounds = outlineGradientInLocalSpace ? mesh.bounds : rms[k].renderer.bounds; + cbHighlight.SetGlobalVector(ShaderParams.OutlineVertexData, new Vector4(bounds.min.y, bounds.size.y + 0.0001f, 0, 0)); + } + else { + outlineColor.a = outline * fade; + cbHighlight.SetGlobalVector(ShaderParams.OutlineVertexData, new Vector4(-1e6f, 1f, 0, 0)); + } + cbHighlight.SetGlobalColor(ShaderParams.OutlineColor, outlineColor); + if (outlineQuality.UsesMultipleOffsets()) { + matDataDirection.Clear(); + for (int o = outlineOffsetsMin; o <= outlineOffsetsMax; o++) { + Vector4 direction = offsets[o] * (outlineWidth / 100f); + direction.y *= aspect; + if (allowGPUInstancing) { + matDataDirection.Add(direction); + } + else { + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, direction); + if (rms[k].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatOutline[l], l, 0); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 0); + } + } + } + if (allowGPUInstancing) { + int instanceCount = matDataDirection.Count; + if (instanceCount > 0) { + outlinePropertyBlock.Clear(); + outlinePropertyBlock.SetVectorArray(ShaderParams.OutlineDirection, matDataDirection); + if (matrices == null || matrices.Length < instanceCount) { + matrices = new Matrix4x4[instanceCount]; + } + if (rms[k].isCombined) { + for (int m = 0; m < instanceCount; m++) { + matrices[m] = rms[k].renderingMatrix; + } + } + else { + Matrix4x4 objectToWorld = rms[k].transform.localToWorldMatrix; + for (int m = 0; m < instanceCount; m++) { + matrices[m] = objectToWorld; + } + } + cbHighlight.DrawMeshInstanced(mesh, l, rms[k].fxMatOutline[l], 0, matrices, instanceCount, outlinePropertyBlock); + } + } + } + else { + cbHighlight.SetGlobalColor(ShaderParams.OutlineColor, outlineColor); + cbHighlight.SetGlobalVector(ShaderParams.OutlineDirection, Vector4.zero); + if (rms[k].isSkinnedMesh) { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatOutline[l], l, 0); + } + else { + // keep this because normals may be reoriented / smoothed + cbHighlight.DrawMesh(mesh, rms[k].transform.localToWorldMatrix, rms[k].fxMatOutline[l], l, 0); + } + } + } + + } + + // 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 || targetFXUseEnclosingBounds))) { + targetEffectRendered = true; + float scaleT = 1f; + float time; + float normalizedTime = 0; + 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 + alignToGroundTried = true; + alignToGroundHitGood = Physics.Raycast(center, Vector3.down, out RaycastHit groundHitInfo, targetFXGroundMaxDistance, targetFXGroundLayerMask); + if (alignToGroundHitGood) { + 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 * fadeOut; + fxMatTarget.color = color; + cbHighlight.DrawMesh(cubeMesh, m, fxMatTarget, 0, 0); + } + } + else { + alignToGroundTried = false; + 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 * fadeOut; + fxMatTarget.color = color; + cbHighlight.DrawMesh(quadMesh, m, fxMatTarget, 0, 1); + } + } + } + + + // 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); + cbHighlight.DrawMesh(iconFXMesh, m, mat); + } + } + + } + + + if (useSmoothBlend && _highlighted && somePartVisible) { + + // Prepare smooth outer glow / outline target + sourceDesc.colorFormat = useSmoothOutline && outlineEdgeMode == OutlineEdgeMode.Any ? RenderTextureFormat.ARGB32 : RenderTextureFormat.R8; + sourceDesc.msaaSamples = 1; + sourceDesc.useMipMap = false; + sourceDesc.depthBufferBits = 0; + + int smoothRTWidth = sourceDesc.width; + int smoothRTHeight = sourceDesc.height; + + cbHighlight.GetTemporaryRT(sourceRT, sourceDesc, FilterMode.Bilinear); + RenderTargetIdentifier sourceTarget = new RenderTargetIdentifier(sourceRT, 0, CubemapFace.Unknown, -1); + cbHighlight.SetRenderTarget(sourceTarget); + cbHighlight.ClearRenderTarget(false, true, new Color(0, 0, 0, 0)); + + for (int k = 0; k < rmsCount; k++) { + if (!rms[k].render) + continue; + + // Render object body for glow/outline highest quality + Mesh mesh = rms[k].mesh; + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (l < rms[k].fxMatSolidColor.Length) { + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatSolidColor[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatSolidColor[l], l); + } + } + } + } + + if (ComputeSmoothQuadMatrix(cam, enclosingBounds)) { + // 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) { + float intensity = outline * fade; + fxMatComposeOutline.color = new Color(outlineColor.r, outlineColor.g, outlineColor.b, outlineColor.a * intensity * 10f); + SmoothOutline(smoothRTWidth / outlineDownsampling, smoothRTHeight / outlineDownsampling); + } + + // Bit result + ComposeSmoothBlend(smoothGlowVisibility, smoothOutlineVisibility); + } + } + + // See-Through + if (seeThroughReal) { + if (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; + 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].isCombined) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSeeThroughInner[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughInner[l], l); + } + } + } + } + + if (usesSeeThroughBorder) { + 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) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatSeeThroughBorder[l], l); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatSeeThroughBorder[l], l); + } + } + } + } + + if (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) { + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, fxMatClearStencil, l, 1); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, fxMatClearStencil, l, 1); + } + } + } + } + } + + + } + + void RenderMask (int k, Mesh mesh, bool renderMaskOnTop) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + if (renderMaskOnTop) { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.Always); + } + else { + rms[k].fxMatMask[l].SetInt(ShaderParams.ZTest, (int)CompareFunction.LessEqual); + } + if (rms[k].isCombined) { + cbHighlight.DrawMesh(rms[k].mesh, rms[k].renderingMatrix, rms[k].fxMatMask[l], l, 0); + } + else { + cbHighlight.DrawRenderer(rms[k].renderer, rms[k].fxMatMask[l], l, 0); + } + } + } + + void RenderSeeThroughClearStencil (int k, Mesh mesh) { + if (rms[k].isCombined) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, fxMatClearStencil, l, 1); + } + } + else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawRenderer(rms[k].renderer, fxMatClearStencil, l, 1); + } + } + } + + void RenderSeeThroughMask (int k, Mesh mesh) { + if (rms[k].isCombined) { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawMesh(mesh, rms[k].renderingMatrix, rms[k].fxMatMask[l], l, 1); + } + } + else { + for (int l = 0; l < mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + cbHighlight.DrawRenderer(rms[k].renderer, 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; + cbHighlight.GetTemporaryRT(mipGlowBuffers[k], glowDesc, FilterMode.Bilinear); + } + + for (int k = 0; k < bufferCount - 1; k += 2) { + if (k == 0) { + RenderingUtils.FullScreenBlit(cbHighlight, sourceRT, mipGlowBuffers[k + 1], fxMatBlurGlow, 0); + } + else { + RenderingUtils.FullScreenBlit(cbHighlight, mipGlowBuffers[k], mipGlowBuffers[k + 1], fxMatBlurGlow, 0); + } + RenderingUtils.FullScreenBlit(cbHighlight, mipGlowBuffers[k + 1], mipGlowBuffers[k], fxMatBlurGlow, 1); + + if (k < bufferCount - 2) { + RenderingUtils.FullScreenBlit(cbHighlight, mipGlowBuffers[k], mipGlowBuffers[k + 2], fxMatBlurGlow, 2); + } + } + } + else { + const int blurPasses = 4; + + int bufferCount = blurPasses; + if (mipGlowBuffers == null || mipGlowBuffers.Length != bufferCount) { + mipGlowBuffers = new int[bufferCount]; + for (int k = 0; k < bufferCount - 1; k++) { + mipGlowBuffers[k] = Shader.PropertyToID("_HPSmoothGlowTemp" + k); + } + mipGlowBuffers[bufferCount - 1] = 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; + cbHighlight.GetTemporaryRT(mipGlowBuffers[k], glowDesc, FilterMode.Bilinear); + } + RenderingUtils.FullScreenBlit(cbHighlight, sourceRT, mipGlowBuffers[0], matBlur, 3); + for (int k = 0; k < bufferCount - 1; k++) { + cbHighlight.SetGlobalFloat(ShaderParams.ResampleScale, k + 0.5f); + RenderingUtils.FullScreenBlit(cbHighlight, 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; + cbHighlight.GetTemporaryRT(mipOutlineBuffers[k], outlineDesc, FilterMode.Bilinear); + } + + for (int k = 0; k < bufferCount - 1; k += 2) { + if (k == 0) { + RenderingUtils.FullScreenBlit(cbHighlight, sourceRT, mipOutlineBuffers[k + 1], fxMatBlurOutline, 3); + } + else { + RenderingUtils.FullScreenBlit(cbHighlight, mipOutlineBuffers[k], mipOutlineBuffers[k + 1], fxMatBlurOutline, 0); + } + RenderingUtils.FullScreenBlit(cbHighlight, mipOutlineBuffers[k + 1], mipOutlineBuffers[k], fxMatBlurOutline, 1); + + if (k < bufferCount - 2) { + RenderingUtils.FullScreenBlit(cbHighlight, mipOutlineBuffers[k], mipOutlineBuffers[k + 2], fxMatBlurOutline, 2); + } + } + } + + + void ComposeSmoothBlend (Visibility smoothGlowVisibility, Visibility smoothOutlineVisibility) { + + // Render mask on target surface + var useDepthRenderBuffer = colorAttachmentBuffer != BuiltinRenderTextureType.CameraTarget && depthAttachmentBuffer == BuiltinRenderTextureType.CameraTarget; + cbHighlight.SetRenderTarget(colorAttachmentBuffer, useDepthRenderBuffer ? colorAttachmentBuffer : depthAttachmentBuffer); + // cbHighlight.SetRenderTarget(colorAttachmentBuffer, depthAttachmentBuffer); + + bool renderSmoothGlow = glow > 0 && glowWidth > 0 && glowQuality == QualityLevel.Highest; + if (renderSmoothGlow) { + fxMatComposeGlow.SetVector(ShaderParams.Flip, (VRCheck.isVrRunning && flipY) ? new Vector4(1, -1) : new Vector4(0, 1)); + fxMatComposeGlow.SetInt(ShaderParams.ZTest, GetZTestValue(smoothGlowVisibility)); + cbHighlight.DrawMesh(quadMesh, quadGlowMatrix, fxMatComposeGlow, 0, 0); + } + bool renderSmoothOutline = outline > 0 && outlineWidth > 0 && outlineQuality == QualityLevel.Highest; + if (renderSmoothOutline) { + fxMatComposeOutline.SetVector(ShaderParams.Flip, (VRCheck.isVrRunning && flipY) ? new Vector4(1, -1) : new Vector4(0, 1)); + fxMatComposeOutline.SetInt(ShaderParams.ZTest, GetZTestValue(smoothOutlineVisibility)); + cbHighlight.DrawMesh(quadMesh, quadOutlineMatrix, fxMatComposeOutline, 0, 0); + } + // Release render textures + if (renderSmoothGlow) { + for (int k = 0; k < mipGlowBuffers.Length; k++) { + cbHighlight.ReleaseTemporaryRT(mipGlowBuffers[k]); + } + } + if (renderSmoothOutline) { + for (int k = 0; k < mipOutlineBuffers.Length; k++) { + cbHighlight.ReleaseTemporaryRT(mipOutlineBuffers[k]); + } + } + + cbHighlight.ReleaseTemporaryRT(sourceRT); + } + + void InitMaterial (ref Material material, string shaderName) { + if (material != null) return; + Shader shaderFX = Shader.Find(shaderName); + if (shaderFX == null) { + Debug.LogError("Shader " + shaderName + " not found."); + return; + } + material = new Material(shaderFX); + } + + void Fork (Material mat, ref Material[] mats, Mesh mesh) { + if (mesh == null) + return; + int count = mesh.subMeshCount; + Fork(mat, ref mats, count); + } + + void Fork (Material material, ref Material[] array, int count) { + if (array == null || array.Length < count) { + DestroyMaterialArray(array); + array = new Material[count]; + } + for (int k = 0; k < count; k++) { + if (array[k] == null) { + array[k] = Instantiate(material); + } + } + } + + /// + /// Sets target for highlight effects + /// + public void SetTarget (Transform transform) { + if (transform == null) return; + InitIfNeeded(); + if (transform != target) { + if (_highlighted) { + ImmediateFadeOut(); + } + target = transform; + SetupMaterial(); + } + else { + UpdateVisibilityState(); + } + } + + + + /// + /// 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]; + } + InitCommandBuffer(); + + 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; + sortingOffset = renderer.gameObject.GetInstanceID() % 0.0001f; + + 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 ? NormalsOption.PreserveOriginal : normalsOption; + 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) { + ReorientNormals(rmsCount); + } + else { + AverageNormals(rmsCount); + } + } + } + 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(); + } + } + + UpdateMaterialProperties(); + } + + 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(tempRR); + for (var i = 0; i < tempRR.Count; i++) { + Renderer r = tempRR[i]; + if (!ValidRenderer(r)) { + tempRR.RemoveAt(i); + i--; + } + } + return tempRR.ToArray(); + } + + void InitTemplateMaterials () { + 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/SeeThrough"); + 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 fxMatBlurGlow, "HighlightPlus/Geometry/BlurGlow"); + InitMaterial(ref fxMatBlurOutline, "HighlightPlus/Geometry/BlurOutline"); + InitMaterial(ref fxMatClearStencil, "HighlightPlus/ClearStencil"); + } + + void InitCommandBuffer () { + if (cbHighlight == null) { + cbHighlight = new CommandBuffer(); + cbHighlight.name = "Highlight Plus for " + name; + } + cbHighlightEmpty = true; + } + + + void ConfigureOutput () { + if (!cbHighlightEmpty) return; + cbHighlightEmpty = false; + +#if UNITY_2022_1_OR_NEWER + // depth priming might have changed depth render target so we ensure it's set to normal + colorAttachmentBuffer = new RenderTargetIdentifier(colorAttachmentBuffer, 0, CubemapFace.Unknown, -1); + depthAttachmentBuffer = new RenderTargetIdentifier(depthAttachmentBuffer, 0, CubemapFace.Unknown, -1); +#if UNITY_2023_1_OR_NEWER // used as workaround for render graph - a bug sets depth load buffer action to don't care instead of load. This redundant setRenderTarget call fixes it + cbHighlight.SetRenderTarget(colorAttachmentBuffer, RenderBufferLoadAction.Load, RenderBufferStoreAction.Store, depthAttachmentBuffer, RenderBufferLoadAction.Load, RenderBufferStoreAction.Store); +#endif + cbHighlight.SetRenderTarget(colorAttachmentBuffer, depthAttachmentBuffer); +#elif UNITY_2021_2_OR_NEWER + var useDepthRenderBuffer = colorAttachmentBuffer != BuiltinRenderTextureType.CameraTarget && depthAttachmentBuffer == BuiltinRenderTextureType.CameraTarget; + cbHighlight.SetRenderTarget(colorAttachmentBuffer, useDepthRenderBuffer ? colorAttachmentBuffer : depthAttachmentBuffer); +#endif + } + + public void UpdateVisibilityState () { + // isVisible only accounts for cases where there's a single object managed by the highlight effect + // and that object can receive OnBecameVisible/OnBecameInvisible. Otherwise we can't use this optimization + if (rms == null || rms.Length != 1 || rms[0].transform != transform || rms[0].renderer == null) { + isVisible = true; + } + else if (rms[0].renderer != null) { + isVisible = rms[0].renderer.isVisible; + } + } + + public void UpdateMaterialProperties () { + + if (rms == null) + return; + + if (ignore) { + _highlighted = false; + } + + UpdateVisibilityState(); + + extraCoveragePixels = Mathf.Max(0, extraCoveragePixels); + maskRequired = (_highlighted && ((outline > 0 && outlineMaskMode != MaskMode.IgnoreMask) || (glow > 0 && glowMaskMode != MaskMode.IgnoreMask))) || seeThrough != SeeThroughMode.Never || (targetFX && targetFXAlignToGround); + usesSeeThrough = seeThroughIntensity > 0 && (seeThrough == SeeThroughMode.AlwaysWhenOccluded || (seeThrough == SeeThroughMode.WhenHighlighted && _highlighted)); + // Resort materials if needed + if (usesSeeThrough && seeThroughChildrenSortingMode != SeeThroughSortingMode.Default && rms.Length > 0) { + if (seeThroughChildrenSortingMode == SeeThroughSortingMode.SortByMaterialsRenderQueue) { + Array.Sort(rms, MaterialsRenderQueueComparer); + } + else { + Array.Sort(rms, MaterialsRenderQueueInvertedComparer); + } + } + + 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 (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; + } + if (outlineSharpness < 1f) { + outlineSharpness = 1f; + } + + shouldBakeSkinnedMesh = optimizeSkinnedMesh && ((outline > 0 && outlineQuality != QualityLevel.Highest) || (glow > 0 && glowQuality != QualityLevel.Highest)); + useSmoothGlow = glow > 0 && glowWidth > 0 && glowQuality == QualityLevel.Highest; + useSmoothOutline = outline > 0 && outlineWidth > 0 && outlineQuality == QualityLevel.Highest; + useSmoothBlend = useSmoothGlow || useSmoothOutline; + if (useSmoothBlend) { + if (useSmoothGlow && useSmoothOutline) { + outlineVisibility = glowVisibility; + } + outlineEdgeThreshold = Mathf.Clamp01(outlineEdgeThreshold); + } + if (useSmoothGlow) { + fxMatComposeGlow.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + 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); + } + fxMatComposeGlow.SetColor(ShaderParams.Debug, glowBlitDebug ? debugColor : blackColor); + fxMatComposeGlow.SetInt(ShaderParams.GlowStencilComp, glowMaskMode != MaskMode.Stencil ? (int)CompareFunction.Always : (int)CompareFunction.NotEqual); + if (glowMaskMode == MaskMode.StencilAndCutout) { + fxMatComposeGlow.EnableKeyword(ShaderParams.SKW_MASK_CUTOUT); + } + else { + fxMatComposeGlow.DisableKeyword(ShaderParams.SKW_MASK_CUTOUT); + } + fxMatBlurGlow.SetFloat(ShaderParams.BlurScale, glowWidth / glowDownsampling); + fxMatBlurGlow.SetFloat(ShaderParams.Speed, glowAnimationSpeed); + } + + if (useSmoothOutline) { + 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.DisableKeyword(ShaderParams.SKW_ALL_EDGES); + } + else { + fxMatComposeOutline.EnableKeyword(ShaderParams.SKW_ALL_EDGES); + outlineDownsampling = 1; + } + if (outlineEdgeMode != OutlineEdgeMode.Exterior || outlineMaskMode == MaskMode.IgnoreMask) { + fxMatComposeOutline.SetInt(ShaderParams.OutlineStencilComp, (int)CompareFunction.Always); + } + else { + fxMatComposeOutline.SetInt(ShaderParams.OutlineStencilComp, (int)CompareFunction.NotEqual); + } + if (outlineMaskMode == MaskMode.StencilAndCutout) { + fxMatComposeOutline.EnableKeyword(ShaderParams.SKW_MASK_CUTOUT); + } + else { + fxMatComposeOutline.DisableKeyword(ShaderParams.SKW_MASK_CUTOUT); + } + 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(); + } + } + + // Setup materials + + // 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 + float scaledOutlineWidth = outlineQuality.UsesMultipleOffsets() ? 0f : outlineWidth / 100f; + + for (int k = 0; k < rmsCount; k++) { + if (rms[k].mesh != null) { + + Renderer renderer = rms[k].renderer; + if (renderer == null) + continue; + + renderer.GetSharedMaterials(rendererSharedMaterials); + + // Per submesh + for (int l = 0; l < rms[k].mesh.subMeshCount; l++) { + if (((1 << l) & subMeshMask) == 0) continue; + + Material mat = null; + 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.BaseMap)) { + matTexture = mat.GetTexture(ShaderParams.BaseMap); // we don't use mainTexture because ShaderGraph doesn't inform that generic property correctly + hasTexture = true; + if (mat.HasProperty(ShaderParams.BaseMapST)) { + // mat.mainTextureOffset will raise an error in builds - we need to manually get the scale/offset from the material by its property name + Vector4 baseMapST = mat.GetVector(ShaderParams.BaseMapST); + matTextureScale.x = baseMapST.x; + matTextureScale.y = baseMapST.y; + matTextureOffset.x = baseMapST.z; + matTextureOffset.y = baseMapST.w; + } + } + else if (mat.HasProperty(ShaderParams.MainTex)) { + matTexture = mat.GetTexture(ShaderParams.MainTex); + if (matTexture == null) { + matTexture = mat.mainTexture; + } + 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); + } + fxMat.SetInt(ShaderParams.Cull, cullBackFaces ? (int)CullMode.Back : (int)CullMode.Off); + fxMat.SetFloat(ShaderParams.Padding, padding); + } + } + + // Outline + if (rms[k].fxMatOutline != null && rms[k].fxMatOutline.Length > l) { + Material fxMat = rms[k].fxMatOutline[l]; + if (fxMat != null) { + fxMat.SetFloat(ShaderParams.OutlineWidth, scaledOutlineWidth); + 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.SetInt(ShaderParams.OutlineStencilComp, outlineMaskMode == MaskMode.IgnoreMask ? (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); + } + fxMat.DisableKeyword(ShaderParams.SKW_OUTLINE_GRADIENT_LS); + fxMat.DisableKeyword(ShaderParams.SKW_OUTLINE_GRADIENT_WS); + if (outlineColorStyle == ColorStyle.Gradient) { + fxMat.SetTexture(ShaderParams.OutlineGradientTex, outlineGradientTex); + fxMat.EnableKeyword(outlineGradientInLocalSpace ? ShaderParams.SKW_OUTLINE_GRADIENT_LS : ShaderParams.SKW_OUTLINE_GRADIENT_WS); + } + } + } + + // Glow + if (rms[k].fxMatGlow != null && rms[k].fxMatGlow.Length > l) { + Material fxMat = rms[k].fxMatGlow[l]; + if (fxMat != null) { + fxMat.SetVector(ShaderParams.Glow2, new Vector4(outline > 0 ? outlineWidth / 100f : 0, 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, glowMaskMode == MaskMode.IgnoreMask ? (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 + 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 (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 (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.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.Keep); + } + //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 (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) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + 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) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + 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.SetFloat(ShaderParams.Padding, padding); + fxMat.SetFloat(ShaderParams.OutlineEdgeThreshold, outlineEdgeThreshold); + //if (hasTexture) { + fxMat.mainTexture = matTexture; + fxMat.mainTextureOffset = matTextureOffset; + fxMat.mainTextureScale = matTextureScale; + //} + // if (!Application.isMobilePlatform) { // TODO: currently this does not work with URP on Android + + if ((glow > 0 && glowQuality == QualityLevel.Highest && glowVisibility == Visibility.Normal) || (outline > 0 && outlineQuality == QualityLevel.Highest && outlineVisibility == Visibility.Normal)) { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP_INV); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP); + } + else if ((glow > 0 && glowQuality == QualityLevel.Highest && glowVisibility == Visibility.OnlyWhenOccluded) || (outline > 0 && outlineQuality == QualityLevel.Highest && outlineVisibility == Visibility.OnlyWhenOccluded)) { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP); + fxMat.EnableKeyword(ShaderParams.SKW_DEPTHCLIP_INV); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP); + fxMat.DisableKeyword(ShaderParams.SKW_DEPTHCLIP_INV); + } + //} + if (useAlphaTest) { + fxMat.SetFloat(ShaderParams.CutOff, alphaCutOff); + fxMat.EnableKeyword(ShaderParams.SKW_ALPHACLIP); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALPHACLIP); + } + if (outlineEdgeMode == OutlineEdgeMode.Any) { + fxMat.EnableKeyword(ShaderParams.SKW_ALL_EDGES); + } + else { + fxMat.DisableKeyword(ShaderParams.SKW_ALL_EDGES); + } + } + } + } + } + } + } + + 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; + } + + + public string ValidateCombineMeshes () { + if (rms == null) return "No objects to combine."; + foreach (var rm in rms) { + if (!rm.isSkinnedMesh && rm.mesh != null && !rm.mesh.isReadable) return $"The mesh of object {rm.renderer.name} is not readable and can't be combined (check mesh's import settings)."; + } + return null; + } + + + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs.meta new file mode 100644 index 00000000..5bc1ff6f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 888380afc233049ce9e618f9f36c8ba8 +timeCreated: 1545593776 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 900 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs new file mode 100644 index 00000000..62fe3a56 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs.meta new file mode 100644 index 00000000..12aa7a74 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectActions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e749f80d0d29a49d49d6e0f4752065cd +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectBlocker.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectBlocker.cs new file mode 100644 index 00000000..26385e00 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectBlocker.cs @@ -0,0 +1,34 @@ +using UnityEngine; +using UnityEngine.Rendering; + +namespace HighlightPlus { + + [DefaultExecutionOrder(100)] + [ExecuteInEditMode] + public class HighlightEffectBlocker : MonoBehaviour { + + Renderer thisRenderer; + public bool blockOutlineAndGlow; + public bool blockOverlay; + + void OnEnable () { + thisRenderer = GetComponentInChildren(); + HighlightPlusRenderPassFeature.RegisterBlocker(this); + } + + void OnDisable () { + HighlightPlusRenderPassFeature.UnregisterBlocker(this); + } + + public void BuildCommandBuffer(CommandBuffer cmd, Material mat) { + if (thisRenderer == null) return; + Material[] sharedMats = thisRenderer.sharedMaterials; + if (sharedMats == null) return; + int submeshCount = sharedMats.Length; + for (int i = 0; i < submeshCount; i++) { + cmd.DrawRenderer(thisRenderer, mat, i); + } + } + + } +} diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectBlocker.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectBlocker.cs.meta new file mode 100644 index 00000000..3c1d95f0 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectBlocker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e1449eaee17884bf3ad10a841cab981b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs new file mode 100644 index 00000000..a5b0c5df --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs @@ -0,0 +1,278 @@ +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 Material fxMatSeeThroughOccluder, fxMatDepthWrite; + static RaycastHit[] hits; + + /// + /// True if the see-through is cancelled by an occluder using raycast method + /// + public bool IsSeeThroughOccluded(Camera cam) { + + if (rms == null) return false; + + // 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(CommandBuffer cb, 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 (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; + } + + 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++) { + cb.DrawRenderer(renderer, occluder.mode == OccluderMode.BlocksSeeThrough ? fxMatSeeThroughOccluder : fxMatDepthWrite, s); + } + } + } + } + } + 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 (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); + if (Physics.BoxCast(pos, bounds.extents * seeThroughOccluderThreshold, (camPos - pos).normalized, out RaycastHit hitInfo, Quaternion.identity, maxDistance, seeThroughOccluderMask)) { + occlusionData.cachedOccluderCollider = hitInfo.collider; + 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); + occlusionData.lastOcclusionTestResult = Physics.BoxCast(pos, bounds.extents * seeThroughOccluderThreshold, (camPos - pos).normalized, out RaycastHit hitInfo, Quaternion.identity, maxDistance, seeThroughOccluderMask); + occlusionData.cachedOccluderCollider = hitInfo.collider; + return occlusionData.lastOcclusionTestResult; + } + } + + + 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) { + for (int k = 0; k < occluderRenderersCount; k++) { + Renderer r = occlusionData.cachedOccluders[k]; + if (r != null) { + cbuf.DrawRenderer(r, fxMatSeeThroughMask); + } + } + } + } + + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs.meta new file mode 100644 index 00000000..bd8680df --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightEffectOccluderManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d0bc1f04199a64e66ae9630062b3a6ad +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs new file mode 100644 index 00000000..17eaf84a --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs @@ -0,0 +1,476 @@ +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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs.meta new file mode 100644 index 00000000..02ba108f --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: af4d46fd89b9543e5be2358ac0c9ced0 +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightPlusRenderPassFeature.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightPlusRenderPassFeature.cs new file mode 100644 index 00000000..34b4fe15 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightPlusRenderPassFeature.cs @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; +#if UNITY_2023_3_OR_NEWER +using UnityEngine.Rendering.RenderGraphModule; +#endif + +namespace HighlightPlus { + + public class HighlightPlusRenderPassFeature : ScriptableRendererFeature { + + class HighlightPass : ScriptableRenderPass { + + class PassData { + public Camera camera; +#if UNITY_2022_1_OR_NEWER + public RTHandle colorTarget, depthTarget; +#else + public RenderTargetIdentifier colorTarget, depthTarget; +#endif +#if UNITY_2023_3_OR_NEWER + public TextureHandle colorTexture, depthTexture; +#endif + public bool clearStencil; + public CommandBuffer cmd; + } + + readonly PassData passData = new PassData(); + + // far objects render first + class DistanceComparer : IComparer { + + public Vector3 camPos; + + public int Compare (HighlightEffect e1, HighlightEffect e2) { + if (e1.sortingPriority < e2.sortingPriority) return -1; + if (e1.sortingPriority > e2.sortingPriority) return 1; + Vector3 e1Pos = e1.transform.position; + float dx1 = e1Pos.x - camPos.x; + float dy1 = e1Pos.y - camPos.y; + float dz1 = e1Pos.z - camPos.z; + float distE1 = dx1 * dx1 + dy1 * dy1 + dz1 * dz1 + e1.sortingOffset; + Vector3 e2Pos = e2.transform.position; + float dx2 = e2Pos.x - camPos.x; + float dy2 = e2Pos.y - camPos.y; + float dz2 = e2Pos.z - camPos.z; + float distE2 = dx2 * dx2 + dy2 * dy2 + dz2 * dz2 + e2.sortingOffset; + if (distE1 > distE2) return -1; + if (distE1 < distE2) return 1; + return 0; + } + } + + public bool usesCameraOverlay; + + ScriptableRenderer renderer; + RenderTextureDescriptor cameraTextureDescriptor; + static DistanceComparer effectDistanceComparer = new DistanceComparer(); + bool clearStencil; + static RenderTextureDescriptor sourceDesc; + static Material blockerOutlineAndGlowMat, blockerOverlayMat, blockerAllMat; + + public void Setup (HighlightPlusRenderPassFeature passFeature, ScriptableRenderer renderer) { + this.renderPassEvent = passFeature.renderPassEvent; + this.clearStencil = passFeature.clearStencil; + this.renderer = renderer; + ConfigureInput(ScriptableRenderPassInput.Depth); + } + +#if UNITY_2023_3_OR_NEWER + [Obsolete] +#endif + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + this.cameraTextureDescriptor = cameraTextureDescriptor; + } + +#if UNITY_2023_3_OR_NEWER + [Obsolete] +#endif + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + +#if UNITY_2022_1_OR_NEWER + RTHandle cameraColorTarget = renderer.cameraColorTargetHandle; + RTHandle cameraDepthTarget = renderer.cameraDepthTargetHandle; +#else + RenderTargetIdentifier cameraColorTarget = renderer.cameraColorTarget; + RenderTargetIdentifier cameraDepthTarget = renderer.cameraDepthTarget; +#endif +#if !UNITY_2021_2_OR_NEWER + // In Unity 2021.2, when MSAA > 1, cameraDepthTarget is no longer cameraColorTarget + if (!usesCameraOverlay && (cameraTextureDescriptor.msaaSamples > 1 || cam.cameraType == CameraType.SceneView)) { + cameraDepthTarget = cameraColorTarget; + } +#endif + + passData.clearStencil = clearStencil; + passData.camera = renderingData.cameraData.camera; + passData.colorTarget = cameraColorTarget; + passData.depthTarget = cameraDepthTarget; + sourceDesc = renderingData.cameraData.cameraTargetDescriptor; + + CommandBuffer cmd = CommandBufferPool.Get("Highlight Plus"); + cmd.Clear(); + + passData.cmd = cmd; + ExecutePass(passData); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + + } + + static void ExecutePass (PassData passData) { + + int count = HighlightEffect.effects.Count; + + HighlightEffect.effects.RemoveAll(t => t == null); + count = HighlightEffect.effects.Count; + if (count == 0) return; + + Camera cam = passData.camera; + int camLayer = 1 << cam.gameObject.layer; + CameraType camType = cam.cameraType; + + if (!HighlightEffect.customSorting && ((camType == CameraType.Game && (sortFrameCount++) % 10 == 0) || !Application.isPlaying)) { + effectDistanceComparer.camPos = cam.transform.position; + HighlightEffect.effects.Sort(effectDistanceComparer); + } + + bool outlineOccludersPending = outlineAndGlowOccluders.Count > 0; + + for (int k = 0; k < count; k++) { + HighlightEffect effect = HighlightEffect.effects[k]; + + if (!(effect.ignoreObjectVisibility || effect.isVisible)) continue; + + if (!effect.isActiveAndEnabled) continue; + + if (camType == CameraType.Reflection && !effect.reflectionProbes) continue; + + if ((effect.camerasLayerMask & camLayer) == 0) continue; + + if (outlineOccludersPending) { + outlineOccludersPending = false; + foreach (HighlightEffectBlocker blocker in outlineAndGlowOccluders) { + if (blocker != null && blocker.isActiveAndEnabled) { + int stencilOp = 0; + if (blocker.blockOutlineAndGlow) stencilOp += 2; + if (blocker.blockOverlay) stencilOp += 4; + if (stencilOp == 2) { + if (blockerOutlineAndGlowMat == null) { + blockerOutlineAndGlowMat = Resources.Load("HighlightPlus/HighlightBlockerOutlineAndGlow"); + } + blocker.BuildCommandBuffer(passData.cmd, blockerOutlineAndGlowMat); + } + else if (stencilOp == 4) { + if (blockerOverlayMat == null) { + blockerOverlayMat = Resources.Load("HighlightPlus/HighlightBlockerOverlay"); + } + blocker.BuildCommandBuffer(passData.cmd, blockerOverlayMat); + } + else if (stencilOp == 6) { + if (blockerAllMat == null) { + blockerAllMat = Resources.Load("HighlightPlus/HighlightUIMask"); + } + blocker.BuildCommandBuffer(passData.cmd, blockerAllMat); + } + } + } + } + + effect.SetCommandBuffer(passData.cmd); + effect.BuildCommandBuffer(passData.camera, passData.colorTarget, passData.depthTarget, passData.clearStencil, ref sourceDesc); + passData.clearStencil = false; + } + } + +#if UNITY_2023_3_OR_NEWER + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Highlight Plus Pass RG", out var passData)) { + + builder.AllowPassCulling(false); + + passData.clearStencil = clearStencil; + UniversalCameraData cameraData = frameData.Get(); + passData.camera = cameraData.camera; + + UniversalResourceData resourceData = frameData.Get(); + passData.colorTexture = resourceData.activeColorTexture; + passData.depthTexture = resourceData.activeDepthTexture; + + builder.UseTexture(resourceData.activeColorTexture, AccessFlags.ReadWrite); + builder.UseTexture(resourceData.activeDepthTexture, AccessFlags.Read); + builder.UseTexture(resourceData.cameraDepthTexture, AccessFlags.Read); + + sourceDesc = cameraData.cameraTargetDescriptor; + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + passData.cmd = cmd; + passData.colorTarget = passData.colorTexture; + passData.depthTarget = passData.depthTexture; + ExecutePass(passData); + }); + } + } +#endif + + } + + HighlightPass renderPass; + public RenderPassEvent renderPassEvent = RenderPassEvent.AfterRenderingTransparents; + [Tooltip("Clears stencil buffer before rendering highlight effects. This option can solve compatibility issues with shaders that also use stencil buffers.")] + public bool clearStencil; + + /// + /// Makes the effects visible in Edit mode. + /// + [Tooltip("If enabled, effects will be visible also in Edit mode (when not in Play mode).")] + public bool previewInEditMode = true; + + /// + /// Makes the effects visible in Edit mode. + /// + [Tooltip("If enabled, effects will be visible also in Preview camera (preview camera shown when a camera is selected in Editor).")] + public bool showInPreviewCamera = true; + + public static bool installed; + public static bool showingInEditMode; + + public static List outlineAndGlowOccluders = new List(); + public static int sortFrameCount; + + const string PREVIEW_CAMERA_NAME = "Preview Camera"; + + void OnDisable () { + installed = false; + } + + public override void Create () { + renderPass = new HighlightPass(); + VRCheck.Init(); + } + + // This method is called when setting up the renderer once per-camera. + public override void AddRenderPasses (ScriptableRenderer renderer, ref RenderingData renderingData) { + + showingInEditMode = previewInEditMode; + Camera cam = renderingData.cameraData.camera; + +#if UNITY_EDITOR + if (!previewInEditMode && !Application.isPlaying) { + return; + } + if (cam.cameraType == CameraType.Preview) { + return; + } + if (!showInPreviewCamera && PREVIEW_CAMERA_NAME.Equals(cam.name)) { + return; + } +#endif + +#if UNITY_2019_4_OR_NEWER + if (renderingData.cameraData.renderType == CameraRenderType.Base) { + renderPass.usesCameraOverlay = cam.GetUniversalAdditionalCameraData().cameraStack.Count > 0; + } +#endif + renderPass.Setup(this, renderer); + renderer.EnqueuePass(renderPass); + installed = true; + } + + public static void RegisterBlocker (HighlightEffectBlocker occluder) { + if (!outlineAndGlowOccluders.Contains(occluder)) { + outlineAndGlowOccluders.Add(occluder); + } + } + + public static void UnregisterBlocker (HighlightEffectBlocker occluder) { + outlineAndGlowOccluders.Remove(occluder); + } + } +} diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightPlusRenderPassFeature.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightPlusRenderPassFeature.cs.meta new file mode 100644 index 00000000..3af9ec87 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightPlusRenderPassFeature.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 473a86c9e274347dfbdde619584cebe9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs new file mode 100644 index 00000000..aabb5ea3 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs @@ -0,0 +1,504 @@ +using UnityEngine; + +namespace HighlightPlus { + + [CreateAssetMenu(menuName = "Highlight Plus Profile", fileName = "Highlight Plus Profile", order = 100)] + [HelpURL("https://www.dropbox.com/s/1p9h8xys68lm4a3/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; + + [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 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; + [Tooltip("Select the mask mode used with this effect.")] + public MaskMode outlineMaskMode = MaskMode.Stencil; + + [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; + [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("Select the mask mode used with this effect.")] + public MaskMode glowMaskMode = MaskMode.Stencil; + + [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; + [Tooltip("0 = stay forever")] + 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("This option clears the stencil buffer after rendering the see-through effect which results in correct rendering order and supports other stencil-based effects that render afterwards.")] + 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; + + [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.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.outlineSharpness = outlineSharpness; + effect.outlineDownsampling = outlineDownsampling; + effect.outlineVisibility = outlineVisibility; + effect.outlineIndependent = outlineIndependent; + effect.outlineContourStyle = outlineContourStyle; + effect.outlineMaskMode = outlineMaskMode; + effect.glow = glow; + effect.glowWidth = glowWidth; + effect.glowQuality = glowQuality; + effect.glowBlurMethod = glowBlurMethod; + 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.glowMaskMode = glowMaskMode; + 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; + 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; + outlineContourStyle = effect.outlineContourStyle; + outlineMaskMode = effect.outlineMaskMode; + glow = effect.glow; + glowWidth = effect.glowWidth; + glowQuality = effect.glowQuality; + glowBlurMethod = effect.glowBlurMethod; + 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); + glowMaskMode = effect.glowMaskMode; + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs.meta new file mode 100644 index 00000000..f269c7ce --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightProfile.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8e9253636bf2648bd813257f451f8486 +timeCreated: 1549831900 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs new file mode 100644 index 00000000..807d13cf --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs.meta new file mode 100644 index 00000000..6d02b162 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightSeeThroughOccluder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8dd965ceab19c4729a9dabd8aeb2972a +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs new file mode 100644 index 00000000..019c6d96 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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 (gameObject.activeInHierarchy) { + 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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs.meta new file mode 100644 index 00000000..630204a8 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/HighlightTrigger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5009cbb7e54994bb586cde7a70f34e6b +timeCreated: 1542876337 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs new file mode 100644 index 00000000..b1fdcf7e --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs.meta new file mode 100644 index 00000000..954705eb --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/InputProxy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22dd181849f53482686b5c26304410c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/Misc.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/Misc.cs new file mode 100644 index 00000000..6f2465e7 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/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/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/Misc.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/Misc.cs.meta new file mode 100644 index 00000000..71f90ccb --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/Misc.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a87ac1812c2d44355a6c2acddcdd42ea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/RenderingUtils.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/RenderingUtils.cs new file mode 100644 index 00000000..c1f56b3b --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/RenderingUtils.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +namespace HighlightPlus { + + public static class RenderingUtils { + + static Mesh _fullScreenMesh; + static Mesh fullscreenMesh { + get { + if (_fullScreenMesh != null) { + return _fullScreenMesh; + } + float num = 1f; + float num2 = 0f; + Mesh val = new Mesh(); + _fullScreenMesh = val; + _fullScreenMesh.SetVertices(new List { + new Vector3 (-1f, -1f, 0f), + new Vector3 (-1f, 1f, 0f), + new Vector3 (1f, -1f, 0f), + new Vector3 (1f, 1f, 0f) + }); + _fullScreenMesh.SetUVs(0, new List { + new Vector2 (0f, num2), + new Vector2 (0f, num), + new Vector2 (1f, num2), + new Vector2 (1f, num) + }); + _fullScreenMesh.SetIndices(new int[6] { 0, 1, 2, 2, 1, 3 }, (MeshTopology)0, 0, false); + _fullScreenMesh.UploadMeshData(true); + return _fullScreenMesh; + } + } + + static Matrix4x4 matrix4x4Identity = Matrix4x4.identity; + public static void FullScreenBlit(CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material, int passIndex) { + destination = new RenderTargetIdentifier(destination, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(destination); + cmd.SetGlobalTexture(ShaderParams.MainTex, source); + cmd.DrawMesh(fullscreenMesh, matrix4x4Identity, material, 0, passIndex); + } + } + + +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/RenderingUtils.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/RenderingUtils.cs.meta new file mode 100644 index 00000000..f0a47f14 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/RenderingUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 95fcf366e400b4f79938bee11ff1ddc0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs new file mode 100644 index 00000000..f31de1a2 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs @@ -0,0 +1,105 @@ +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 BaseMap = Shader.PropertyToID("_BaseMap"); + public static int BaseMapST = Shader.PropertyToID("_BaseMap_ST"); + 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 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 OutlineStencilComp = 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 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 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_DEPTHCLIP_INV = "HP_DEPTHCLIP_INV"; + 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_MASK_CUTOUT = "HP_MASK_CUTOUT"; + public const string SKW_DITHER_BLUENOISE = "HP_DITHER_BLUENOISE"; + } +} + diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs.meta new file mode 100644 index 00000000..39d981de --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/ShaderParams.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0c43adc34509547febe8181a2de00da5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/VRCheck.cs b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/VRCheck.cs new file mode 100644 index 00000000..30d16afd --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/VRCheck.cs @@ -0,0 +1,62 @@ +// 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; + +#if !ENABLE_XR + static bool IsActive() { + return false; + } + + static bool IsVrRunning() { + return false; + } + +#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; + } + +#endif + + public static void Init() { + isActive = IsActive(); + isVrRunning = IsVrRunning(); + } + + } +} \ No newline at end of file diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/VRCheck.cs.meta b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/VRCheck.cs.meta new file mode 100644 index 00000000..6bdc7e52 --- /dev/null +++ b/FactoryNumeric/Assets/Plugins/HighlightPlus/Runtime/Scripts/VRCheck.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c5a7be65460ba4182b08a8f602571e25 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/_README.txt b/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/_README.txt deleted file mode 100644 index ae973791..00000000 --- a/FactoryNumeric/Assets/Plugins/HighlightPlusBundle/_README.txt +++ /dev/null @@ -1,24 +0,0 @@ - -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/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Exterior.mat b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Exterior.mat index f03c26c3..6225d7b2 100644 --- a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Exterior.mat +++ b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Exterior.mat @@ -23,7 +23,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -124,6 +125,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &7263079360766289332 MonoBehaviour: m_ObjectHideFlags: 11 @@ -136,4 +138,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Wheel.mat b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Wheel.mat index 81d9b392..24212977 100644 --- a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Wheel.mat +++ b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Wheel.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -36,7 +36,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -137,3 +138,4 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Window.mat b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Window.mat index 9bc11c59..5524b411 100644 --- a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Window.mat +++ b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/Window.mat @@ -25,6 +25,7 @@ Material: disabledShaderPasses: - DepthOnly - SHADOWCASTER + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -125,6 +126,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &3728866138871552857 MonoBehaviour: m_ObjectHideFlags: 11 @@ -137,4 +139,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/interior.mat b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/interior.mat index f16ac94b..86f116de 100644 --- a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/interior.mat +++ b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Cartoon Van by Fero Andezo/Materials_URP/interior.mat @@ -23,7 +23,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -124,6 +125,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &6538925729129028096 MonoBehaviour: m_ObjectHideFlags: 11 @@ -136,4 +138,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Sand by Joao Paulo/Stylized_Sand_001_basecolor_URP.mat b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Sand by Joao Paulo/Stylized_Sand_001_basecolor_URP.mat index ca62cadf..eed5bb25 100644 --- a/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Sand by Joao Paulo/Stylized_Sand_001_basecolor_URP.mat +++ b/FactoryNumeric/Assets/Plugins/PrimeTween/Demo/Stylized Sand by Joao Paulo/Stylized_Sand_001_basecolor_URP.mat @@ -23,7 +23,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -124,6 +125,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &8482762829682952528 MonoBehaviour: m_ObjectHideFlags: 11 @@ -136,4 +138,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 7 + version: 9 diff --git a/FactoryNumeric/ProjectSettings/GraphicsSettings.asset b/FactoryNumeric/ProjectSettings/GraphicsSettings.asset index a6f533e4..4b408d59 100644 --- a/FactoryNumeric/ProjectSettings/GraphicsSettings.asset +++ b/FactoryNumeric/ProjectSettings/GraphicsSettings.asset @@ -37,7 +37,7 @@ GraphicsSettings: m_PreloadedShaders: [] m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_CustomRenderPipeline: {fileID: 0} + m_CustomRenderPipeline: {fileID: 11400000, guid: c5bb0103cf329784e9bdc18d06597a7c, type: 2} m_TransparencySortMode: 0 m_TransparencySortAxis: {x: 0, y: 0, z: 1} m_DefaultRenderingPath: 1 @@ -60,7 +60,7 @@ GraphicsSettings: m_RenderPipelineGlobalSettingsMap: UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 7e4fa6679394f60408e2e62fc71fc0d4, type: 2} m_LightsUseLinearIntensity: 0 - m_LightsUseColorTemperature: 0 + m_LightsUseColorTemperature: 1 m_LogWhenShaderIsCompiled: 0 m_LightProbeOutsideHullStrategy: 0 m_CameraRelativeLightCulling: 0 diff --git a/FactoryNumeric/ProjectSettings/ProjectSettings.asset b/FactoryNumeric/ProjectSettings/ProjectSettings.asset index 2238e274..a94ad9c8 100644 --- a/FactoryNumeric/ProjectSettings/ProjectSettings.asset +++ b/FactoryNumeric/ProjectSettings/ProjectSettings.asset @@ -12,8 +12,8 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: DefaultCompany - productName: Unity + companyName: July + productName: FactoryNumeric defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} @@ -140,7 +140,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 1.0 + bundleVersion: 0.0.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 diff --git a/FactoryNumeric/ProjectSettings/QualitySettings.asset b/FactoryNumeric/ProjectSettings/QualitySettings.asset index bcd67065..fc2a651b 100644 --- a/FactoryNumeric/ProjectSettings/QualitySettings.asset +++ b/FactoryNumeric/ProjectSettings/QualitySettings.asset @@ -6,7 +6,7 @@ QualitySettings: serializedVersion: 5 m_CurrentQuality: 5 m_QualitySettings: - - serializedVersion: 2 + - serializedVersion: 4 name: Very Low pixelLightCount: 0 shadows: 0 @@ -19,16 +19,23 @@ QualitySettings: shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 skinWeights: 1 - textureQuality: 1 + globalTextureMipmapLimit: 1 + textureMipmapLimitSettings: [] anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 1 + adaptiveVsync: 0 vSyncCount: 0 + realtimeGICPUUsage: 25 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 lodBias: 0.3 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -41,8 +48,17 @@ QualitySettings: asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 4 name: Low pixelLightCount: 0 shadows: 0 @@ -55,16 +71,23 @@ QualitySettings: shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 skinWeights: 2 - textureQuality: 0 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 1 + adaptiveVsync: 0 vSyncCount: 0 + realtimeGICPUUsage: 25 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 lodBias: 0.4 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -77,8 +100,17 @@ QualitySettings: asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 4 name: Medium pixelLightCount: 1 shadows: 1 @@ -91,16 +123,23 @@ QualitySettings: shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 skinWeights: 2 - textureQuality: 0 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 + useLegacyDetailDistribution: 1 + adaptiveVsync: 0 vSyncCount: 1 + realtimeGICPUUsage: 25 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 lodBias: 0.7 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -113,8 +152,17 @@ QualitySettings: asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 4 name: High pixelLightCount: 2 shadows: 2 @@ -127,16 +175,23 @@ QualitySettings: shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 skinWeights: 2 - textureQuality: 0 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 + adaptiveVsync: 0 vSyncCount: 1 + realtimeGICPUUsage: 50 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 lodBias: 1 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -149,8 +204,17 @@ QualitySettings: asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 4 name: Very High pixelLightCount: 3 shadows: 2 @@ -163,16 +227,23 @@ QualitySettings: shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 skinWeights: 4 - textureQuality: 0 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 2 antiAliasing: 2 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 + adaptiveVsync: 0 vSyncCount: 1 + realtimeGICPUUsage: 50 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 lodBias: 1.5 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -185,8 +256,17 @@ QualitySettings: asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] - - serializedVersion: 2 + - serializedVersion: 4 name: Ultra pixelLightCount: 4 shadows: 2 @@ -199,16 +279,23 @@ QualitySettings: shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 skinWeights: 255 - textureQuality: 0 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] anisotropicTextures: 2 - antiAliasing: 2 + antiAliasing: 0 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 + adaptiveVsync: 0 vSyncCount: 1 + realtimeGICPUUsage: 100 + adaptiveVsyncExtraA: 0 + adaptiveVsyncExtraB: 0 lodBias: 2 maximumLODLevel: 0 + enableLODCrossFade: 1 streamingMipmapsActive: 0 streamingMipmapsAddAllCameras: 1 streamingMipmapsMemoryBudget: 512 @@ -221,12 +308,22 @@ QualitySettings: asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 customRenderPipeline: {fileID: 0} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 excludedTargetPlatforms: [] + m_TextureMipmapLimitGroupNames: [] m_PerPlatformDefaultQuality: Android: 2 - Lumin: 5 GameCoreScarlett: 5 GameCoreXboxOne: 5 + Lumin: 5 Nintendo Switch: 5 PS4: 5 PS5: 5 diff --git a/FactoryNumeric/ProjectSettings/URPProjectSettings.asset b/FactoryNumeric/ProjectSettings/URPProjectSettings.asset new file mode 100644 index 00000000..08faf033 --- /dev/null +++ b/FactoryNumeric/ProjectSettings/URPProjectSettings.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + 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: 247994e1f5a72c2419c26a37e9334c01, type: 3} + m_Name: + m_EditorClassIdentifier: + m_LastMaterialVersion: 9 diff --git a/FactoryNumeric/UserSettings/EditorUserSettings.asset b/FactoryNumeric/UserSettings/EditorUserSettings.asset index f92f0c62..54e66ecb 100644 --- a/FactoryNumeric/UserSettings/EditorUserSettings.asset +++ b/FactoryNumeric/UserSettings/EditorUserSettings.asset @@ -5,6 +5,9 @@ EditorUserSettings: m_ObjectHideFlags: 0 serializedVersion: 4 m_ConfigSettings: + GraphicsSettingsInspector_UserSettings: + value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b07a68ffab74f9ee2a3a30300cea1a11320d0beb1a0c25f7060f494b4cdf1b18f3045e38cb5ad8 + flags: 0 RecentlyUsedSceneGuid-0: value: 550402515407580d0b0c582744715b44104f412f287e23352e284e65b2b6643c flags: 0