Made outline shader debuggable in editor

This commit is contained in:
journaliciouz
2025-12-11 21:19:31 +01:00
parent e7141b79c5
commit ca84414998
13 changed files with 7485 additions and 83 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 67e69300250a78149b299fcbef76600f
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
useAsTemplate: 0
exposeTemplateAsShader: 0
template:
name:
category:
description:
icon: {instanceID: 0}
thumbnail: {instanceID: 0}

View File

@@ -0,0 +1,63 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2558047921083943664
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: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SimpleOutlineMaterial
m_Shader: {fileID: -6465566751694194690, guid: ec68bffbfd711284ba7968cf1b8ae340, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ae6ce5ebb60e1504ea6c9983c822e0cf, 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:
- _Thickness: 0.01
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.506, g: 0.78, b: 0.866, a: 1}
- _Colour: {r: 0.9341286, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ec68bffbfd711284ba7968cf1b8ae340
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
useAsTemplate: 0
exposeTemplateAsShader: 0
template:
name:
category:
description:
icon: {instanceID: 0}
thumbnail: {instanceID: 0}

View File

@@ -0,0 +1,62 @@
%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: SpriteOutlineMaterial
m_Shader: {fileID: -6465566751694194690, guid: 67e69300250a78149b299fcbef76600f, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
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:
- _Thickness: 0.002
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _Colour: {r: 0.9341286, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5663714819455386904
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: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -429934,6 +429934,54 @@ PolygonCollider2D:
- {x: 91.60302, y: -63.161953} - {x: 91.60302, y: -63.161953}
- {x: 87.38972, y: 66.09816} - {x: 87.38972, y: 66.09816}
m_UseDelaunayMesh: 0 m_UseDelaunayMesh: 0
--- !u!21 &219865165
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SimpleOutlineMaterial (Instance)
m_Shader: {fileID: -6465566751694194690, guid: ec68bffbfd711284ba7968cf1b8ae340, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ae6ce5ebb60e1504ea6c9983c822e0cf, 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:
- _Thickness: 0.01
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.87843144, b: 0.57254905, a: 1}
- _Colour: {r: 0.9341286, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1 &226914277 --- !u!1 &226914277
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -433681,10 +433729,9 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 338747596} - component: {fileID: 338747596}
- component: {fileID: 338747598}
- component: {fileID: 338747597} - component: {fileID: 338747597}
m_Layer: 0 m_Layer: 0
m_Name: GlowOutline m_Name: RightGlow
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -433699,11 +433746,11 @@ Transform:
m_GameObject: {fileID: 338747595} m_GameObject: {fileID: 338747595}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0.2, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1046094549} m_Father: {fileID: 435810738}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &338747597 --- !u!212 &338747597
SpriteRenderer: SpriteRenderer:
@@ -433731,7 +433778,7 @@ SpriteRenderer:
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - {fileID: 662690844}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@@ -433752,38 +433799,18 @@ SpriteRenderer:
m_GlobalIlluminationMeshLod: 0 m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_Sprite: {fileID: 0} m_Sprite: {fileID: -1317397836, guid: 88ebd40823d503a44af6d726c6b5aab5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0 m_FlipX: 0
m_FlipY: 0 m_FlipY: 0
m_DrawMode: 0 m_DrawMode: 0
m_Size: {x: 1, y: 1} m_Size: {x: 4.6, y: 7.06}
m_AdaptiveModeThreshold: 0.5 m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0 m_SpriteTileMode: 0
m_WasSpriteAssigned: 0 m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!114 &338747598
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 338747595}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0f935b14e8862e249bdc2bde13bc19fd, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
scaleFactor: 0
outlineModes:
- interaction: 0
outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 0}
- interaction: 1
outlineColour: {r: 0.5058824, g: 0.7803922, b: 0.8862746, a: 0}
- interaction: 2
outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 0}
--- !u!1 &341893678 --- !u!1 &341893678
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -435181,6 +435208,56 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f0f1834ce0c7b0b42b633a6d2bd67698, type: 3} m_Script: {fileID: 11500000, guid: f0f1834ce0c7b0b42b633a6d2bd67698, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: '::' m_EditorClassIdentifier: '::'
--- !u!1 &435810737
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 435810738}
- component: {fileID: 435810739}
m_Layer: 0
m_Name: GlowOutline
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &435810738
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 435810737}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 338747596}
- {fileID: 2104641540}
- {fileID: 1102230873}
- {fileID: 1905274250}
m_Father: {fileID: 768267914}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &435810739
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 435810737}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0f935b14e8862e249bdc2bde13bc19fd, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::GlowOutline
thiccness: 0.2
interactionType: 0
--- !u!1 &437446538 --- !u!1 &437446538
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -440031,6 +440108,54 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7775613298932159589, guid: fc42c3bdda1c86d49b0bf80c28e5d372, type: 3} m_CorrespondingSourceObject: {fileID: 7775613298932159589, guid: fc42c3bdda1c86d49b0bf80c28e5d372, type: 3}
m_PrefabInstance: {fileID: 2558461749605481847} m_PrefabInstance: {fileID: 2558461749605481847}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!21 &662690844
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SimpleOutlineMaterial (Instance)
m_Shader: {fileID: -6465566751694194690, guid: ec68bffbfd711284ba7968cf1b8ae340, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ae6ce5ebb60e1504ea6c9983c822e0cf, 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:
- _Thickness: 0.01
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.87843144, b: 0.57254905, a: 1}
- _Colour: {r: 0.9341286, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1001 &666234666 --- !u!1001 &666234666
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -442454,7 +442579,8 @@ Transform:
m_LocalPosition: {x: -0.16, y: -3.06, z: 0} m_LocalPosition: {x: -0.16, y: -3.06, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children:
- {fileID: 435810738}
m_Father: {fileID: 1046094549} m_Father: {fileID: 1046094549}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &768267916 --- !u!212 &768267916
@@ -442504,11 +442630,11 @@ SpriteRenderer:
m_GlobalIlluminationMeshLod: 0 m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 2
m_MaskInteraction: 0 m_MaskInteraction: 0
m_Sprite: {fileID: -1317397836, guid: 88ebd40823d503a44af6d726c6b5aab5, type: 3} m_Sprite: {fileID: -1317397836, guid: 88ebd40823d503a44af6d726c6b5aab5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 1 m_FlipX: 0
m_FlipY: 0 m_FlipY: 0
m_DrawMode: 0 m_DrawMode: 0
m_Size: {x: 4.6, y: 7.06} m_Size: {x: 4.6, y: 7.06}
@@ -447539,6 +447665,54 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2064225848720495177, guid: 0bbded61e58193848ac59c8eea761bcc, type: 3} m_CorrespondingSourceObject: {fileID: 2064225848720495177, guid: 0bbded61e58193848ac59c8eea761bcc, type: 3}
m_PrefabInstance: {fileID: 1030861134} m_PrefabInstance: {fileID: 1030861134}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!21 &1036925045
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SimpleOutlineMaterial (Instance)
m_Shader: {fileID: -6465566751694194690, guid: ec68bffbfd711284ba7968cf1b8ae340, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ae6ce5ebb60e1504ea6c9983c822e0cf, 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:
- _Thickness: 0.01
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.87843144, b: 0.57254905, a: 1}
- _Colour: {r: 0.9341286, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1001 &1042636114 --- !u!1001 &1042636114
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -447848,7 +448022,6 @@ Transform:
- {fileID: 2089128782} - {fileID: 2089128782}
- {fileID: 768267914} - {fileID: 768267914}
- {fileID: 1351976589} - {fileID: 1351976589}
- {fileID: 338747596}
m_Father: {fileID: 1471606854} m_Father: {fileID: 1471606854}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1046094550 --- !u!114 &1046094550
@@ -449802,6 +449975,97 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4ad080e6ca3114e4e96ccc33655d3dff, type: 3} m_Script: {fileID: 11500000, guid: 4ad080e6ca3114e4e96ccc33655d3dff, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &1102230872
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1102230873}
- component: {fileID: 1102230874}
m_Layer: 0
m_Name: UpGlow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1102230873
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1102230872}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.2, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 435810738}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1102230874
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1102230872}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 219865165}
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: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_MaskInteraction: 0
m_Sprite: {fileID: -1317397836, guid: 88ebd40823d503a44af6d726c6b5aab5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 4.6, y: 7.06}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!1 &1106104746 --- !u!1 &1106104746
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -455831,6 +456095,54 @@ PolygonCollider2D:
- {x: -0.4799449, y: -0.743106} - {x: -0.4799449, y: -0.743106}
- {x: 2.2780142, y: 0.22192313} - {x: 2.2780142, y: 0.22192313}
m_UseDelaunayMesh: 0 m_UseDelaunayMesh: 0
--- !u!21 &1397240386
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SimpleOutlineMaterial (Instance)
m_Shader: {fileID: -6465566751694194690, guid: ec68bffbfd711284ba7968cf1b8ae340, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ae6ce5ebb60e1504ea6c9983c822e0cf, 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:
- _Thickness: 0.01
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.87843144, b: 0.57254905, a: 1}
- _Colour: {r: 0.9341286, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1 &1398916127 stripped --- !u!1 &1398916127 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 3134003919645739551, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3} m_CorrespondingSourceObject: {fileID: 3134003919645739551, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
@@ -465712,6 +466024,97 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 95e46aacea5b42888ee7881894193c11, type: 3} m_Script: {fileID: 11500000, guid: 95e46aacea5b42888ee7881894193c11, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Core.SaveLoad.AppleState m_EditorClassIdentifier: AppleHillsScripts::Core.SaveLoad.AppleState
--- !u!1 &1905274249
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1905274250}
- component: {fileID: 1905274251}
m_Layer: 0
m_Name: DownGlow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1905274250
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1905274249}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.2, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 435810738}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1905274251
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1905274249}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 1036925045}
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: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_MaskInteraction: 0
m_Sprite: {fileID: -1317397836, guid: 88ebd40823d503a44af6d726c6b5aab5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 4.6, y: 7.06}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!1001 &1915459501 --- !u!1001 &1915459501
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -470286,6 +470689,97 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f645a67c7970b124cacb6450fefdebad, type: 3} m_SourcePrefab: {fileID: 100100000, guid: f645a67c7970b124cacb6450fefdebad, type: 3}
--- !u!1 &2104641539
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2104641540}
- component: {fileID: 2104641541}
m_Layer: 0
m_Name: LeftGlow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2104641540
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2104641539}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.2, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 435810738}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2104641541
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2104641539}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 1397240386}
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: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_MaskInteraction: 0
m_Sprite: {fileID: -1317397836, guid: 88ebd40823d503a44af6d726c6b5aab5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 4.6, y: 7.06}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!1001 &2109163090 --- !u!1001 &2109163090
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -1,20 +1,26 @@
using System; using AppleHills;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using Core.Lifecycle;
public class GlowOutline : MonoBehaviour public class GlowOutline : ManagedBehaviour
{ {
private SpriteRenderer parentSprite; private SpriteRenderer parentSprite;
private SpriteRenderer outlineSprite; private SpriteRenderer outlineSprite;
private Color outlineColor;
private Transform[] childrenTransforms;
private SpriteRenderer[] childrenSprites;
private Material[] childrenMaterials;
private List<GlowOutlineData> outlineColors;
public float thiccness;
public GlowOutlineData.InteractionType interactionType;
public float scaleFactor;
public GlowOutlineData[] outlineModes;
private void OnEnable() internal override void OnManagedStart()
{ {
SetupOutline(); SetupOutline();
} }
@@ -22,12 +28,61 @@ public class GlowOutline : MonoBehaviour
private void SetupOutline() private void SetupOutline()
{ {
parentSprite = GetComponentInParent<SpriteRenderer>(); // Get references to item sprite, own sprite and the outline settings from Interaction Settings
outlineColors = SettingsAccess.GetInteractionOutlineColors();
outlineSprite = GetComponent<SpriteRenderer>(); outlineSprite = GetComponent<SpriteRenderer>();
outlineSprite.sprite = parentSprite.sprite; // Get the transforms and spriterenderers of children
gameObject.transform.localScale = gameObject.transform.localScale * scaleFactor; childrenTransforms = GetComponentsInChildren<Transform>();
//outlineSprite.color = outlineColour; childrenSprites = GetComponentsInChildren<SpriteRenderer>();
// childrenMaterials = GetComponentsInChildren<Material>();
// Set the color overlay of the sprites to colour our outline with the colors set in Interaction Settings
foreach (GlowOutlineData data in outlineColors)
{
if (data.interaction == interactionType)
{
outlineColor = data.outlineColour;
Debug.Log(outlineColor);
}
}
// Find the spriterenderer in parent gameobject, but ignore our own spriterenderer
foreach (SpriteRenderer sprite in GetComponentsInParent<SpriteRenderer>())
{
if (sprite != this.GetComponent<SpriteRenderer>())
{
parentSprite = sprite;
}
}
// Set the scale and sprite of each child. Skip first child because that's the outline object.
childrenTransforms[1].localPosition = new Vector3(1, 0, 0) * thiccness;
childrenTransforms[2].localPosition = new Vector3(-1, 0, 0) * thiccness;
childrenTransforms[3].localPosition = new Vector3(0, 1, 0) * thiccness;
childrenTransforms[4].localPosition = new Vector3(0, -1, 0) * thiccness;
foreach (SpriteRenderer childSprite in childrenSprites)
{
childSprite.sprite = parentSprite.sprite;
childSprite.material.color = outlineColor;
}
} }
#if UNITY_EDITOR
// Update outline in editor
private void OnValidate()
{
SetupOutline();
}
#endif
} }

View File

@@ -17,11 +17,11 @@ MonoBehaviour:
followerPickupDelay: 0.2 followerPickupDelay: 0.2
interactionOutlineColors: interactionOutlineColors:
- interaction: 0 - interaction: 0
outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 0} outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 1}
- interaction: 1 - interaction: 1
outlineColour: {r: 0.5058824, g: 0.7803922, b: 0.8862746, a: 0} outlineColour: {r: 0.5058824, g: 0.7803922, b: 0.8862746, a: 1}
- interaction: 2 - interaction: 2
outlineColour: {r: 0.62352943, g: 0.62352943, b: 0.8078432, a: 0} outlineColour: {r: 0.62352943, g: 0.62352943, b: 0.8078432, a: 1}
interactableLayerMask: interactableLayerMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 1024 m_Bits: 1024

View File

@@ -13,3 +13,4 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_LastMaterialVersion: 10 m_LastMaterialVersion: 10
m_ProjectSettingFolderPath: URPDefaultResources