Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
Bomb MSQ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
saad
Bomb MSQ
Commits
1b1592b9
Commit
1b1592b9
authored
Feb 04, 2026
by
saad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some pliers
parent
eb0c27bb
Changes
43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
1944 additions
and
690 deletions
+1944
-690
DialogueManager.cs
Assets/AL-Arcade/DialogueSystem/Scripts/DialogueManager.cs
+0
-1
bomb.fbx.meta
Assets/Art/bomb.fbx.meta
+1
-1
Bomb.prefab
Assets/Prefabs/Bomb.prefab
+5
-0
Wire 1.prefab
Assets/Prefabs/Wire 1.prefab
+50
-7
QuickOutline.meta
Assets/QuickOutline.meta
+8
-0
Readme.txt
Assets/QuickOutline/Readme.txt
+37
-0
Readme.txt.meta
Assets/QuickOutline/Readme.txt.meta
+9
-0
Resources.meta
Assets/QuickOutline/Resources.meta
+10
-0
Materials.meta
Assets/QuickOutline/Resources/Materials.meta
+10
-0
OutlineFill.mat
Assets/QuickOutline/Resources/Materials/OutlineFill.mat
+25
-0
OutlineFill.mat.meta
Assets/QuickOutline/Resources/Materials/OutlineFill.mat.meta
+10
-0
OutlineMask.mat
Assets/QuickOutline/Resources/Materials/OutlineMask.mat
+23
-0
OutlineMask.mat.meta
Assets/QuickOutline/Resources/Materials/OutlineMask.mat.meta
+10
-0
Shaders.meta
Assets/QuickOutline/Resources/Shaders.meta
+10
-0
OutlineFill.shader
Assets/QuickOutline/Resources/Shaders/OutlineFill.shader
+81
-0
OutlineFill.shader.meta
...ts/QuickOutline/Resources/Shaders/OutlineFill.shader.meta
+10
-0
OutlineMask.shader
Assets/QuickOutline/Resources/Shaders/OutlineMask.shader
+33
-0
OutlineMask.shader.meta
...ts/QuickOutline/Resources/Shaders/OutlineMask.shader.meta
+10
-0
Samples.meta
Assets/QuickOutline/Samples.meta
+10
-0
Materials.meta
Assets/QuickOutline/Samples/Materials.meta
+10
-0
Plane.mat
Assets/QuickOutline/Samples/Materials/Plane.mat
+76
-0
Plane.mat.meta
Assets/QuickOutline/Samples/Materials/Plane.mat.meta
+10
-0
Scenes.meta
Assets/QuickOutline/Samples/Scenes.meta
+10
-0
QuickOutline.unity
Assets/QuickOutline/Samples/Scenes/QuickOutline.unity
+778
-0
QuickOutline.unity.meta
Assets/QuickOutline/Samples/Scenes/QuickOutline.unity.meta
+9
-0
Scripts.meta
Assets/QuickOutline/Scripts.meta
+10
-0
OutlineRenderer.cs
Assets/QuickOutline/Scripts/OutlineRenderer.cs
+309
-0
OutlineRenderer.cs.meta
Assets/QuickOutline/Scripts/OutlineRenderer.cs.meta
+13
-0
Game.unity
Assets/Scenes/Game.unity
+224
-580
URP-Balanced.asset
Assets/Settings/URP-Balanced.asset
+24
-24
URP-HighFidelity.asset
Assets/Settings/URP-HighFidelity.asset
+24
-24
URP-Performant.asset
Assets/Settings/URP-Performant.asset
+27
-27
Question set 1.asset
Assets/_Scriptable Objects/Data/Question set 1.asset
+3
-0
Question.asset
Assets/_Scriptable Objects/Data/Question.asset
+2
-10
BombController.cs
Assets/_Scripts/BombController.cs
+13
-0
UIPanelTween.cs
Assets/_Scripts/Dotween/UIPanelTween.cs
+11
-0
GameManager.cs
Assets/_Scripts/GameManager.cs
+11
-2
Wire.cs
Assets/_Scripts/Wire.cs
+13
-8
manifest.json
Packages/manifest.json
+1
-0
packages-lock.json
Packages/packages-lock.json
+7
-0
CommonBurstAotSettings.json
ProjectSettings/CommonBurstAotSettings.json
+1
-1
EditorBuildSettings.asset
ProjectSettings/EditorBuildSettings.asset
+2
-2
ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+4
-3
No files found.
Assets/AL-Arcade/DialogueSystem/Scripts/DialogueManager.cs
View file @
1b1592b9
...
@@ -5,7 +5,6 @@ using System.Collections.Generic;
...
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using
TMPro
;
using
TMPro
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.UI
;
using
UnityEngine.UI
;
using
static
UnityEngine
.
Windows
.
WebCam
.
VideoCapture
;
namespace
AL_Arcade.DialogueSystem.Scripts
namespace
AL_Arcade.DialogueSystem.Scripts
{
{
...
...
Assets/Art/bomb.fbx.meta
View file @
1b1592b9
...
@@ -32,7 +32,7 @@ ModelImporter:
...
@@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraExposedTransformPaths: []
extraUserProperties: []
extraUserProperties: []
clipAnimations: []
clipAnimations: []
isReadable:
0
isReadable:
1
meshes:
meshes:
lODScreenPercentages: []
lODScreenPercentages: []
globalScale: 1
globalScale: 1
...
...
Assets/Prefabs/Bomb.prefab
View file @
1b1592b9
...
@@ -3119,6 +3119,11 @@ PrefabInstance:
...
@@ -3119,6 +3119,11 @@ PrefabInstance:
propertyPath
:
m_ConstrainProportionsScale
propertyPath
:
m_ConstrainProportionsScale
value
:
0
value
:
0
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8759531601909846707
,
guid
:
bbdeff09fea42b34baef4d5aee1926e0
,
type
:
3
}
propertyPath
:
outlineWidth
value
:
3.04
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
9019275256872145588
,
guid
:
bbdeff09fea42b34baef4d5aee1926e0
,
-
target
:
{
fileID
:
9019275256872145588
,
guid
:
bbdeff09fea42b34baef4d5aee1926e0
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Name
propertyPath
:
m_Name
...
...
Assets/Prefabs/Wire 1.prefab
View file @
1b1592b9
...
@@ -12,6 +12,8 @@ GameObject:
...
@@ -12,6 +12,8 @@ GameObject:
-
component
:
{
fileID
:
3944800286380083876
}
-
component
:
{
fileID
:
3944800286380083876
}
-
component
:
{
fileID
:
8597538289810706562
}
-
component
:
{
fileID
:
8597538289810706562
}
-
component
:
{
fileID
:
8299607319623816837
}
-
component
:
{
fileID
:
8299607319623816837
}
-
component
:
{
fileID
:
8759531601909846707
}
-
component
:
{
fileID
:
5101824334617674510
}
m_Layer
:
0
m_Layer
:
0
m_Name
:
Wire 1
m_Name
:
Wire 1
m_TagString
:
Untagged
m_TagString
:
Untagged
...
@@ -108,8 +110,48 @@ MonoBehaviour:
...
@@ -108,8 +110,48 @@ MonoBehaviour:
_button
:
{
fileID
:
5459509267802171274
}
_button
:
{
fileID
:
5459509267802171274
}
_fadeCanvasAndLine
:
{
fileID
:
4924190921142732258
}
_fadeCanvasAndLine
:
{
fileID
:
4924190921142732258
}
_floatingObject
:
{
fileID
:
91300033064305310
}
_floatingObject
:
{
fileID
:
91300033064305310
}
_outlineRenderer
:
{
fileID
:
8759531601909846707
}
CorrectCutParticles
:
{
fileID
:
4286736223692924257
}
CorrectCutParticles
:
{
fileID
:
4286736223692924257
}
WrongcutParticles
:
{
fileID
:
7528912567480112244
}
WrongcutParticles
:
{
fileID
:
7528912567480112244
}
---
!u!114
&8759531601909846707
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
9019275256872145588
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
5fea29bb7c508c244a1f805a5fd3fc4d
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
outlineMode
:
0
outlineColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
1
}
outlineWidth
:
1.15
precomputeOutline
:
0
bakeKeys
:
[]
bakeValues
:
[]
---
!u!65
&5101824334617674510
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
9019275256872145588
}
m_Material
:
{
fileID
:
0
}
m_IncludeLayers
:
serializedVersion
:
2
m_Bits
:
0
m_ExcludeLayers
:
serializedVersion
:
2
m_Bits
:
0
m_LayerOverridePriority
:
0
m_IsTrigger
:
0
m_ProvidesContacts
:
0
m_Enabled
:
1
serializedVersion
:
3
m_Size
:
{
x
:
0.0046682265
,
y
:
0.0030387468
,
z
:
0.0014300388
}
m_Center
:
{
x
:
-0.0005777449
,
y
:
-0.00056703144
,
z
:
-0.000054602562
}
---
!u!1001
&5747940244456248903
---
!u!1001
&5747940244456248903
PrefabInstance
:
PrefabInstance
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -151,32 +193,32 @@ PrefabInstance:
...
@@ -151,32 +193,32 @@ PrefabInstance:
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Positions.Array.data[0].x
propertyPath
:
m_Positions.Array.data[0].x
value
:
-
28.942194
value
:
-
0.111194625
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Positions.Array.data[0].y
propertyPath
:
m_Positions.Array.data[0].y
value
:
1.1643001
value
:
0.013300069
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Positions.Array.data[0].z
propertyPath
:
m_Positions.Array.data[0].z
value
:
-28.07675
value
:
0.024602678
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Positions.Array.data[1].x
propertyPath
:
m_Positions.Array.data[1].x
value
:
-
29.01235
2
value
:
-
0.1813526
2
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Positions.Array.data[1].y
propertyPath
:
m_Positions.Array.data[1].y
value
:
1.2221012
value
:
0.07110119
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3117071613802403931
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
propertyPath
:
m_Positions.Array.data[1].z
propertyPath
:
m_Positions.Array.data[1].z
value
:
-28.051907
value
:
0.049446106
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
3784596669894271944
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
-
target
:
{
fileID
:
3784596669894271944
,
guid
:
39a0d4a1f4fe2a649af24d0e64bde45a
,
type
:
3
}
type
:
3
}
...
@@ -577,7 +619,8 @@ PrefabInstance:
...
@@ -577,7 +619,8 @@ PrefabInstance:
value
:
1
value
:
1
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_RemovedComponents
:
[]
m_RemovedGameObjects
:
[]
m_RemovedGameObjects
:
-
{
fileID
:
2097414752014147601
,
guid
:
9deec30e5bac4d645b6a75d1949b3315
,
type
:
3
}
m_AddedGameObjects
:
[]
m_AddedGameObjects
:
[]
m_AddedComponents
:
[]
m_AddedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
9deec30e5bac4d645b6a75d1949b3315
,
type
:
3
}
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
9deec30e5bac4d645b6a75d1949b3315
,
type
:
3
}
...
...
Assets/QuickOutline.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 8b4d5f28f72f3f1429d1e54e587c5d02
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Readme.txt
0 → 100644
View file @
1b1592b9
Quick Outline
=============
Developed by Chris Nolet (c) 2018
Instructions
------------
To add an outline to an object, drag-and-drop the Outline.cs
script onto the object. The outline materials will be loaded
at runtime.
You can also add outlines programmatically with:
var outline = gameObject.AddComponent<Outline>();
outline.OutlineMode = Outline.Mode.OutlineAll;
outline.OutlineColor = Color.yellow;
outline.OutlineWidth = 5f;
The outline script does a small amount of work in Awake().
For best results, use outline.enabled to toggle the outline.
Avoid removing and re-adding the component if possible.
For large meshes, you may also like to enable 'Precompute
Outline' in the editor. This will reduce the amount of work
performed in Awake().
Troubleshooting
---------------
If the outline appears off-center, please try the following:
1. Set 'Read/Write Enabled' on each model's import settings.
2. Disable 'Optimize Mesh Data' in the player settings.
Assets/QuickOutline/Readme.txt.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 5933bfd39d7a5b843a0ed821f85bca19
timeCreated: 1522619008
licenseType: Store
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 70fd40674751a8042a8b9b2e8d9f915f
folderAsset: yes
timeCreated: 1522559128
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources/Materials.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 80ac8e52d3c31a94babd161e86bc6b97
folderAsset: yes
timeCreated: 1522559139
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources/Materials/OutlineFill.mat
0 → 100644
View file @
1b1592b9
%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
:
OutlineFill
m_Shader
:
{
fileID
:
4800000
,
guid
:
4e76d4023d7e0411297c670f878973e2
,
type
:
3
}
m_ShaderKeywords
:
m_LightmapFlags
:
4
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
m_TexEnvs
:
[]
m_Floats
:
-
_OutlineWidth
:
2
-
_ZTest
:
8
m_Colors
:
-
_OutlineColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
Assets/QuickOutline/Resources/Materials/OutlineFill.mat.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 311313efa011949e98b6761d652ad13c
timeCreated: 1520576285
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources/Materials/OutlineMask.mat
0 → 100644
View file @
1b1592b9
%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
:
OutlineMask
m_Shader
:
{
fileID
:
4800000
,
guid
:
341b058cd7dee4f5cba5cc59a513619e
,
type
:
3
}
m_ShaderKeywords
:
m_LightmapFlags
:
4
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
m_TexEnvs
:
[]
m_Floats
:
-
_ZTest
:
8
m_Colors
:
[]
Assets/QuickOutline/Resources/Materials/OutlineMask.mat.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 106f3ff43a17d4967a2b64c7a92e49ec
timeCreated: 1520576276
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources/Shaders.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 6a63caa2b0e993043a42c11f35ff2d1a
folderAsset: yes
timeCreated: 1522559134
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources/Shaders/OutlineFill.shader
0 → 100644
View file @
1b1592b9
//
// OutlineFill.shader
// QuickOutline
//
// Created by Chris Nolet on 2/21/18.
// Copyright © 2018 Chris Nolet. All rights reserved.
//
Shader
"Custom/Outline Fill"
{
Properties
{
[
Enum
(
UnityEngine
.
Rendering
.
CompareFunction
)]
_ZTest
(
"ZTest"
,
Float
)
=
0
_OutlineColor
(
"Outline Color"
,
Color
)
=
(
1
,
1
,
1
,
1
)
_OutlineWidth
(
"Outline Width"
,
Range
(
0
,
10
))
=
2
}
SubShader
{
Tags
{
"Queue"
=
"Transparent+110"
"RenderType"
=
"Transparent"
"DisableBatching"
=
"True"
}
Pass
{
Name
"Fill"
Cull
Off
ZTest
[
_ZTest
]
ZWrite
Off
Blend
SrcAlpha
OneMinusSrcAlpha
ColorMask
RGB
Stencil
{
Ref
1
Comp
NotEqual
}
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert
#pragma fragment frag
struct
appdata
{
float4
vertex
:
POSITION
;
float3
normal
:
NORMAL
;
float3
smoothNormal
:
TEXCOORD3
;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct
v2f
{
float4
position
:
SV_POSITION
;
fixed4
color
:
COLOR
;
UNITY_VERTEX_OUTPUT_STEREO
};
uniform
fixed4
_OutlineColor
;
uniform
float
_OutlineWidth
;
v2f
vert
(
appdata
input
)
{
v2f
output
;
UNITY_SETUP_INSTANCE_ID
(
input
);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO
(
output
);
float3
normal
=
any
(
input
.
smoothNormal
)
?
input
.
smoothNormal
:
input
.
normal
;
float3
viewPosition
=
UnityObjectToViewPos
(
input
.
vertex
);
float3
viewNormal
=
normalize
(
mul
((
float3x3
)
UNITY_MATRIX_IT_MV
,
normal
));
output
.
position
=
UnityViewToClipPos
(
viewPosition
+
viewNormal
*
-
viewPosition
.
z
*
_OutlineWidth
/
1000
.
0
);
output
.
color
=
_OutlineColor
;
return
output
;
}
fixed4
frag
(
v2f
input
)
:
SV_Target
{
return
input
.
color
;
}
ENDCG
}
}
}
Assets/QuickOutline/Resources/Shaders/OutlineFill.shader.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 4e76d4023d7e0411297c670f878973e2
timeCreated: 1520575782
licenseType: Store
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Resources/Shaders/OutlineMask.shader
0 → 100644
View file @
1b1592b9
//
// OutlineMask.shader
// QuickOutline
//
// Created by Chris Nolet on 2/21/18.
// Copyright © 2018 Chris Nolet. All rights reserved.
//
Shader
"Custom/Outline Mask"
{
Properties
{
[
Enum
(
UnityEngine
.
Rendering
.
CompareFunction
)]
_ZTest
(
"ZTest"
,
Float
)
=
0
}
SubShader
{
Tags
{
"Queue"
=
"Transparent+100"
"RenderType"
=
"Transparent"
}
Pass
{
Name
"Mask"
Cull
Off
ZTest
[
_ZTest
]
ZWrite
Off
ColorMask
0
Stencil
{
Ref
1
Pass
Replace
}
}
}
}
Assets/QuickOutline/Resources/Shaders/OutlineMask.shader.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 341b058cd7dee4f5cba5cc59a513619e
timeCreated: 1520575773
licenseType: Store
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Samples.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 932f8193e5396db4babac4756c406dee
folderAsset: yes
timeCreated: 1522559213
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Samples/Materials.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 2b0040b0ed7fbd64693e9195d13d25f9
folderAsset: yes
timeCreated: 1522615600
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Samples/Materials/Plane.mat
0 → 100644
View file @
1b1592b9
%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
:
Plane
m_Shader
:
{
fileID
:
46
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
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
:
1
-
_Mode
:
0
-
_OcclusionStrength
:
1
-
_Parallax
:
0.02
-
_SmoothnessTextureChannel
:
0
-
_SpecularHighlights
:
1
-
_SrcBlend
:
1
-
_UVSec
:
0
-
_ZWrite
:
1
m_Colors
:
-
_Color
:
{
r
:
0.2509804
,
g
:
0.2509804
,
b
:
0.5019608
,
a
:
1
}
-
_EmissionColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
1
}
Assets/QuickOutline/Samples/Materials/Plane.mat.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: f58cf65ea995c4b45be95713bdea8134
timeCreated: 1522540975
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Samples/Scenes.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 3916faa55c6a94248959031ee0ad499f
folderAsset: yes
timeCreated: 1522615614
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Samples/Scenes/QuickOutline.unity
0 → 100644
View file @
1b1592b9
This diff is collapsed.
Click to expand it.
Assets/QuickOutline/Samples/Scenes/QuickOutline.unity.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: f23712c79adc910408e872b127e825cf
timeCreated: 1522615825
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Scripts.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 3ddbd65d69a9f0b48bab4fe96a1fe099
folderAsset: yes
timeCreated: 1522559122
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/QuickOutline/Scripts/OutlineRenderer.cs
0 → 100644
View file @
1b1592b9
//
// Outline.cs
// QuickOutline
//
// Created by Chris Nolet on 3/30/18.
// Copyright © 2018 Chris Nolet. All rights reserved.
//
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
UnityEngine
;
[DisallowMultipleComponent]
public
class
OutlineRenderer
:
MonoBehaviour
{
private
static
HashSet
<
Mesh
>
registeredMeshes
=
new
HashSet
<
Mesh
>();
public
enum
Mode
{
OutlineAll
,
OutlineVisible
,
OutlineHidden
,
OutlineAndSilhouette
,
SilhouetteOnly
}
public
Mode
OutlineMode
{
get
{
return
outlineMode
;
}
set
{
outlineMode
=
value
;
needsUpdate
=
true
;
}
}
public
Color
OutlineColor
{
get
{
return
outlineColor
;
}
set
{
outlineColor
=
value
;
needsUpdate
=
true
;
}
}
public
float
OutlineWidth
{
get
{
return
outlineWidth
;
}
set
{
outlineWidth
=
value
;
needsUpdate
=
true
;
}
}
[
Serializable
]
private
class
ListVector3
{
public
List
<
Vector3
>
data
;
}
[
SerializeField
]
private
Mode
outlineMode
;
[
SerializeField
]
private
Color
outlineColor
=
Color
.
white
;
[
SerializeField
,
Range
(
0f
,
10f
)]
private
float
outlineWidth
=
2f
;
[
Header
(
"Optional"
)]
[
SerializeField
,
Tooltip
(
"Precompute enabled: Per-vertex calculations are performed in the editor and serialized with the object. "
+
"Precompute disabled: Per-vertex calculations are performed at runtime in Awake(). This may cause a pause for large meshes."
)]
private
bool
precomputeOutline
;
[
SerializeField
,
HideInInspector
]
private
List
<
Mesh
>
bakeKeys
=
new
List
<
Mesh
>();
[
SerializeField
,
HideInInspector
]
private
List
<
ListVector3
>
bakeValues
=
new
List
<
ListVector3
>();
private
Renderer
[]
renderers
;
private
Material
outlineMaskMaterial
;
private
Material
outlineFillMaterial
;
private
bool
needsUpdate
;
void
Awake
()
{
// Cache renderers
renderers
=
GetComponentsInChildren
<
Renderer
>();
// Instantiate outline materials
outlineMaskMaterial
=
Instantiate
(
Resources
.
Load
<
Material
>(
@"Materials/OutlineMask"
));
outlineFillMaterial
=
Instantiate
(
Resources
.
Load
<
Material
>(
@"Materials/OutlineFill"
));
outlineMaskMaterial
.
name
=
"OutlineMask (Instance)"
;
outlineFillMaterial
.
name
=
"OutlineFill (Instance)"
;
// Retrieve or generate smooth normals
LoadSmoothNormals
();
// Apply material properties immediately
needsUpdate
=
true
;
}
void
OnEnable
()
{
foreach
(
var
renderer
in
renderers
)
{
// Append outline shaders
var
materials
=
renderer
.
sharedMaterials
.
ToList
();
materials
.
Add
(
outlineMaskMaterial
);
materials
.
Add
(
outlineFillMaterial
);
renderer
.
materials
=
materials
.
ToArray
();
}
}
void
OnValidate
()
{
// Update material properties
needsUpdate
=
true
;
// Clear cache when baking is disabled or corrupted
if
(!
precomputeOutline
&&
bakeKeys
.
Count
!=
0
||
bakeKeys
.
Count
!=
bakeValues
.
Count
)
{
bakeKeys
.
Clear
();
bakeValues
.
Clear
();
}
// Generate smooth normals when baking is enabled
if
(
precomputeOutline
&&
bakeKeys
.
Count
==
0
)
{
Bake
();
}
}
void
Update
()
{
if
(
needsUpdate
)
{
needsUpdate
=
false
;
UpdateMaterialProperties
();
}
}
void
OnDisable
()
{
foreach
(
var
renderer
in
renderers
)
{
// Remove outline shaders
var
materials
=
renderer
.
sharedMaterials
.
ToList
();
materials
.
Remove
(
outlineMaskMaterial
);
materials
.
Remove
(
outlineFillMaterial
);
renderer
.
materials
=
materials
.
ToArray
();
}
}
void
OnDestroy
()
{
// Destroy material instances
Destroy
(
outlineMaskMaterial
);
Destroy
(
outlineFillMaterial
);
}
void
Bake
()
{
// Generate smooth normals for each mesh
var
bakedMeshes
=
new
HashSet
<
Mesh
>();
foreach
(
var
meshFilter
in
GetComponentsInChildren
<
MeshFilter
>())
{
// Skip duplicates
if
(!
bakedMeshes
.
Add
(
meshFilter
.
sharedMesh
))
{
continue
;
}
// Serialize smooth normals
var
smoothNormals
=
SmoothNormals
(
meshFilter
.
sharedMesh
);
bakeKeys
.
Add
(
meshFilter
.
sharedMesh
);
bakeValues
.
Add
(
new
ListVector3
()
{
data
=
smoothNormals
});
}
}
void
LoadSmoothNormals
()
{
// Retrieve or generate smooth normals
foreach
(
var
meshFilter
in
GetComponentsInChildren
<
MeshFilter
>())
{
// Skip if smooth normals have already been adopted
if
(!
registeredMeshes
.
Add
(
meshFilter
.
sharedMesh
))
{
continue
;
}
// Retrieve or generate smooth normals
var
index
=
bakeKeys
.
IndexOf
(
meshFilter
.
sharedMesh
);
var
smoothNormals
=
(
index
>=
0
)
?
bakeValues
[
index
].
data
:
SmoothNormals
(
meshFilter
.
sharedMesh
);
// Store smooth normals in UV3
meshFilter
.
sharedMesh
.
SetUVs
(
3
,
smoothNormals
);
// Combine submeshes
var
renderer
=
meshFilter
.
GetComponent
<
Renderer
>();
if
(
renderer
!=
null
)
{
CombineSubmeshes
(
meshFilter
.
sharedMesh
,
renderer
.
sharedMaterials
);
}
}
// Clear UV3 on skinned mesh renderers
foreach
(
var
skinnedMeshRenderer
in
GetComponentsInChildren
<
SkinnedMeshRenderer
>())
{
// Skip if UV3 has already been reset
if
(!
registeredMeshes
.
Add
(
skinnedMeshRenderer
.
sharedMesh
))
{
continue
;
}
// Clear UV3
skinnedMeshRenderer
.
sharedMesh
.
uv4
=
new
Vector2
[
skinnedMeshRenderer
.
sharedMesh
.
vertexCount
];
// Combine submeshes
CombineSubmeshes
(
skinnedMeshRenderer
.
sharedMesh
,
skinnedMeshRenderer
.
sharedMaterials
);
}
}
List
<
Vector3
>
SmoothNormals
(
Mesh
mesh
)
{
// Group vertices by location
var
groups
=
mesh
.
vertices
.
Select
((
vertex
,
index
)
=>
new
KeyValuePair
<
Vector3
,
int
>(
vertex
,
index
)).
GroupBy
(
pair
=>
pair
.
Key
);
// Copy normals to a new list
var
smoothNormals
=
new
List
<
Vector3
>(
mesh
.
normals
);
// Average normals for grouped vertices
foreach
(
var
group
in
groups
)
{
// Skip single vertices
if
(
group
.
Count
()
==
1
)
{
continue
;
}
// Calculate the average normal
var
smoothNormal
=
Vector3
.
zero
;
foreach
(
var
pair
in
group
)
{
smoothNormal
+=
smoothNormals
[
pair
.
Value
];
}
smoothNormal
.
Normalize
();
// Assign smooth normal to each vertex
foreach
(
var
pair
in
group
)
{
smoothNormals
[
pair
.
Value
]
=
smoothNormal
;
}
}
return
smoothNormals
;
}
void
CombineSubmeshes
(
Mesh
mesh
,
Material
[]
materials
)
{
// Skip meshes with a single submesh
if
(
mesh
.
subMeshCount
==
1
)
{
return
;
}
// Skip if submesh count exceeds material count
if
(
mesh
.
subMeshCount
>
materials
.
Length
)
{
return
;
}
// Append combined submesh
mesh
.
subMeshCount
++;
mesh
.
SetTriangles
(
mesh
.
triangles
,
mesh
.
subMeshCount
-
1
);
}
void
UpdateMaterialProperties
()
{
// Apply properties according to mode
outlineFillMaterial
.
SetColor
(
"_OutlineColor"
,
outlineColor
);
switch
(
outlineMode
)
{
case
Mode
.
OutlineAll
:
outlineMaskMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Always
);
outlineFillMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Always
);
outlineFillMaterial
.
SetFloat
(
"_OutlineWidth"
,
outlineWidth
);
break
;
case
Mode
.
OutlineVisible
:
outlineMaskMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Always
);
outlineFillMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
LessEqual
);
outlineFillMaterial
.
SetFloat
(
"_OutlineWidth"
,
outlineWidth
);
break
;
case
Mode
.
OutlineHidden
:
outlineMaskMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Always
);
outlineFillMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Greater
);
outlineFillMaterial
.
SetFloat
(
"_OutlineWidth"
,
outlineWidth
);
break
;
case
Mode
.
OutlineAndSilhouette
:
outlineMaskMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
LessEqual
);
outlineFillMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Always
);
outlineFillMaterial
.
SetFloat
(
"_OutlineWidth"
,
outlineWidth
);
break
;
case
Mode
.
SilhouetteOnly
:
outlineMaskMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
LessEqual
);
outlineFillMaterial
.
SetFloat
(
"_ZTest"
,
(
float
)
UnityEngine
.
Rendering
.
CompareFunction
.
Greater
);
outlineFillMaterial
.
SetFloat
(
"_OutlineWidth"
,
0f
);
break
;
}
}
}
Assets/QuickOutline/Scripts/OutlineRenderer.cs.meta
0 → 100644
View file @
1b1592b9
fileFormatVersion: 2
guid: 5fea29bb7c508c244a1f805a5fd3fc4d
timeCreated: 1522369084
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/Game.unity
View file @
1b1592b9
This diff is collapsed.
Click to expand it.
Assets/Settings/URP-Balanced.asset
View file @
1b1592b9
...
@@ -82,33 +82,33 @@ MonoBehaviour:
...
@@ -82,33 +82,33 @@ MonoBehaviour:
m_Textures
:
m_Textures
:
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
m_PrefilteringModeMainLightShadows
:
1
m_PrefilteringModeMainLightShadows
:
3
m_PrefilteringModeAdditionalLight
:
4
m_PrefilteringModeAdditionalLight
:
3
m_PrefilteringModeAdditionalLightShadows
:
1
m_PrefilteringModeAdditionalLightShadows
:
0
m_PrefilterXRKeywords
:
0
m_PrefilterXRKeywords
:
1
m_PrefilteringModeForwardPlus
:
1
m_PrefilteringModeForwardPlus
:
0
m_PrefilteringModeDeferredRendering
:
1
m_PrefilteringModeDeferredRendering
:
0
m_PrefilteringModeScreenSpaceOcclusion
:
1
m_PrefilteringModeScreenSpaceOcclusion
:
2
m_PrefilterDebugKeywords
:
0
m_PrefilterDebugKeywords
:
1
m_PrefilterWriteRenderingLayers
:
0
m_PrefilterWriteRenderingLayers
:
1
m_PrefilterHDROutput
:
0
m_PrefilterHDROutput
:
1
m_PrefilterSSAODepthNormals
:
0
m_PrefilterSSAODepthNormals
:
1
m_PrefilterSSAOSourceDepthLow
:
0
m_PrefilterSSAOSourceDepthLow
:
0
m_PrefilterSSAOSourceDepthMedium
:
0
m_PrefilterSSAOSourceDepthMedium
:
1
m_PrefilterSSAOSourceDepthHigh
:
0
m_PrefilterSSAOSourceDepthHigh
:
1
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOBlueNoise
:
0
m_PrefilterSSAOBlueNoise
:
1
m_PrefilterSSAOSampleCountLow
:
0
m_PrefilterSSAOSampleCountLow
:
0
m_PrefilterSSAOSampleCountMedium
:
0
m_PrefilterSSAOSampleCountMedium
:
1
m_PrefilterSSAOSampleCountHigh
:
0
m_PrefilterSSAOSampleCountHigh
:
1
m_PrefilterDBufferMRT1
:
0
m_PrefilterDBufferMRT1
:
1
m_PrefilterDBufferMRT2
:
0
m_PrefilterDBufferMRT2
:
1
m_PrefilterDBufferMRT3
:
0
m_PrefilterDBufferMRT3
:
1
m_PrefilterSoftShadowsQualityLow
:
0
m_PrefilterSoftShadowsQualityLow
:
1
m_PrefilterSoftShadowsQualityMedium
:
0
m_PrefilterSoftShadowsQualityMedium
:
1
m_PrefilterSoftShadowsQualityHigh
:
0
m_PrefilterSoftShadowsQualityHigh
:
1
m_PrefilterSoftShadows
:
0
m_PrefilterSoftShadows
:
0
m_PrefilterScreenCoord
:
0
m_PrefilterScreenCoord
:
1
m_PrefilterNativeRenderPass
:
0
m_PrefilterNativeRenderPass
:
1
m_ShaderVariantLogLevel
:
0
m_ShaderVariantLogLevel
:
0
m_ShadowCascades
:
0
m_ShadowCascades
:
0
Assets/Settings/URP-HighFidelity.asset
View file @
1b1592b9
...
@@ -82,33 +82,33 @@ MonoBehaviour:
...
@@ -82,33 +82,33 @@ MonoBehaviour:
m_Textures
:
m_Textures
:
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
m_PrefilteringModeMainLightShadows
:
1
m_PrefilteringModeMainLightShadows
:
3
m_PrefilteringModeAdditionalLight
:
4
m_PrefilteringModeAdditionalLight
:
3
m_PrefilteringModeAdditionalLightShadows
:
1
m_PrefilteringModeAdditionalLightShadows
:
2
m_PrefilterXRKeywords
:
0
m_PrefilterXRKeywords
:
1
m_PrefilteringModeForwardPlus
:
1
m_PrefilteringModeForwardPlus
:
0
m_PrefilteringModeDeferredRendering
:
1
m_PrefilteringModeDeferredRendering
:
0
m_PrefilteringModeScreenSpaceOcclusion
:
1
m_PrefilteringModeScreenSpaceOcclusion
:
2
m_PrefilterDebugKeywords
:
0
m_PrefilterDebugKeywords
:
1
m_PrefilterWriteRenderingLayers
:
0
m_PrefilterWriteRenderingLayers
:
1
m_PrefilterHDROutput
:
0
m_PrefilterHDROutput
:
1
m_PrefilterSSAODepthNormals
:
0
m_PrefilterSSAODepthNormals
:
0
m_PrefilterSSAOSourceDepthLow
:
0
m_PrefilterSSAOSourceDepthLow
:
1
m_PrefilterSSAOSourceDepthMedium
:
0
m_PrefilterSSAOSourceDepthMedium
:
1
m_PrefilterSSAOSourceDepthHigh
:
0
m_PrefilterSSAOSourceDepthHigh
:
1
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOBlueNoise
:
0
m_PrefilterSSAOBlueNoise
:
1
m_PrefilterSSAOSampleCountLow
:
0
m_PrefilterSSAOSampleCountLow
:
1
m_PrefilterSSAOSampleCountMedium
:
0
m_PrefilterSSAOSampleCountMedium
:
1
m_PrefilterSSAOSampleCountHigh
:
0
m_PrefilterSSAOSampleCountHigh
:
0
m_PrefilterDBufferMRT1
:
0
m_PrefilterDBufferMRT1
:
1
m_PrefilterDBufferMRT2
:
0
m_PrefilterDBufferMRT2
:
1
m_PrefilterDBufferMRT3
:
0
m_PrefilterDBufferMRT3
:
1
m_PrefilterSoftShadowsQualityLow
:
0
m_PrefilterSoftShadowsQualityLow
:
1
m_PrefilterSoftShadowsQualityMedium
:
0
m_PrefilterSoftShadowsQualityMedium
:
1
m_PrefilterSoftShadowsQualityHigh
:
0
m_PrefilterSoftShadowsQualityHigh
:
1
m_PrefilterSoftShadows
:
0
m_PrefilterSoftShadows
:
0
m_PrefilterScreenCoord
:
0
m_PrefilterScreenCoord
:
1
m_PrefilterNativeRenderPass
:
0
m_PrefilterNativeRenderPass
:
1
m_ShaderVariantLogLevel
:
0
m_ShaderVariantLogLevel
:
0
m_ShadowCascades
:
1
m_ShadowCascades
:
1
Assets/Settings/URP-Performant.asset
View file @
1b1592b9
...
@@ -82,33 +82,33 @@ MonoBehaviour:
...
@@ -82,33 +82,33 @@ MonoBehaviour:
m_Textures
:
m_Textures
:
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
m_PrefilteringModeMainLightShadows
:
1
m_PrefilteringModeMainLightShadows
:
0
m_PrefilteringModeAdditionalLight
:
4
m_PrefilteringModeAdditionalLight
:
0
m_PrefilteringModeAdditionalLightShadows
:
1
m_PrefilteringModeAdditionalLightShadows
:
0
m_PrefilterXRKeywords
:
0
m_PrefilterXRKeywords
:
1
m_PrefilteringModeForwardPlus
:
1
m_PrefilteringModeForwardPlus
:
0
m_PrefilteringModeDeferredRendering
:
1
m_PrefilteringModeDeferredRendering
:
0
m_PrefilteringModeScreenSpaceOcclusion
:
1
m_PrefilteringModeScreenSpaceOcclusion
:
0
m_PrefilterDebugKeywords
:
0
m_PrefilterDebugKeywords
:
1
m_PrefilterWriteRenderingLayers
:
0
m_PrefilterWriteRenderingLayers
:
1
m_PrefilterHDROutput
:
0
m_PrefilterHDROutput
:
1
m_PrefilterSSAODepthNormals
:
0
m_PrefilterSSAODepthNormals
:
1
m_PrefilterSSAOSourceDepthLow
:
0
m_PrefilterSSAOSourceDepthLow
:
1
m_PrefilterSSAOSourceDepthMedium
:
0
m_PrefilterSSAOSourceDepthMedium
:
1
m_PrefilterSSAOSourceDepthHigh
:
0
m_PrefilterSSAOSourceDepthHigh
:
1
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOInterleaved
:
1
m_PrefilterSSAOBlueNoise
:
0
m_PrefilterSSAOBlueNoise
:
1
m_PrefilterSSAOSampleCountLow
:
0
m_PrefilterSSAOSampleCountLow
:
1
m_PrefilterSSAOSampleCountMedium
:
0
m_PrefilterSSAOSampleCountMedium
:
1
m_PrefilterSSAOSampleCountHigh
:
0
m_PrefilterSSAOSampleCountHigh
:
1
m_PrefilterDBufferMRT1
:
0
m_PrefilterDBufferMRT1
:
1
m_PrefilterDBufferMRT2
:
0
m_PrefilterDBufferMRT2
:
1
m_PrefilterDBufferMRT3
:
0
m_PrefilterDBufferMRT3
:
1
m_PrefilterSoftShadowsQualityLow
:
0
m_PrefilterSoftShadowsQualityLow
:
1
m_PrefilterSoftShadowsQualityMedium
:
0
m_PrefilterSoftShadowsQualityMedium
:
1
m_PrefilterSoftShadowsQualityHigh
:
0
m_PrefilterSoftShadowsQualityHigh
:
1
m_PrefilterSoftShadows
:
0
m_PrefilterSoftShadows
:
0
m_PrefilterScreenCoord
:
0
m_PrefilterScreenCoord
:
1
m_PrefilterNativeRenderPass
:
0
m_PrefilterNativeRenderPass
:
1
m_ShaderVariantLogLevel
:
0
m_ShaderVariantLogLevel
:
0
m_ShadowCascades
:
0
m_ShadowCascades
:
0
Assets/_Scriptable Objects/Data/Question set 1.asset
View file @
1b1592b9
...
@@ -15,4 +15,7 @@ MonoBehaviour:
...
@@ -15,4 +15,7 @@ MonoBehaviour:
questions
:
questions
:
-
{
fileID
:
11400000
,
guid
:
eab9c3e25987fe04d964dbff17566355
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
eab9c3e25987fe04d964dbff17566355
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
0728d451a80d7444fbe9416a41b994dc
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
0728d451a80d7444fbe9416a41b994dc
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
881ce7da20116664d8c5d85f0fc4ade3
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
7a5e013ccc214804987ded72e7890d57
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
38b7b5b09b081a342880dec8ae952c2a
,
type
:
2
}
randomizeOrder
:
0
randomizeOrder
:
0
Assets/_Scriptable Objects/Data/Question.asset
View file @
1b1592b9
...
@@ -13,17 +13,9 @@ MonoBehaviour:
...
@@ -13,17 +13,9 @@ MonoBehaviour:
m_Name
:
Question
m_Name
:
Question
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
questionText
:
"
\u0645\u062A\u0649
\u062A\u0645
\u062A\u0623\u0633\u064A\u0633
\u0642\u0648\u0627\u062A
questionText
:
"
\u0645\u062A\u0649
\u062A\u0645
\u062A\u0623\u0633\u064A\u0633
\u0642\u0648\u0627\u062A
\u0627\u0644\u0635\u0627\u0639\u0642\u0629
\u0627\u0644\u0645\u0635\u0631\u064A\u0629\u061F\u0645\u062A\u0649
\u0627\u0644\u0635\u0627\u0639\u0642\u0629
\u0627\u0644\u0645\u0635\u0631\u064A\u0629\u061F
"
\u062A\u0645
\u062A\u0623\u0633\u064A\u0633
\u0642\u0648\u0627\u062A
\u0627\u0644\u0635\u0627\u0639\u0642\u0629
\u0627\u0644\u0645\u0635\u0631\u064A\u0629\u061F\u0645\u062A\u0649
\u062A\u0645
\u062A\u0623\u0633\u064A\u0633
\u0642\u0648\u0627\u062A
\u0627\u0644\u0635\u0627\u0639\u0642\u0629
\u0627\u0644\u0645\u0635\u0631\u064A\u0629\u061F\u0645\u062A\u0649
\u062A\u0645
\u062A\u0623\u0633\u064A\u0633
\u0642\u0648\u0627\u062A
\u0627\u0644\u0635\u0627\u0639\u0642\u0629
\u0627\u0644\u0645\u0635\u0631\u064A\u0629\u061F\u0645\u062A\u0649
\u062A\u0645
\u062A\u0623\u0633\u064A\u0633
\u0642\u0648\u0627\u062A
\u0627\u0644\u0635\u0627\u0639\u0642\u0629
\u0627\u0644\u0645\u0635\u0631\u064A\u0629\u061F
"
optionA
:
0591
optionA
:
0591
optionB
:
559
7
optionB
:
559
1
optionC
:
0691
optionC
:
0691
optionD
:
7691
optionD
:
7691
correctAnswer
:
66
correctAnswer
:
66
...
...
Assets/_Scripts/BombController.cs
View file @
1b1592b9
...
@@ -4,6 +4,7 @@ using TMPro;
...
@@ -4,6 +4,7 @@ using TMPro;
using
ALArcade.ArabicTMP
;
using
ALArcade.ArabicTMP
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
DG.Tweening
;
using
DG.Tweening
;
using
System.Net.NetworkInformation
;
public
class
BombController
:
MonoBehaviour
public
class
BombController
:
MonoBehaviour
{
{
...
@@ -28,6 +29,7 @@ public class BombController : MonoBehaviour
...
@@ -28,6 +29,7 @@ public class BombController : MonoBehaviour
[
SerializeField
]
private
QuestionSO
currentQuestion
;
[
SerializeField
]
private
QuestionSO
currentQuestion
;
private
float
_timeRemaining
;
private
float
_timeRemaining
;
private
bool
_answered
=
false
;
private
bool
_answered
=
false
;
private
Wire
currentWireAnswered
;
private
GameManager
_gameManager
;
private
GameManager
_gameManager
;
private
List
<
Wire
>
_wires
;
private
List
<
Wire
>
_wires
;
...
@@ -225,6 +227,17 @@ public class BombController : MonoBehaviour
...
@@ -225,6 +227,17 @@ public class BombController : MonoBehaviour
yield
return
new
WaitForSeconds
(
currentInterval
*
0.7f
);
yield
return
new
WaitForSeconds
(
currentInterval
*
0.7f
);
}
}
}
}
private
Wire
GetAnswerdWire
(
char
answered
)
{
foreach
(
Wire
wire
in
_wires
)
{
if
(
wire
.
WireAnswer
==
answered
)
{
return
wire
;
}
}
return
null
;
}
private
void
OnDestroy
()
private
void
OnDestroy
()
{
{
...
...
Assets/_Scripts/Dotween/UIPanelTween.cs
View file @
1b1592b9
...
@@ -118,4 +118,15 @@ public class UIPanelTween : MonoBehaviour
...
@@ -118,4 +118,15 @@ public class UIPanelTween : MonoBehaviour
.
SetDelay
(
delay
)
.
SetDelay
(
delay
)
.
OnComplete
(()
=>
panel
.
gameObject
.
SetActive
(
false
));
.
OnComplete
(()
=>
panel
.
gameObject
.
SetActive
(
false
));
}
}
public
void
OpenWithDelay
(
float
openDelay
)
{
delay
=
openDelay
;
Open
();
}
public
void
CloseWithDelay
(
float
closeDelay
)
{
delay
=
closeDelay
;
Close
();
}
}
}
Assets/_Scripts/GameManager.cs
View file @
1b1592b9
...
@@ -35,6 +35,10 @@ public class GameManager : MonoBehaviour
...
@@ -35,6 +35,10 @@ public class GameManager : MonoBehaviour
[
SerializeField
]
UnityEvent
EndGameEvent
;
[
SerializeField
]
UnityEvent
EndGameEvent
;
[
SerializeField
]
private
GameObject
_pliers
;
[
SerializeField
]
private
Transform
_pliersStartPos
;
[
SerializeField
]
private
Transform
_currentCutPos
;
void
Start
()
void
Start
()
{
{
if
(
questionSet
==
null
)
if
(
questionSet
==
null
)
...
@@ -80,12 +84,17 @@ public class GameManager : MonoBehaviour
...
@@ -80,12 +84,17 @@ public class GameManager : MonoBehaviour
currentBomb
.
transform
.
DORotateQuaternion
(
bombTargetPositoin
.
rotation
,
_animDuration
)
currentBomb
.
transform
.
DORotateQuaternion
(
bombTargetPositoin
.
rotation
,
_animDuration
)
.
SetEase
(
Ease
.
InOutSine
);
.
SetEase
(
Ease
.
InOutSine
);
currentBomb
.
Initialize
(
currentQuestions
[
currentQuestionIndex
],
this
);
currentBomb
.
Initialize
(
currentQuestions
[
currentQuestionIndex
],
this
);
}
}
void
BombReachedTarget
()
void
BombReachedTarget
()
{
{
currentBomb
.
StartVisuals
();
currentBomb
.
StartVisuals
();
}
public
void
MovePlier
(
Transform
cutPos
,
float
duration
)
{
_pliers
.
transform
.
DOMove
(
cutPos
.
position
,
duration
).
SetEase
(
Ease
.
InOutSine
);
_pliers
.
transform
.
DORotateQuaternion
(
cutPos
.
rotation
,
duration
).
SetEase
(
Ease
.
InOutSine
);
}
}
public
void
OnAnswerSelected
(
bool
isCorrect
,
bool
isTimeout
)
public
void
OnAnswerSelected
(
bool
isCorrect
,
bool
isTimeout
)
...
...
Assets/_Scripts/Wire.cs
View file @
1b1592b9
...
@@ -3,6 +3,7 @@ using TMPro;
...
@@ -3,6 +3,7 @@ using TMPro;
using
ALArcade.ArabicTMP
;
using
ALArcade.ArabicTMP
;
using
UnityEngine.UI
;
using
UnityEngine.UI
;
using
System.Collections
;
using
System.Collections
;
using
UnityEngine.Rendering.Universal
;
public
class
Wire
:
MonoBehaviour
public
class
Wire
:
MonoBehaviour
{
{
...
@@ -17,11 +18,7 @@ public class Wire : MonoBehaviour
...
@@ -17,11 +18,7 @@ public class Wire : MonoBehaviour
[
SerializeField
]
private
Button
_button
;
[
SerializeField
]
private
Button
_button
;
[
SerializeField
]
private
FadeCanvasAndLine
_fadeCanvasAndLine
;
[
SerializeField
]
private
FadeCanvasAndLine
_fadeCanvasAndLine
;
[
SerializeField
]
private
FloatingObject
_floatingObject
;
[
SerializeField
]
private
FloatingObject
_floatingObject
;
[
SerializeField
]
private
OutlineRenderer
_outlineRenderer
;
/*[Header("Materials")]
[SerializeField] private Material normalMaterial;
[SerializeField] private Material hoverMaterial;
[SerializeField] private Material cutMaterial;*/
[
Header
(
"Cut Effect"
)]
[
Header
(
"Cut Effect"
)]
[
SerializeField
]
private
ParticleSystem
CorrectCutParticles
;
[
SerializeField
]
private
ParticleSystem
CorrectCutParticles
;
...
@@ -31,27 +28,29 @@ public class Wire : MonoBehaviour
...
@@ -31,27 +28,29 @@ public class Wire : MonoBehaviour
private
BombController
_bombController
;
private
BombController
_bombController
;
private
bool
_isCut
=
false
;
private
bool
_isCut
=
false
;
private
bool
_clikable
;
private
bool
_clikable
;
public
char
WireAnswer
=>
_wireAnswer
;
private
void
Start
()
private
void
Start
()
{
{
_meshFilter
=
GetComponent
<
MeshFilter
>();
_meshFilter
=
GetComponent
<
MeshFilter
>();
_meshRender
=
GetComponent
<
MeshRenderer
>();
_meshRender
=
GetComponent
<
MeshRenderer
>();
_outlineRenderer
=
GetComponent
<
OutlineRenderer
>();
_meshFilter
.
mesh
=
_wireMesh
;
_meshFilter
.
mesh
=
_wireMesh
;
_meshRender
=
_meshRender
.
GetComponent
<
MeshRenderer
>();
_meshRender
=
_meshRender
.
GetComponent
<
MeshRenderer
>();
_meshRender
.
material
.
color
=
_color
;
_meshRender
.
material
.
color
=
_color
;
image
.
color
=
_color
;
image
.
color
=
_color
;
line
.
startColor
=
_color
;
line
.
startColor
=
_color
;
line
.
endColor
=
_color
;
line
.
endColor
=
_color
;
gameObject
.
AddComponent
<
MeshCollider
>();
_button
.
onClick
.
AddListener
(
CutWire
);
_button
.
onClick
.
AddListener
(
CutWire
);
_clikable
=
false
;
_clikable
=
false
;
_cutWire
.
GetComponent
<
Renderer
>().
sharedMaterial
=
_meshRender
.
sharedMaterial
;
_cutWire
.
GetComponent
<
Renderer
>().
sharedMaterial
=
_meshRender
.
sharedMaterial
;
StartCoroutine
(
ClikableDelay
());
StartCoroutine
(
ClikableDelay
());
_outlineRenderer
.
OutlineWidth
=
0
;
}
}
IEnumerator
ClikableDelay
()
IEnumerator
ClikableDelay
()
{
{
yield
return
new
WaitForSeconds
(
2
f
);
yield
return
new
WaitForSeconds
(
4
f
);
_clikable
=
true
;
_clikable
=
true
;
}
}
public
void
SetAnswer
(
char
answer
,
string
answerText
,
BombController
controller
)
public
void
SetAnswer
(
char
answer
,
string
answerText
,
BombController
controller
)
...
@@ -60,15 +59,21 @@ public class Wire : MonoBehaviour
...
@@ -60,15 +59,21 @@ public class Wire : MonoBehaviour
_answerLabel
.
arabicText
=
$"
{
answerText
}
"
;
_answerLabel
.
arabicText
=
$"
{
answerText
}
"
;
_bombController
=
controller
;
_bombController
=
controller
;
}
}
private
void
OnTriggerEnter
(
Collider
other
)
{
Debug
.
Log
(
other
.
name
);
}
void
OnMouseEnter
()
void
OnMouseEnter
()
{
{
CursorController
.
Instance
.
SetHoverCursor
();
CursorController
.
Instance
.
SetHoverCursor
();
_outlineRenderer
.
OutlineWidth
=
9f
;
}
}
void
OnMouseExit
()
void
OnMouseExit
()
{
{
CursorController
.
Instance
.
SetDefaultCursor
();
CursorController
.
Instance
.
SetDefaultCursor
();
_outlineRenderer
.
OutlineWidth
=
0f
;
}
}
void
OnMouseDown
()
void
OnMouseDown
()
...
...
Packages/manifest.json
View file @
1b1592b9
{
{
"dependencies"
:
{
"dependencies"
:
{
"com.bnco.unity-webgl-microphone"
:
"https://github.com/bnco-dev/unity-webgl-microphone.git"
,
"com.unity.cinemachine"
:
"2.10.5"
,
"com.unity.cinemachine"
:
"2.10.5"
,
"com.unity.collab-proxy"
:
"2.11.2"
,
"com.unity.collab-proxy"
:
"2.11.2"
,
"com.unity.feature.2d"
:
"2.0.1"
,
"com.unity.feature.2d"
:
"2.0.1"
,
...
...
Packages/packages-lock.json
View file @
1b1592b9
{
{
"dependencies"
:
{
"dependencies"
:
{
"com.bnco.unity-webgl-microphone"
:
{
"version"
:
"https://github.com/bnco-dev/unity-webgl-microphone.git"
,
"depth"
:
0
,
"source"
:
"git"
,
"dependencies"
:
{},
"hash"
:
"bad36244303305fcbdfcb764c30d5bc9be480676"
},
"com.unity.2d.animation"
:
{
"com.unity.2d.animation"
:
{
"version"
:
"9.2.0"
,
"version"
:
"9.2.0"
,
"depth"
:
1
,
"depth"
:
1
,
...
...
ProjectSettings/CommonBurstAotSettings.json
View file @
1b1592b9
{
{
"MonoBehaviour"
:
{
"MonoBehaviour"
:
{
"Version"
:
3
,
"Version"
:
5
,
"DisabledWarnings"
:
""
"DisabledWarnings"
:
""
}
}
}
}
ProjectSettings/EditorBuildSettings.asset
View file @
1b1592b9
...
@@ -6,6 +6,6 @@ EditorBuildSettings:
...
@@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion
:
2
serializedVersion
:
2
m_Scenes
:
m_Scenes
:
-
enabled
:
1
-
enabled
:
1
path
:
Assets/Scenes/
SampleScen
e.unity
path
:
Assets/Scenes/
Gam
e.unity
guid
:
99c9720ab356a0642a771bea13969a05
guid
:
d3bce82ad65f9be4fa022c764f04c45e
m_configObjects
:
{}
m_configObjects
:
{}
ProjectSettings/ProjectSettings.asset
View file @
1b1592b9
...
@@ -534,7 +534,8 @@ PlayerSettings:
...
@@ -534,7 +534,8 @@ PlayerSettings:
openGLRequireES31
:
0
openGLRequireES31
:
0
openGLRequireES31AEP
:
0
openGLRequireES31AEP
:
0
openGLRequireES32
:
0
openGLRequireES32
:
0
m_TemplateCustomTags
:
{}
m_TemplateCustomTags
:
PRODUCT_DESCRIPTION
:
mobileMTRendering
:
mobileMTRendering
:
Android
:
1
Android
:
1
iPhone
:
1
iPhone
:
1
...
@@ -796,7 +797,7 @@ PlayerSettings:
...
@@ -796,7 +797,7 @@ PlayerSettings:
webGLDebugSymbols
:
0
webGLDebugSymbols
:
0
webGLEmscriptenArgs
:
webGLEmscriptenArgs
:
webGLModulesDirectory
:
webGLModulesDirectory
:
webGLTemplate
:
APPLICATION:
Default
webGLTemplate
:
APPLICATION:
PWA
webGLAnalyzeBuildSize
:
0
webGLAnalyzeBuildSize
:
0
webGLUseEmbeddedResources
:
0
webGLUseEmbeddedResources
:
0
webGLCompressionFormat
:
0
webGLCompressionFormat
:
0
...
@@ -824,7 +825,7 @@ PlayerSettings:
...
@@ -824,7 +825,7 @@ PlayerSettings:
Stadia
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
Stadia
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
Standalone
:
DOTWEEN;LETAI_TRUESHADOW;UNITY_POST_PROCESSING_STACK_V2
Standalone
:
DOTWEEN;LETAI_TRUESHADOW;UNITY_POST_PROCESSING_STACK_V2
VisionOS
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
VisionOS
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
WebGL
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
WebGL
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
;LETAI_TRUESHADOW
Windows Store Apps
:
DOTWEEN
Windows Store Apps
:
DOTWEEN
XboxOne
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
XboxOne
:
DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
iPhone
:
DOTWEEN
iPhone
:
DOTWEEN
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment