备份CatanBuilding瘦身独立工程
This commit is contained in:
8
LocalPackages/PaintIn3D/Runtime/PaintCore.meta
Normal file
8
LocalPackages/PaintIn3D/Runtime/PaintCore.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 492e151162cdd794eb59503a79a45291
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
LocalPackages/PaintIn3D/Runtime/PaintCore/Extras.meta
Normal file
8
LocalPackages/PaintIn3D/Runtime/PaintCore/Extras.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b5ea2a7ac3e00d44b332f7d8ba8d122
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
10
LocalPackages/PaintIn3D/Runtime/PaintCore/Extras/Groups.meta
Normal file
10
LocalPackages/PaintIn3D/Runtime/PaintCore/Extras/Groups.meta
Normal file
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 050b585addd9caf4db78bded60b41835
|
||||
folderAsset: yes
|
||||
timeCreated: 1578389110
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,532 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Albedo (RGB) Alpha (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 0
|
||||
textureDatas:
|
||||
- Name: Albedo
|
||||
BlendMode:
|
||||
Index: 0
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 1, y: 1, z: 1, w: 0}
|
||||
- Name: Alpha
|
||||
BlendMode:
|
||||
Index: 0
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 0, y: 0, z: 0, w: 1}
|
||||
shaderData: '_MainTex@GUI/Text Shader
|
||||
|
||||
_MainTex@Hidden/FrameDebuggerRenderTargetDisplay
|
||||
|
||||
_MainTex@Hidden/BlitCopy
|
||||
|
||||
_MainTex@Hidden/BlitCopyDepth
|
||||
|
||||
_MainTex@Hidden/BlitCopyWithDepth
|
||||
|
||||
_MainTex@Hidden/BlitToDepth
|
||||
|
||||
_MainTex@Hidden/BlitToDepth_MSAA
|
||||
|
||||
_MainTex@Standard
|
||||
(Specular setup)
|
||||
|
||||
_MainTex@Standard
|
||||
|
||||
_MainTex@Autodesk Interactive
|
||||
|
||||
_MainTex@Hidden/Internal-DepthNormalsTexture
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/VertexLit
|
||||
|
||||
_MainTex@Legacy Shaders/Diffuse Fast
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Bumped Diffuse
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Bumped Specular
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Diffuse Detail
|
||||
|
||||
_MainTex@Legacy Shaders/Self-Illumin/VertexLit
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Self-Illumin/Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Self-Illumin/Bumped
|
||||
Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Self-Illumin/Specular
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Self-Illumin/Bumped Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Reflective/VertexLit
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Reflective/Bumped Unlit
|
||||
|
||||
_MainTex@Legacy Shaders/Reflective/Diffuse
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Reflective/Bumped Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Reflective/Bumped
|
||||
VertexLit
|
||||
|
||||
_MainTex@Legacy Shaders/Reflective/Specular
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Reflective/Bumped Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/VertexLit
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Transparent/Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Bumped Diffuse
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Transparent/Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Bumped
|
||||
Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Cutout/VertexLit
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Transparent/Cutout/Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Cutout/Bumped
|
||||
Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Cutout/Specular
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Transparent/Cutout/Bumped Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Parallax
|
||||
Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Parallax Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Self-Illumin/Parallax
|
||||
Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Self-Illumin/Parallax Specular
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Reflective/Parallax Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Reflective/Parallax
|
||||
Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Parallax Diffuse
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Transparent/Parallax Specular
|
||||
|
||||
_MainTex@Legacy Shaders/Transparent/Cutout/Soft
|
||||
Edge Unlit
|
||||
|
||||
_MainTex@Legacy Shaders/Decal
|
||||
|
||||
_MainTex@FX/Flare
|
||||
|
||||
_MainTex@Skybox/Panoramic
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Particles/Additive
|
||||
|
||||
_MainTex@Legacy Shaders/Particles/~Additive-Multiply
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Particles/Additive (Soft)
|
||||
|
||||
_MainTex@Legacy Shaders/Particles/Alpha
|
||||
Blended
|
||||
|
||||
_MainTex@Legacy Shaders/Particles/Multiply
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Particles/Multiply (Double)
|
||||
|
||||
_MainTex@Legacy Shaders/Particles/Alpha
|
||||
Blended Premultiply
|
||||
|
||||
_MainTex@Legacy Shaders/Particles/VertexLit Blended
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Particles/Anim Alpha Blended
|
||||
|
||||
_MainTex@Particles/Standard Surface
|
||||
|
||||
_MainTex@Particles/Standard
|
||||
Unlit
|
||||
|
||||
_MainTex@Sprites/Diffuse
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Details/Vertexlit
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Details/WavingDoublePass
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Details/BillboardWavingDoublePass
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/BillboardTree
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/CameraFacingBillboardTree
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Splatmap/Diffuse-Base
|
||||
|
||||
_MainTex@Nature/Terrain/Diffuse
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Lightmapped/VertexLit
|
||||
|
||||
_MainTex@Legacy Shaders/Lightmapped/Diffuse
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Lightmapped/Bumped Diffuse
|
||||
|
||||
_MainTex@Legacy Shaders/Lightmapped/Specular
|
||||
|
||||
_MainTex@Legacy
|
||||
Shaders/Lightmapped/Bumped Specular
|
||||
|
||||
_MainTex@Hidden/Internal-GUITextureClip
|
||||
|
||||
_MainTex@Hidden/Internal-GUITextureClipText
|
||||
|
||||
_MainTex@Hidden/Internal-GUITexture
|
||||
|
||||
_MainTex@Hidden/Internal-GUITextureBlit
|
||||
|
||||
_MainTex@Hidden/Internal-GUIRoundedRect
|
||||
|
||||
_MainTex@Hidden/Internal-UIRDefault
|
||||
|
||||
_MainTex@Hidden/Internal-GUIRoundedRectWithColorPerBorder
|
||||
|
||||
_MainTex@Hidden/Nature/Tree
|
||||
Soft Occlusion Bark Rendertex
|
||||
|
||||
_MainTex@Nature/Tree Soft Occlusion Bark
|
||||
|
||||
_MainTex@Hidden/Nature/Tree
|
||||
Soft Occlusion Leaves Rendertex
|
||||
|
||||
_MainTex@Nature/Tree Soft Occlusion Leaves
|
||||
|
||||
_MainTex@Nature/Tree
|
||||
Creator Bark
|
||||
|
||||
_MainTex@Nature/Tree Creator Leaves
|
||||
|
||||
_MainTex@Hidden/Nature/Tree
|
||||
Creator Bark Rendertex
|
||||
|
||||
_MainTex@Hidden/Nature/Tree Creator Leaves Rendertex
|
||||
|
||||
_MainTex@Hidden/Nature/Tree
|
||||
Creator Bark Optimized
|
||||
|
||||
_MainTex@Hidden/Nature/Tree Creator Leaves Optimized
|
||||
|
||||
_MainTex@Nature/Tree
|
||||
Creator Leaves Fast
|
||||
|
||||
_MainTex@Hidden/Nature/Tree Creator Leaves Fast Optimized
|
||||
|
||||
_MainTex@Hidden/Nature/Tree
|
||||
Creator Albedo Rendertex
|
||||
|
||||
_MainTex@Hidden/Nature/Tree Creator Normal Rendertex
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Splatmap/Specular-Base
|
||||
|
||||
_MainTex@Nature/Terrain/Specular
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Splatmap/Standard-Base
|
||||
|
||||
_MainTex@Nature/Terrain/Standard
|
||||
|
||||
_MainTex@Mobile/VertexLit
|
||||
|
||||
_MainTex@Mobile/Diffuse
|
||||
|
||||
_MainTex@Mobile/Bumped
|
||||
Diffuse
|
||||
|
||||
_MainTex@Mobile/Bumped Specular
|
||||
|
||||
_MainTex@Mobile/Bumped Specular
|
||||
(1 Directional Realtime Light)
|
||||
|
||||
_MainTex@Mobile/VertexLit (Only Directional
|
||||
Lights)
|
||||
|
||||
_MainTex@Mobile/Unlit (Supports Lightmap)
|
||||
|
||||
_MainTex@Mobile/Particles/Additive
|
||||
|
||||
_MainTex@Mobile/Particles/Alpha
|
||||
Blended
|
||||
|
||||
_MainTex@Mobile/Particles/VertexLit Blended
|
||||
|
||||
_MainTex@Mobile/Particles/Multiply
|
||||
|
||||
_MainTex@Unlit/Transparent
|
||||
|
||||
_MainTex@Unlit/Transparent
|
||||
Cutout
|
||||
|
||||
_MainTex@Unlit/Texture
|
||||
|
||||
_MainTex@Sprites/Default
|
||||
|
||||
_MainTex@Sprites/Mask
|
||||
|
||||
_MainTex@UI/Unlit/Transparent
|
||||
|
||||
_MainTex@UI/Unlit/Detail
|
||||
|
||||
_MainTex@UI/Unlit/Text
|
||||
|
||||
_MainTex@UI/Unlit/Text
|
||||
Detail
|
||||
|
||||
_MainTex@UI/Lit/Transparent
|
||||
|
||||
_MainTex@UI/Lit/Bumped
|
||||
|
||||
_MainTex@UI/Lit/Detail
|
||||
|
||||
_MainTex@UI/Lit/Refraction
|
||||
|
||||
_MainTex@UI/Lit/Refraction
|
||||
Detail
|
||||
|
||||
_MainTex@UI/Default
|
||||
|
||||
_MainTex@UI/Default Font
|
||||
|
||||
_MainTex@UI/DefaultETC1
|
||||
|
||||
_MainTex@Hidden/UI/CompositeOverdraw
|
||||
|
||||
_MainTex@Hidden/UI/Overdraw
|
||||
|
||||
_MainTex@Nature/SpeedTree
|
||||
|
||||
_MainTex@Nature/SpeedTree
|
||||
Billboard
|
||||
|
||||
_MainTex@Nature/SpeedTree8
|
||||
|
||||
_MainTex@Hidden/GIDebug/TextureUV
|
||||
|
||||
_MainTex@Hidden/GIDebug/ShowLightMask
|
||||
|
||||
_MainTex@Hidden/GIDebug/VertexColors
|
||||
|
||||
_MainTex@Hidden/CubeBlur
|
||||
|
||||
_MainTex@Hidden/CubeCopy
|
||||
|
||||
_MainTex@Hidden/VR/BlitTexArraySlice
|
||||
|
||||
_MainTex@Hidden/VR/Internal-VRDistortion
|
||||
|
||||
_MainTex@Hidden/VR/BlitTexArraySliceToDepth
|
||||
|
||||
_MainTex@Hidden/VR/BlitTexArraySliceToDepth_MSAA
|
||||
|
||||
_MainTex@Hidden/Internal-ODSWorldTexture
|
||||
|
||||
_MainTex@Hidden/Internal-CubemapToEquirect
|
||||
|
||||
_MainTex@Hidden/VR/BlitFromTex2DToTexArraySlice
|
||||
|
||||
_MainTex@Hidden/VideoComposite
|
||||
|
||||
_MainTex@Hidden/VideoDecode
|
||||
|
||||
_MainTex@Hidden/Compositing
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/PaintHeight
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/HeightBlitCopy
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/GenerateNormalmap
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/TerrainLayerUtils
|
||||
|
||||
_MainTex@Hidden/TextCore/Distance
|
||||
Field
|
||||
|
||||
_MainTex@Hidden/TextCore/Distance Field SSD
|
||||
|
||||
_MainTex@Debug/PlanarReflectionProbePreview
|
||||
|
||||
_BASE_COLOR_MAP@HDRP/3DSMaxPhysicalMaterial/PhysicalMaterial3DsMax
|
||||
|
||||
_BASE_COLOR_MAP@HDRP/ArnoldStandardSurface/ArnoldStandardSurface
|
||||
|
||||
_MainTex@HDRP/Autodesk
|
||||
Interactive/AutodeskInteractive
|
||||
|
||||
_MainTex@HDRP/Autodesk Interactive/AutodeskInteractiveMasked
|
||||
|
||||
_MainTex@HDRP/Autodesk
|
||||
Interactive/AutodeskInteractiveTransparent
|
||||
|
||||
_MainTex@HDRP/AxF
|
||||
|
||||
_BaseColorMap@HDRP/Decal
|
||||
|
||||
_MainTex@HDRP/LayeredLit
|
||||
|
||||
_MainTex@HDRP/LayeredLitTessellation
|
||||
|
||||
_BaseColorMap@HDRP/Lit
|
||||
|
||||
_BaseColorMap@HDRP/LitTessellation
|
||||
|
||||
_MainTex@HDRP/TerrainLit
|
||||
|
||||
_MainTex@HDRP/Unlit
|
||||
|
||||
_MainTex@Hidden/BlitNoAlpha
|
||||
|
||||
_MainTex@Hidden/Default
|
||||
StaticMeshOutput
|
||||
|
||||
_MainTex@Hidden/GUITextureBlit2SRGB
|
||||
|
||||
_MainTex@Hidden/HDRP/TerrainLit_Basemap
|
||||
|
||||
_MainTex@Hidden/LookDev/CubeToLatlong
|
||||
|
||||
_MainTex@Hidden/Shadow2DRemoveSelf
|
||||
|
||||
_MainTex@Hidden/ShadowGroup2D
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Details/UniversalPipeline/BillboardWavingDoublePass
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Details/UniversalPipeline/Vertexlit
|
||||
|
||||
_MainTex@Hidden/TerrainEngine/Details/UniversalPipeline/WavingDoublePass
|
||||
|
||||
_MainTex@Hidden/TextMeshPro/Internal/Distance
|
||||
Field SSD
|
||||
|
||||
_MainTex@Hidden/Universal Render Pipeline/Bloom
|
||||
|
||||
_MainTex@Hidden/Universal
|
||||
Render Pipeline/BokehDepthOfField
|
||||
|
||||
_MainTex@Hidden/Universal Render Pipeline/CameraMotionBlur
|
||||
|
||||
_MainTex@Hidden/Universal
|
||||
Render Pipeline/GaussianDepthOfField
|
||||
|
||||
_MainTex@Hidden/Universal Render Pipeline/PaniniProjection
|
||||
|
||||
_MainTex@Hidden/Universal
|
||||
Render Pipeline/Sampling
|
||||
|
||||
_MainTex@Hidden/Universal Render Pipeline/Stop
|
||||
NaN
|
||||
|
||||
_BaseMap@Hidden/Universal Render Pipeline/Terrain/Lit (Add Pass)
|
||||
|
||||
_MainTex@Hidden/Universal
|
||||
Render Pipeline/Terrain/Lit (Base Pass)
|
||||
|
||||
_MainTex@Lean/Common/Alpha
|
||||
|
||||
_MainTex@Lean/Common/Object
|
||||
|
||||
_MainTex@Paint
|
||||
in 3D/Alpha
|
||||
|
||||
_MainTex@Paint in 3D/Overlay
|
||||
|
||||
_MainTex@Paint in 3D/Solid
|
||||
|
||||
_MainTex@Paint
|
||||
in 3D/Shield
|
||||
|
||||
_BASE_COLOR_MAP@Shader Graphs/ArnoldStandardSurface
|
||||
|
||||
_BASE_COLOR_MAP@Shader
|
||||
Graphs/ArnoldStandardSurfaceTransparent
|
||||
|
||||
_BASE_COLOR_MAP@Shader Graphs/PhysicalMaterial3DsMax
|
||||
|
||||
_BASE_COLOR_MAP@Shader
|
||||
Graphs/PhysicalMaterial3DsMaxTransparent
|
||||
|
||||
_MainTex@Universal Render Pipeline/2D/Sprite-Lit-Default
|
||||
|
||||
_MainTex@Universal
|
||||
Render Pipeline/Autodesk Interactive/Autodesk Interactive
|
||||
|
||||
_MainTex@Universal
|
||||
Render Pipeline/Autodesk Interactive/Autodesk Interactive Masked
|
||||
|
||||
_MainTex@Universal
|
||||
Render Pipeline/Autodesk Interactive/Autodesk Interactive Transparent
|
||||
|
||||
_BaseMap@Universal
|
||||
Render Pipeline/Baked Lit
|
||||
|
||||
_BaseMap@Universal Render Pipeline/Lit
|
||||
|
||||
_MainTex@Universal
|
||||
Render Pipeline/Nature/SpeedTree7
|
||||
|
||||
_MainTex@Universal Render Pipeline/Nature/SpeedTree7
|
||||
Billboard
|
||||
|
||||
_MainTex@Universal Render Pipeline/Nature/SpeedTree8
|
||||
|
||||
_BaseMap@Universal
|
||||
Render Pipeline/Particles/Lit
|
||||
|
||||
_BaseMap@Universal Render Pipeline/Particles/Simple
|
||||
Lit
|
||||
|
||||
_BaseMap@Universal Render Pipeline/Particles/Unlit
|
||||
|
||||
_BaseMap@Universal
|
||||
Render Pipeline/Simple Lit
|
||||
|
||||
_MainTex@Universal Render Pipeline/Terrain/Lit
|
||||
|
||||
_BaseMap@Universal
|
||||
Render Pipeline/Unlit
|
||||
|
||||
_MainTex@Unlit/ARCoreBackground'
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c8362b4eaf334244bf601ca708c1842
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Albedo (RGB) Smoothness (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 5
|
||||
textureDatas:
|
||||
- Name: Albedo
|
||||
BlendMode:
|
||||
Index: 0
|
||||
Texture: {fileID: 0}
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Channels: {x: 1, y: 1, z: 1, w: 0}
|
||||
- Name: Smoothness
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Texture: {fileID: 0}
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Channels: {x: 0, y: 0, z: 0, w: 1}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b75998f29caeae041aafabacbea2d802
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: DUMMY
|
||||
m_EditorClassIdentifier:
|
||||
index: -1
|
||||
textureDatas: []
|
||||
shaderData:
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d0db8699378a03409a196967e8151f6
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Detail Mask (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 80
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70e58b612ef2f6c4b92b148954aaed7b
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,85 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Emission (RGB)
|
||||
m_EditorClassIdentifier:
|
||||
index: 60
|
||||
textureDatas:
|
||||
- Name: Emission
|
||||
BlendMode:
|
||||
Index: 0
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 1, y: 1, z: 1, w: 0}
|
||||
shaderData: '_EmissionMap@Standard (Specular setup)
|
||||
|
||||
_EmissionMap@Standard
|
||||
|
||||
_EmissionMap@Autodesk
|
||||
Interactive
|
||||
|
||||
_EmissionMap@Particles/Standard Surface
|
||||
|
||||
_EmissionMap@Particles/Standard
|
||||
Unlit
|
||||
|
||||
_EMISSION_COLOR_MAP@HDRP/3DSMaxPhysicalMaterial/PhysicalMaterial3DsMax
|
||||
|
||||
_EMISSION_COLOR_MAP@HDRP/ArnoldStandardSurface/ArnoldStandardSurface
|
||||
|
||||
_EmissionMap@HDRP/Autodesk
|
||||
Interactive/AutodeskInteractive
|
||||
|
||||
_EmissionMap@HDRP/Autodesk Interactive/AutodeskInteractiveMasked
|
||||
|
||||
_EmissionMap@HDRP/Autodesk
|
||||
Interactive/AutodeskInteractiveTransparent
|
||||
|
||||
_EmissionMap@Paint in 3D/Alpha
|
||||
|
||||
_EmissionMap@Paint
|
||||
in 3D/Overlay
|
||||
|
||||
_EmissionMap@Paint in 3D/Solid
|
||||
|
||||
_EMISSION_COLOR_MAP@Shader
|
||||
Graphs/ArnoldStandardSurface
|
||||
|
||||
_EMISSION_COLOR_MAP@Shader Graphs/ArnoldStandardSurfaceTransparent
|
||||
|
||||
_EMISSION_COLOR_MAP@Shader
|
||||
Graphs/PhysicalMaterial3DsMax
|
||||
|
||||
_EMISSION_COLOR_MAP@Shader Graphs/PhysicalMaterial3DsMaxTransparent
|
||||
|
||||
_EmissionMap@Universal
|
||||
Render Pipeline/Autodesk Interactive/Autodesk Interactive
|
||||
|
||||
_EmissionMap@Universal
|
||||
Render Pipeline/Autodesk Interactive/Autodesk Interactive Masked
|
||||
|
||||
_EmissionMap@Universal
|
||||
Render Pipeline/Autodesk Interactive/Autodesk Interactive Transparent
|
||||
|
||||
_EmissionMap@Universal
|
||||
Render Pipeline/Lit
|
||||
|
||||
_EmissionMap@Universal Render Pipeline/Particles/Lit
|
||||
|
||||
_EmissionMap@Universal
|
||||
Render Pipeline/Particles/Simple Lit
|
||||
|
||||
_EmissionMap@Universal Render Pipeline/Particles/Unlit
|
||||
|
||||
_EmissionMap@Universal
|
||||
Render Pipeline/Simple Lit'
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4171cf205cd31849ade2a5dd1547533
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Height (G)
|
||||
m_EditorClassIdentifier:
|
||||
index: 70
|
||||
textureDatas:
|
||||
- Name: Height
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 0, y: 1, z: 0, w: 0}
|
||||
shaderData: "_ParallaxMap@Standard (Specular setup)\r\n_ParallaxMap@Standard\r\n_ParallaxMap@Autodesk
|
||||
Interactive\r\n_ParallaxMap@Legacy Shaders/Parallax Diffuse\r\n_ParallaxMap@Legacy
|
||||
Shaders/Parallax Specular\r\n_ParallaxMap@Legacy Shaders/Self-Illumin/Parallax
|
||||
Diffuse\r\n_ParallaxMap@Legacy Shaders/Self-Illumin/Parallax Specular\r\n_ParallaxMap@Legacy
|
||||
Shaders/Reflective/Parallax Diffuse\r\n_ParallaxMap@Legacy Shaders/Reflective/Parallax
|
||||
Specular\r\n_ParallaxMap@Legacy Shaders/Transparent/Parallax Diffuse\r\n_ParallaxMap@Legacy
|
||||
Shaders/Transparent/Parallax Specular"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eedf95189979544ba46b1e2c9cb877a
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Mask (R)
|
||||
m_EditorClassIdentifier:
|
||||
index: 100
|
||||
textureDatas: []
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fca6a40135ff9ac4e856584ca9a01515
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,46 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Metallic (R) Occlusion (G) Smoothness (B)
|
||||
m_EditorClassIdentifier:
|
||||
index: 25
|
||||
textureDatas:
|
||||
- Name: Metallic
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 1, y: 0, z: 0, w: 0}
|
||||
- Name: Occlusion
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 0, y: 1, z: 0, w: 0}
|
||||
- Name: Smoothness
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 0, y: 0, z: 1, w: 0}
|
||||
shaderData: '_MetallicGlossMap@Paint in 3D/Solid Height
|
||||
|
||||
_MetallicGlossMap@Paint
|
||||
in 3D/Solid
|
||||
|
||||
_MetallicGlossMap@Paint in 3D/Alpha
|
||||
|
||||
_MetallicGlossMap@Paint
|
||||
in 3D/Overlay'
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfdd0186a63b9214bbeee45507fbc96c
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Metallic (R) Smoothness (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 20
|
||||
textureDatas:
|
||||
- Name: Metallic
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Texture: {fileID: 0}
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Channels: {x: 1, y: 0, z: 0, w: 0}
|
||||
- Name: Smoothness
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Texture: {fileID: 0}
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Channels: {x: 0, y: 0, z: 0, w: 1}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66000d9a5d9a3aa4a8b0bde375276304
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,190 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Normal (RGBA)
|
||||
m_EditorClassIdentifier:
|
||||
index: 10
|
||||
textureDatas:
|
||||
- Name: Normal
|
||||
BlendMode:
|
||||
Index: 13
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 1, y: 1, z: 1, w: 1}
|
||||
shaderData: '_BumpMap@Standard (Specular setup)
|
||||
|
||||
_BumpMap@Standard
|
||||
|
||||
_BumpMap@Autodesk
|
||||
Interactive
|
||||
|
||||
_BumpMap@Legacy Shaders/Bumped Diffuse
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Bumped Specular
|
||||
|
||||
_BumpMap@Legacy Shaders/Self-Illumin/Bumped Diffuse
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Self-Illumin/Bumped Specular
|
||||
|
||||
_BumpMap@Legacy Shaders/Reflective/Bumped
|
||||
Unlit
|
||||
|
||||
_BumpMap@Legacy Shaders/Reflective/Bumped Diffuse
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Reflective/Bumped VertexLit
|
||||
|
||||
_BumpMap@Legacy Shaders/Reflective/Bumped
|
||||
Specular
|
||||
|
||||
_BumpMap@Legacy Shaders/Transparent/Bumped Diffuse
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Transparent/Bumped Specular
|
||||
|
||||
_BumpMap@Legacy Shaders/Transparent/Cutout/Bumped
|
||||
Diffuse
|
||||
|
||||
_BumpMap@Legacy Shaders/Transparent/Cutout/Bumped Specular
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Parallax Diffuse
|
||||
|
||||
_BumpMap@Legacy Shaders/Parallax Specular
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Self-Illumin/Parallax Diffuse
|
||||
|
||||
_BumpMap@Legacy Shaders/Self-Illumin/Parallax
|
||||
Specular
|
||||
|
||||
_BumpMap@Legacy Shaders/Reflective/Parallax Diffuse
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Reflective/Parallax Specular
|
||||
|
||||
_BumpMap@Legacy Shaders/Transparent/Parallax
|
||||
Diffuse
|
||||
|
||||
_BumpMap@Legacy Shaders/Transparent/Parallax Specular
|
||||
|
||||
_BumpMap@Particles/Standard
|
||||
Surface
|
||||
|
||||
_BumpMap@Particles/Standard Unlit
|
||||
|
||||
_NormalTex@Hidden/TerrainEngine/CameraFacingBillboardTree
|
||||
|
||||
_BumpMap@Legacy
|
||||
Shaders/Lightmapped/Bumped Diffuse
|
||||
|
||||
_BumpMap@Legacy Shaders/Lightmapped/Bumped
|
||||
Specular
|
||||
|
||||
_BumpMap@Nature/Tree Creator Bark
|
||||
|
||||
_BumpMap@Nature/Tree Creator
|
||||
Leaves
|
||||
|
||||
_BumpMap@Mobile/Bumped Diffuse
|
||||
|
||||
_BumpMap@Mobile/Bumped Specular
|
||||
|
||||
_BumpMap@Mobile/Bumped
|
||||
Specular (1 Directional Realtime Light)
|
||||
|
||||
_MainBump@UI/Lit/Bumped
|
||||
|
||||
_MainBump@UI/Lit/Detail
|
||||
|
||||
_MainBump@UI/Lit/Refraction
|
||||
|
||||
_MainBump@UI/Lit/Refraction
|
||||
Detail
|
||||
|
||||
_BumpMap@Nature/SpeedTree
|
||||
|
||||
_BumpMap@Nature/SpeedTree Billboard
|
||||
|
||||
_BumpMap@Nature/SpeedTree8
|
||||
|
||||
_BUMP_MAP@HDRP/3DSMaxPhysicalMaterial/PhysicalMaterial3DsMax
|
||||
|
||||
_NORMAL_MAP@HDRP/ArnoldStandardSurface/ArnoldStandardSurface
|
||||
|
||||
_BumpMap@HDRP/Autodesk
|
||||
Interactive/AutodeskInteractive
|
||||
|
||||
_BumpMap@HDRP/Autodesk Interactive/AutodeskInteractiveMasked
|
||||
|
||||
_BumpMap@HDRP/Autodesk
|
||||
Interactive/AutodeskInteractiveTransparent
|
||||
|
||||
_NormalMap@HDRP/Decal
|
||||
|
||||
_NormalMap@HDRP/Lit
|
||||
|
||||
_BumpMap@Paint
|
||||
in 3D/Alpha
|
||||
|
||||
_BumpMap@Paint in 3D/Overlay
|
||||
|
||||
_BumpMap@Paint in 3D/Solid
|
||||
|
||||
_NORMAL_MAP@Shader
|
||||
Graphs/ArnoldStandardSurface
|
||||
|
||||
_NORMAL_MAP@Shader Graphs/ArnoldStandardSurfaceTransparent
|
||||
|
||||
_BUMP_MAP@Shader
|
||||
Graphs/PhysicalMaterial3DsMax
|
||||
|
||||
_BUMP_MAP@Shader Graphs/PhysicalMaterial3DsMaxTransparent
|
||||
|
||||
_NormalMap@Universal
|
||||
Render Pipeline/2D/Sprite-Lit-Default
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Autodesk
|
||||
Interactive/Autodesk Interactive
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Autodesk
|
||||
Interactive/Autodesk Interactive Masked
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Autodesk
|
||||
Interactive/Autodesk Interactive Transparent
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Baked
|
||||
Lit
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Lit
|
||||
|
||||
_BumpMap@Universal Render
|
||||
Pipeline/Nature/SpeedTree7
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Nature/SpeedTree7
|
||||
Billboard
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Nature/SpeedTree8
|
||||
|
||||
_BumpMap@Universal
|
||||
Render Pipeline/Particles/Lit
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Particles/Simple
|
||||
Lit
|
||||
|
||||
_BumpMap@Universal Render Pipeline/Particles/Unlit
|
||||
|
||||
_BumpMap@Universal
|
||||
Render Pipeline/Simple Lit'
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4233e2387ec3dce4eb32de4943791bdb
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Occlusion (G)
|
||||
m_EditorClassIdentifier:
|
||||
index: 30
|
||||
textureDatas:
|
||||
- Name: Occlusion
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 0, y: 1, z: 0, w: 0}
|
||||
shaderData: '_OcclusionMap@Standard (Specular setup)
|
||||
|
||||
_OcclusionMap@Standard
|
||||
|
||||
_OcclusionMap@Autodesk
|
||||
Interactive
|
||||
|
||||
_OcclusionMap@Universal Render Pipeline/Lit'
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 554ec2b77e4f9804082354532acc9b5c
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Albedo (RGB) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 90
|
||||
textureDatas: []
|
||||
shaderData: "_AlbedoTex@Paint in 3D/Solid\r\n_AlbedoTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af8ceb0f134a43f4e99e91a29fe3a08b
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Emission (R) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 96
|
||||
textureDatas: []
|
||||
shaderData: "_EmissionTex@Paint in 3D/Solid\r\n_EmissionTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e24cbc657581d95408dea2dca2c53acc
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Metallic (R) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 93
|
||||
textureDatas: []
|
||||
shaderData: "_MetallicTex@Paint in 3D/Solid\r\n_MetallicTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1e2459dd1a0d5743964162e04e9ec77
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Normal (RG) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 92
|
||||
textureDatas: []
|
||||
shaderData: "_NormalTex@Paint in 3D/Solid\r\n_NormalTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa5f06f085b86fa46b05dacc28d51995
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Occlusion (R) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 94
|
||||
textureDatas: []
|
||||
shaderData: "_OcclusionTex@Paint in 3D/Solid\r\n_OcclusionTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 735aebf878a20a944a455e560fb923eb
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Opacity (R) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 91
|
||||
textureDatas: []
|
||||
shaderData: "_OpacityTex@Paint in 3D/Solid\r\n_OpacityTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c77de99a031fa8a439c080883d718136
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Premultiplied Smoothness (R) Weight (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 95
|
||||
textureDatas: []
|
||||
shaderData: "_SmoothnessTex@Paint in 3D/Solid\r\n_SmoothnessTex@Paint in 3D/Alpha\r"
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2589ce3f0af8404cbf99c6a8354e806
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Smoothness (R)
|
||||
m_EditorClassIdentifier:
|
||||
index: 40
|
||||
textureDatas:
|
||||
- Name: Smoothness
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Texture: {fileID: 0}
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Channels: {x: 1, y: 0, z: 0, w: 0}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d87839011d16f94e8b25d154f5ef298
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Specular (RGB) Smoothness (A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 55
|
||||
textureDatas:
|
||||
- Name: Specular
|
||||
BlendMode:
|
||||
Index: 0
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 1, y: 1, z: 1, w: 0}
|
||||
- Name: Smoothness
|
||||
BlendMode:
|
||||
Index: 7
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Texture: {fileID: 0}
|
||||
Kernel: 1
|
||||
Channels: {x: 0, y: 0, z: 0, w: 1}
|
||||
shaderData: _SpecGlossMap@Universal Render Pipeline/Lit
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2db942975674d744ab78734f742431ae
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Specular (RGB)
|
||||
m_EditorClassIdentifier:
|
||||
index: 50
|
||||
textureDatas:
|
||||
- Name: Specular
|
||||
BlendMode:
|
||||
Index: 0
|
||||
Texture: {fileID: 0}
|
||||
Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
Channels: {x: 1, y: 1, z: 1, w: 0}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b3227425e998d249ab639eeff0e3beb
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
%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: f0b7bb1a755a97c419261f15b7ced2ca, type: 3}
|
||||
m_Name: Splat (R, G, B, A)
|
||||
m_EditorClassIdentifier:
|
||||
index: 110
|
||||
textureDatas: []
|
||||
shaderData:
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9772edea2d687a14a988505ee05733af
|
||||
timeCreated: 1575886731
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb59bd5072dab814ba71d78709e4346d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1125
LocalPackages/PaintIn3D/Runtime/PaintCore/Extras/Prefabs/Demo.prefab
Normal file
1125
LocalPackages/PaintIn3D/Runtime/PaintCore/Extras/Prefabs/Demo.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f43c82fa79085354ba883fd6d09728bc
|
||||
timeCreated: 1530602151
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab034f851f2fc8d49a1e174873a7c341
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component invokes the <b>Action</b> event when this component is enabled.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwActionOnEnable")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Action OnEnable")]
|
||||
public class CwActionOnEnable : MonoBehaviour
|
||||
{
|
||||
/// <summary>The event that will be invoked.</summary>
|
||||
public UnityEvent Action { get { if (action == null) action = new UnityEvent(); return action; } } [SerializeField] public UnityEvent action;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwActionOnEnable;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwActionOnEnable_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("action");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a22161647a5245e4d8c05411a11db616
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform the Clear action. This can be done by attaching it to a clickable object, or manually from the ClearAll method.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwButtonClearAll")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Button Clear All")]
|
||||
public class CwButtonClearAll : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
/// <summary>When clearing a texture, should its undo states be cleared too?</summary>
|
||||
public bool ClearStates { set { clearStates = value; } get { return clearStates; } } [SerializeField] private bool clearStates = true;
|
||||
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
ClearAll();
|
||||
}
|
||||
|
||||
[ContextMenu("Clear All")]
|
||||
public void ClearAll()
|
||||
{
|
||||
foreach (var paintableTexture in CwPaintableTexture.Instances)
|
||||
{
|
||||
paintableTexture.Clear();
|
||||
|
||||
if (clearStates == true)
|
||||
{
|
||||
paintableTexture.ClearStates();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwButtonClearAll;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwButtonClearAll_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("clearStates", "When clearing a texture, should its undo states be cleared too?");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0bf67d8662f038f49861f606e0df24d9
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform the Redo All action. This can be done by attaching it to a clickable object, or manually from the RedoAll method.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwButtonRedoAll")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Button Redo All")]
|
||||
public class CwButtonRedoAll : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
RedoAll();
|
||||
}
|
||||
|
||||
/// <summary>If you want to manually trigger RedoAll, then call this function.</summary>
|
||||
[ContextMenu("Redo All")]
|
||||
public void RedoAll()
|
||||
{
|
||||
CwStateManager.RedoAll();
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var group = GetComponent<CanvasGroup>();
|
||||
|
||||
if (group != null)
|
||||
{
|
||||
group.alpha = CwStateManager.CanRedo == true ? 1.0f : 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwButtonRedoAll;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwRedoAll_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Info("This component allows you to perform the Redo All action. This can be done by attaching it to a clickable object, or manually from the RedoAll method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63c8ec0284249304a8dbb451c3e5d9b8
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform the Undo All action. This can be done by attaching it to a clickable object, or manually from the RedoAll method.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwButtonUndoAll")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Button Undo All")]
|
||||
public class CwButtonUndoAll : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
UndoAll();
|
||||
}
|
||||
|
||||
/// <summary>If you want to manually trigger UndoAll, then call this function.</summary>
|
||||
[ContextMenu("Undo All")]
|
||||
public void UndoAll()
|
||||
{
|
||||
CwStateManager.UndoAll();
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var group = GetComponent<CanvasGroup>();
|
||||
|
||||
if (group != null)
|
||||
{
|
||||
group.alpha = CwStateManager.CanUndo == true ? 1.0f : 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwButtonUndoAll;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwUndoAll_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Info("This component allows you to perform the Undo All action. This can be done by attaching it to a clickable object, or manually from the UndoAll method.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b129deba32ff67c41ba03d5fe6890e32
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,127 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform an event when the specified <b>CwChangeCounter</b> instances are painted a specific amount.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwChangeCounterEvent")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Change Counter Event")]
|
||||
public class CwChangeCounterEvent : MonoBehaviour
|
||||
{
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// <b>None</b> = All active and enabled counters in the scene.</summary>
|
||||
public List<CwChangeCounter> Counters { get { if (counters == null) counters = new List<CwChangeCounter>(); return counters; } } [SerializeField] private List<CwChangeCounter> counters;
|
||||
|
||||
/// <summary>This paint ratio must be inside this range to be considered inside.</summary>
|
||||
public Vector2 Range { set { range = value; } get { return range; } } [SerializeField] private Vector2 range = new Vector2(0.0f, 1.0f);
|
||||
|
||||
/// <summary>This tells you if the paint ratio is within the current <b>Range</b>.</summary>
|
||||
public bool Inside { set { inside = value; } get { return inside; } } [SerializeField] private bool inside;
|
||||
|
||||
/// <summary>This event will be called on the first frame <b>Inside</b> becomes true.</summary>
|
||||
public UnityEvent OnInside { get { if (onInside == null) onInside = new UnityEvent(); return onInside; } } [SerializeField] private UnityEvent onInside;
|
||||
|
||||
/// <summary>This event will be called on the first frame <b>Inside</b> becomes false.</summary>
|
||||
public UnityEvent OnOutside { get { if (onOutside == null) onOutside = new UnityEvent(); return onOutside; } } [SerializeField] private UnityEvent onOutside;
|
||||
|
||||
/// <summary>This tells you the current paint ratio of the specified <b>Color</b>, where 0 is no paint, and 1 is fully painted.</summary>
|
||||
public float Ratio
|
||||
{
|
||||
get
|
||||
{
|
||||
var finalCounters = counters != null && counters.Count > 0 ? counters : null;
|
||||
|
||||
return CwChangeCounter.GetRatio(finalCounters);
|
||||
}
|
||||
}
|
||||
|
||||
public bool AllCountersReady
|
||||
{
|
||||
get
|
||||
{
|
||||
var finalCounters = counters != null && counters.Count > 0 ? counters : null;
|
||||
|
||||
return CwChangeCounter.GetReady(finalCounters);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (AllCountersReady == true)
|
||||
{
|
||||
UpdateInside(Ratio);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateInside(float ratio)
|
||||
{
|
||||
var newInside = default(bool);
|
||||
|
||||
// Change comparison to prevent overlap when using multiple ranges that begin and end at the same value
|
||||
if (range.y == 1.0f)
|
||||
{
|
||||
newInside = ratio >= range.x && ratio <= range.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
newInside = ratio >= range.x && ratio < range.y;
|
||||
}
|
||||
|
||||
if (inside == true && newInside == false)
|
||||
{
|
||||
inside = false;
|
||||
|
||||
if (onOutside != null)
|
||||
{
|
||||
onOutside.Invoke();
|
||||
}
|
||||
}
|
||||
else if (inside == false && newInside == true)
|
||||
{
|
||||
inside = true;
|
||||
|
||||
if (onInside != null)
|
||||
{
|
||||
onInside.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwChangeCounterEvent;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwChangeCounterEvent_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nNone = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
DrawMinMax("range", 0.0f, 1.0f, "This paint ratio must be inside this range to be considered inside.");
|
||||
|
||||
BeginDisabled(true);
|
||||
var ratio = tgt.Ratio;
|
||||
EditorGUILayout.MinMaxSlider(new GUIContent("Ratio", "This tells you the current paint ratio of the specified Color, where 0 is no paint, and 1 is fully painted."), ref ratio, ref ratio, 0.0f, 1.0f);
|
||||
EndDisabled();
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("inside", "This tells you if the paint ratio is within the current Range.");
|
||||
Draw("onInside", "This event will be called on the first frame Inside becomes true.");
|
||||
Draw("onOutside", "This event will be called on the first frame Inside becomes false.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f36f489a82ff224f8f056311b2f3f87
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component fills the attached UI Image based on the total amount of pixels that have been painted in the specified <b>CwChangeCounterFill</b> components.</summary>
|
||||
[RequireComponent(typeof(Image))]
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwChangeCounterFill")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Change Counter Fill")]
|
||||
public class CwChangeCounterFill : MonoBehaviour
|
||||
{
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// Zero = All active and enabled counters in the scene.</summary>
|
||||
public List<CwChangeCounter> Counters { get { if (counters == null) counters = new List<CwChangeCounter>(); return counters; } } [SerializeField] private List<CwChangeCounter> counters;
|
||||
|
||||
/// <summary>Inverse the fill?</summary>
|
||||
public bool Inverse { set { inverse = value; } get { return inverse; } } [SerializeField] private bool inverse;
|
||||
|
||||
[System.NonSerialized]
|
||||
private Image cachedImage;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
cachedImage = GetComponent<Image>();
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var finalCounters = counters.Count > 0 ? counters : null;
|
||||
var ratio = CwChangeCounter.GetRatio(finalCounters);
|
||||
|
||||
if (inverse == true)
|
||||
{
|
||||
ratio = 1.0f - ratio;
|
||||
}
|
||||
|
||||
cachedImage.fillAmount = Mathf.Clamp01(ratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwChangeCounterFill;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwChangeCounterFill_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nZero = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("inverse", "Inverse the fill?");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44f659a7130b0024a9af827de28bb55d
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,88 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component will output the total pixels for the specified team to a UI Text component.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwChangeCounterText")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Change Counter Text")]
|
||||
public class CwChangeCounterText : MonoBehaviour
|
||||
{
|
||||
[System.Serializable] public class StringEvent : UnityEvent<string> {}
|
||||
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// Zero = All active and enabled counters in the scene.</summary>
|
||||
public List<CwChangeCounter> Counters { get { if (counters == null) counters = new List<CwChangeCounter>(); return counters; } } [SerializeField] private List<CwChangeCounter> counters;
|
||||
|
||||
/// <summary>Inverse the <b>Count</b> and <b>Percent</b> values?</summary>
|
||||
public bool Inverse { set { inverse = value; } get { return inverse; } } [SerializeField] private bool inverse;
|
||||
|
||||
/// <summary>This allows you to set the amount of decimal places when using the percentage output.</summary>
|
||||
public int DecimalPlaces { set { decimalPlaces = value; } get { return decimalPlaces; } } [SerializeField] private int decimalPlaces;
|
||||
|
||||
/// <summary>This allows you to set the format of the team text. You can use the following tokens:
|
||||
/// {TOTAL} = Total amount of pixels that can be painted.
|
||||
/// {COUNT} = Total amount of pixel that have been painted.
|
||||
/// {PERCENT} = Percentage of pixels that have been painted.</summary>
|
||||
public string Format { set { format = value; } get { return format; } } [Multiline] [SerializeField] private string format = "{PERCENT}";
|
||||
|
||||
/// <summary>The color count will be output via this event.</summary>
|
||||
public StringEvent OnString { get { if (onString == null) onString = new StringEvent(); return onString; } } [SerializeField] private StringEvent onString;
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var finalCounters = counters.Count > 0 ? counters : null;
|
||||
var total = CwChangeCounter.GetTotal(finalCounters);
|
||||
var count = CwChangeCounter.GetCount(finalCounters);
|
||||
|
||||
if (inverse == true)
|
||||
{
|
||||
count = total - count;
|
||||
}
|
||||
|
||||
var final = format;
|
||||
var percent = CwCommon.RatioToPercentage(CwHelper.Divide(count, total), decimalPlaces);
|
||||
|
||||
final = final.Replace("{TOTAL}", total.ToString());
|
||||
final = final.Replace("{COUNT}", count.ToString());
|
||||
final = final.Replace("{PERCENT}", percent.ToString());
|
||||
|
||||
if (onString != null)
|
||||
{
|
||||
onString.Invoke(final);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwChangeCounterText;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwChangeCounterText_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nZero = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("inverse", "Inverse the Count and Percent values?");
|
||||
Draw("decimalPlaces", "This allows you to set the amount of decimal places when using the percentage output.");
|
||||
Draw("format", "This allows you to set the format of the team text. You can use the following tokens:\n\n{TOTAL} = Total amount of pixels that can be painted.\n\n{COUNT} = Total amount of pixel that have been painted.\n\n{PERCENT} = Percentage of pixels that have been painted.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("onString");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9784f6d7962272c4999a0a1275ef0d5a
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,147 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform an event when the specified <b>CwChannelCounter</b> instances are painted a specific amount.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwChannelCounterEvent")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Channel Counter Event")]
|
||||
public class CwChannelCounterEvent : MonoBehaviour
|
||||
{
|
||||
public enum ChannelType
|
||||
{
|
||||
Red,
|
||||
Green,
|
||||
Blue,
|
||||
Alpha
|
||||
}
|
||||
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// <b>None</b> = All active and enabled counters in the scene.</summary>
|
||||
public List<CwChannelCounter> Counters { get { if (counters == null) counters = new List<CwChannelCounter>(); return counters; } } [SerializeField] private List<CwChannelCounter> counters;
|
||||
|
||||
/// <summary>This allows you to choose which channel will be output to the UI Text.</summary>
|
||||
public ChannelType Channel { set { channel = value; } get { return channel; } } [SerializeField] private ChannelType channel = ChannelType.Alpha;
|
||||
|
||||
/// <summary>This paint ratio must be inside this range to be considered inside.</summary>
|
||||
public Vector2 Range { set { range = value; } get { return range; } } [SerializeField] private Vector2 range = new Vector2(0.0f, 1.0f);
|
||||
|
||||
/// <summary>This tells you if the paint ratio is within the current <b>Range</b>.</summary>
|
||||
public bool Inside { set { inside = value; } get { return inside; } } [SerializeField] private bool inside;
|
||||
|
||||
/// <summary>This event will be called on the first frame <b>Inside</b> becomes true.</summary>
|
||||
public UnityEvent OnInside { get { if (onInside == null) onInside = new UnityEvent(); return onInside; } } [SerializeField] private UnityEvent onInside;
|
||||
|
||||
/// <summary>This event will be called on the first frame <b>Inside</b> becomes false.</summary>
|
||||
public UnityEvent OnOutside { get { if (onOutside == null) onOutside = new UnityEvent(); return onOutside; } } [SerializeField] private UnityEvent onOutside;
|
||||
|
||||
/// <summary>This tells you the current paint ratio of the specified <b>Channel</b>, where 0 is no paint, and 1 is fully painted.</summary>
|
||||
public float Ratio
|
||||
{
|
||||
get
|
||||
{
|
||||
var finalCounters = counters != null && counters.Count > 0 ? counters : null;
|
||||
|
||||
switch (channel)
|
||||
{
|
||||
case ChannelType.Red: return CwChannelCounter.GetRatioR(finalCounters);
|
||||
case ChannelType.Green: return CwChannelCounter.GetRatioG(finalCounters);
|
||||
case ChannelType.Blue: return CwChannelCounter.GetRatioB(finalCounters);
|
||||
case ChannelType.Alpha: return CwChannelCounter.GetRatioA(finalCounters);
|
||||
}
|
||||
|
||||
return default(float);
|
||||
}
|
||||
}
|
||||
|
||||
public bool AllCountersReady
|
||||
{
|
||||
get
|
||||
{
|
||||
var finalCounters = counters != null && counters.Count > 0 ? counters : null;
|
||||
|
||||
return CwChannelCounter.GetReady(finalCounters);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (AllCountersReady == true)
|
||||
{
|
||||
UpdateInside(Ratio);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateInside(float ratio)
|
||||
{
|
||||
var newInside = default(bool);
|
||||
|
||||
// Change comparison to prevent overlap when using multiple ranges that begin and end at the same value
|
||||
if (range.y == 1.0f)
|
||||
{
|
||||
newInside = ratio >= range.x && ratio <= range.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
newInside = ratio >= range.x && ratio < range.y;
|
||||
}
|
||||
|
||||
if (inside == true && newInside == false)
|
||||
{
|
||||
inside = false;
|
||||
|
||||
if (onOutside != null)
|
||||
{
|
||||
onOutside.Invoke();
|
||||
}
|
||||
}
|
||||
else if (inside == false && newInside == true)
|
||||
{
|
||||
inside = true;
|
||||
|
||||
if (onInside != null)
|
||||
{
|
||||
onInside.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwChannelCounterEvent;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwChannelCounterEvent_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nNone = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("channel", "This allows you to choose which channel will be output to the UI Text.");
|
||||
DrawMinMax("range", 0.0f, 1.0f, "This paint ratio must be inside this range to be considered inside.");
|
||||
|
||||
BeginDisabled(true);
|
||||
var ratio = tgt.Ratio;
|
||||
EditorGUILayout.MinMaxSlider(new GUIContent("Ratio", "This tells you the current paint ratio of the specified Channel, where 0 is no paint, and 1 is fully painted."), ref ratio, ref ratio, 0.0f, 1.0f);
|
||||
EndDisabled();
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("inside", "This tells you if the paint ratio is within the current Range.");
|
||||
Draw("onInside", "This event will be called on the first frame Inside becomes true.");
|
||||
Draw("onOutside", "This event will be called on the first frame Inside becomes false.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e1cec11ae247704ba9fd00fcad1a6f3
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component fills the attached UI Image based on the total amount of opaque pixels that have been painted in all active and enabled <b>CwChannelCounter</b> components in the scene.</summary>
|
||||
[RequireComponent(typeof(Image))]
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwChannelCounterFill")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Channel Counter Fill")]
|
||||
public class CwChannelCounterFill : MonoBehaviour
|
||||
{
|
||||
public enum ChannelType
|
||||
{
|
||||
Red,
|
||||
Green,
|
||||
Blue,
|
||||
Alpha
|
||||
}
|
||||
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// Zero = All active and enabled counters in the scene.</summary>
|
||||
public List<CwChannelCounter> Counters { get { if (counters == null) counters = new List<CwChannelCounter>(); return counters; } } [SerializeField] private List<CwChannelCounter> counters;
|
||||
|
||||
/// <summary>This allows you to choose which channel will be output to the UI Image.</summary>
|
||||
public ChannelType Channel { set { channel = value; } get { return channel; } } [SerializeField] private ChannelType channel;
|
||||
|
||||
/// <summary>Inverse the fill?</summary>
|
||||
public bool Inverse { set { inverse = value; } get { return inverse; } } [SerializeField] private bool inverse;
|
||||
|
||||
[System.NonSerialized]
|
||||
private Image cachedImage;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
cachedImage = GetComponent<Image>();
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var finalCounters = counters.Count > 0 ? counters : null;
|
||||
var ratio = 0.0f;
|
||||
|
||||
switch (channel)
|
||||
{
|
||||
case ChannelType.Red: ratio = CwChannelCounter.GetRatioR(finalCounters); break;
|
||||
case ChannelType.Green: ratio = CwChannelCounter.GetRatioG(finalCounters); break;
|
||||
case ChannelType.Blue: ratio = CwChannelCounter.GetRatioB(finalCounters); break;
|
||||
case ChannelType.Alpha: ratio = CwChannelCounter.GetRatioA(finalCounters); break;
|
||||
}
|
||||
|
||||
if (inverse == true)
|
||||
{
|
||||
ratio = 1.0f - ratio;
|
||||
}
|
||||
|
||||
cachedImage.fillAmount = Mathf.Clamp01(ratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwChannelCounterFill;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwChannelCounterFill_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nZero = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("channel", "This allows you to choose which channel will be output to the UI Image.");
|
||||
Draw("inverse", "Inverse the fill?");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7a5f01a1865bc24cbfeb97ef8805b4d
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,108 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to output the totals of all the specified pixel counters to a UI Text component.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwChannelCounterText")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Channel Counter Text")]
|
||||
public class CwChannelCounterText : MonoBehaviour
|
||||
{
|
||||
[System.Serializable] public class StringEvent : UnityEvent<string> {}
|
||||
|
||||
public enum ChannelType
|
||||
{
|
||||
Red,
|
||||
Green,
|
||||
Blue,
|
||||
Alpha
|
||||
}
|
||||
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// Zero = All active and enabled counters in the scene.</summary>
|
||||
public List<CwChannelCounter> Counters { get { if (counters == null) counters = new List<CwChannelCounter>(); return counters; } } [SerializeField] private List<CwChannelCounter> counters;
|
||||
|
||||
/// <summary>This allows you to choose which channel will be output to the UI Text.</summary>
|
||||
public ChannelType Channel { set { channel = value; } get { return channel; } } [SerializeField] private ChannelType channel;
|
||||
|
||||
/// <summary>Inverse the <b>Count</b> and <b>Percent</b> values?</summary>
|
||||
public bool Inverse { set { inverse = value; } get { return inverse; } } [SerializeField] private bool inverse;
|
||||
|
||||
/// <summary>This allows you to set the amount of decimal places when using the percentage output.</summary>
|
||||
public int DecimalPlaces { set { decimalPlaces = value; } get { return decimalPlaces; } } [SerializeField] private int decimalPlaces;
|
||||
|
||||
/// <summary>This allows you to set the format of the team text. You can use the following tokens:
|
||||
/// {TOTAL} = Total amount of pixels that can be painted.
|
||||
/// {COUNT} = Total amount of pixel that have been painted.
|
||||
/// {PERCENT} = Percentage of pixels that have been painted.</summary>
|
||||
public string Format { set { format = value; } get { return format; } } [Multiline] [SerializeField] private string format = "{PERCENT}";
|
||||
|
||||
/// <summary>The color count will be output via this event.</summary>
|
||||
public StringEvent OnString { get { if (onString == null) onString = new StringEvent(); return onString; } } [SerializeField] private StringEvent onString;
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var finalCounters = counters.Count > 0 ? counters : null;
|
||||
var total = CwChannelCounter.GetTotal(finalCounters);
|
||||
var count = default(long);
|
||||
|
||||
switch (channel)
|
||||
{
|
||||
case ChannelType.Red: count = CwChannelCounter.GetCountR(finalCounters); break;
|
||||
case ChannelType.Green: count = CwChannelCounter.GetCountG(finalCounters); break;
|
||||
case ChannelType.Blue: count = CwChannelCounter.GetCountB(finalCounters); break;
|
||||
case ChannelType.Alpha: count = CwChannelCounter.GetCountA(finalCounters); break;
|
||||
}
|
||||
|
||||
if (inverse == true)
|
||||
{
|
||||
count = total - count;
|
||||
}
|
||||
|
||||
var final = format;
|
||||
var percent = CwCommon.RatioToPercentage(CwHelper.Divide(count, total), decimalPlaces);
|
||||
|
||||
final = final.Replace("{TOTAL}", total.ToString());
|
||||
final = final.Replace("{COUNT}", count.ToString());
|
||||
final = final.Replace("{PERCENT}", percent.ToString());
|
||||
|
||||
if (onString != null)
|
||||
{
|
||||
onString.Invoke(final);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwChannelCounterText;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwChannelCounterText_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nZero = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("channel", "This allows you to choose which channel will be output to the UI Text.");
|
||||
Draw("inverse", "Inverse the Count and Percent values?");
|
||||
Draw("decimalPlaces", "This allows you to set the amount of decimal places when using the percentage output.");
|
||||
Draw("format", "This allows you to set the format of the team text. You can use the following tokens:\n\n{TOTAL} = Total amount of pixels that can be painted.\n\n{COUNT} = Total amount of pixel that have been painted.\n\n{PERCENT} = Percentage of pixels that have been painted.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("onString");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e76845ae3a2deec40858e278575ab4ea
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,133 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform an event when the specified <b>CwColorCounter</b> instances are painted a specific amount.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwColorCounterEvent")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Color Counter Event")]
|
||||
public class CwColorCounterEvent : MonoBehaviour
|
||||
{
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// <b>None</b> = All active and enabled counters in the scene.</summary>
|
||||
public List<CwColorCounter> Counters { get { if (counters == null) counters = new List<CwColorCounter>(); return counters; } } [SerializeField] private List<CwColorCounter> counters;
|
||||
|
||||
/// <summary>This allows you to set which color will be handled by this component.</summary>
|
||||
public CwColor Color { set { color = value; } get { return color; } } [SerializeField] private CwColor color;
|
||||
|
||||
/// <summary>This paint ratio must be inside this range to be considered inside.</summary>
|
||||
public Vector2 Range { set { range = value; } get { return range; } } [SerializeField] private Vector2 range = new Vector2(0.0f, 1.0f);
|
||||
|
||||
/// <summary>This tells you if the paint ratio is within the current <b>Range</b>.</summary>
|
||||
public bool Inside { set { inside = value; } get { return inside; } } [SerializeField] private bool inside;
|
||||
|
||||
/// <summary>This event will be called on the first frame <b>Inside</b> becomes true.</summary>
|
||||
public UnityEvent OnInside { get { if (onInside == null) onInside = new UnityEvent(); return onInside; } } [SerializeField] private UnityEvent onInside;
|
||||
|
||||
/// <summary>This event will be called on the first frame <b>Inside</b> becomes false.</summary>
|
||||
public UnityEvent OnOutside { get { if (onOutside == null) onOutside = new UnityEvent(); return onOutside; } } [SerializeField] private UnityEvent onOutside;
|
||||
|
||||
/// <summary>This tells you the current paint ratio of the specified <b>Color</b>, where 0 is no paint, and 1 is fully painted.</summary>
|
||||
public float Ratio
|
||||
{
|
||||
get
|
||||
{
|
||||
var finalCounters = counters != null && counters.Count > 0 ? counters : null;
|
||||
|
||||
return CwColorCounter.GetRatio(color, finalCounters);
|
||||
}
|
||||
}
|
||||
|
||||
public bool AllCountersReady
|
||||
{
|
||||
get
|
||||
{
|
||||
var finalCounters = counters != null && counters.Count > 0 ? counters : null;
|
||||
|
||||
return CwColorCounter.GetReady(finalCounters);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (AllCountersReady == true)
|
||||
{
|
||||
UpdateInside(Ratio);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateInside(float ratio)
|
||||
{
|
||||
var newInside = default(bool);
|
||||
|
||||
// Change comparison to prevent overlap when using multiple ranges that begin and end at the same value
|
||||
if (range.y == 1.0f)
|
||||
{
|
||||
newInside = ratio >= range.x && ratio <= range.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
newInside = ratio >= range.x && ratio < range.y;
|
||||
}
|
||||
|
||||
if (inside == true && newInside == false)
|
||||
{
|
||||
inside = false;
|
||||
|
||||
if (onOutside != null)
|
||||
{
|
||||
onOutside.Invoke();
|
||||
}
|
||||
}
|
||||
else if (inside == false && newInside == true)
|
||||
{
|
||||
inside = true;
|
||||
|
||||
if (onInside != null)
|
||||
{
|
||||
onInside.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwColorCounterEvent;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwColorCounterEvent_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nNone = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
BeginError(Any(tgts, t => t.Color == null));
|
||||
Draw("color", "This allows you to set which color will be handled by this component.");
|
||||
EndError();
|
||||
DrawMinMax("range", 0.0f, 1.0f, "This paint ratio must be inside this range to be considered inside.");
|
||||
|
||||
BeginDisabled(true);
|
||||
var ratio = tgt.Ratio;
|
||||
EditorGUILayout.MinMaxSlider(new GUIContent("Ratio", "This tells you the current paint ratio of the specified Color, where 0 is no paint, and 1 is fully painted."), ref ratio, ref ratio, 0.0f, 1.0f);
|
||||
EndDisabled();
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("inside", "This tells you if the paint ratio is within the current Range.");
|
||||
Draw("onInside", "This event will be called on the first frame Inside becomes true.");
|
||||
Draw("onOutside", "This event will be called on the first frame Inside becomes false.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a78581763ac008c4ea185c43d0c25394
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component fills the attached UI Image based on the total amount of pixels that have been painted in the specified <b>CwColorCounter</b> components.</summary>
|
||||
[RequireComponent(typeof(Image))]
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwColorCounterFill")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Color Counter Fill")]
|
||||
public class CwColorCounterFill : MonoBehaviour
|
||||
{
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// Zero = All active and enabled counters in the scene.</summary>
|
||||
public List<CwColorCounter> Counters { get { if (counters == null) counters = new List<CwColorCounter>(); return counters; } } [SerializeField] private List<CwColorCounter> counters;
|
||||
|
||||
/// <summary>This allows you to set which color will be handled by this component.</summary>
|
||||
public CwColor Color { set { color = value; } get { return color; } } [SerializeField] private CwColor color;
|
||||
|
||||
/// <summary>Inverse the fill?</summary>
|
||||
public bool Inverse { set { inverse = value; } get { return inverse; } } [SerializeField] private bool inverse;
|
||||
|
||||
[System.NonSerialized]
|
||||
private Image cachedImage;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
cachedImage = GetComponent<Image>();
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var finalCounters = counters.Count > 0 ? counters : null;
|
||||
var ratio = CwColorCounter.GetRatio(color, finalCounters);
|
||||
|
||||
if (inverse == true)
|
||||
{
|
||||
ratio = 1.0f - ratio;
|
||||
}
|
||||
|
||||
cachedImage.fillAmount = Mathf.Clamp01(ratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwColorCounterFill;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwColorCounterFill_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nZero = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
BeginError(Any(tgts, t => t.Color == null));
|
||||
Draw("color", "This allows you to set which color will be handled by this component.");
|
||||
EndError();
|
||||
Draw("inverse", "Inverse the fill?");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36324f738c3a5c6498043e1c0dc5499d
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,94 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component will output the total pixels for the specified color to the <b>OnString</b> event.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwColorCounterText")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Color Counter Text")]
|
||||
public class CwColorCounterText : MonoBehaviour
|
||||
{
|
||||
[System.Serializable] public class StringEvent : UnityEvent<string> {}
|
||||
|
||||
/// <summary>This allows you to specify the counters that will be used.
|
||||
/// Zero = All active and enabled counters in the scene.</summary>
|
||||
public List<CwColorCounter> Counters { get { if (counters == null) counters = new List<CwColorCounter>(); return counters; } } [SerializeField] private List<CwColorCounter> counters;
|
||||
|
||||
/// <summary>This allows you to set which color will be handled by this component.</summary>
|
||||
public CwColor Color { set { color = value; } get { return color; } } [SerializeField] private CwColor color;
|
||||
|
||||
/// <summary>Inverse the <b>Count</b> and <b>Percent</b> values?</summary>
|
||||
public bool Inverse { set { inverse = value; } get { return inverse; } } [SerializeField] private bool inverse;
|
||||
|
||||
/// <summary>This allows you to set the amount of decimal places when using the percentage output.</summary>
|
||||
public int DecimalPlaces { set { decimalPlaces = value; } get { return decimalPlaces; } } [SerializeField] private int decimalPlaces;
|
||||
|
||||
/// <summary>This allows you to set the format of the team text. You can use the following tokens:
|
||||
/// {TOTAL} = Total amount of pixels that can be painted.
|
||||
/// {COUNT} = Total amount of pixel that have been painted.
|
||||
/// {PERCENT} = Percentage of pixels that have been painted.</summary>
|
||||
public string Format { set { format = value; } get { return format; } } [Multiline] [SerializeField] private string format = "{PERCENT}";
|
||||
|
||||
/// <summary>The color count will be output via this event.</summary>
|
||||
public StringEvent OnString { get { if (onString == null) onString = new StringEvent(); return onString; } } [SerializeField] private StringEvent onString;
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
var finalCounters = counters.Count > 0 ? counters : null;
|
||||
var total = CwColorCounter.GetTotal(finalCounters);
|
||||
var count = CwColorCounter.GetCount(color, finalCounters);
|
||||
|
||||
if (inverse == true)
|
||||
{
|
||||
count = total - count;
|
||||
}
|
||||
|
||||
var final = format;
|
||||
var percent = CwCommon.RatioToPercentage(CwHelper.Divide(count, total), decimalPlaces);
|
||||
|
||||
final = final.Replace("{TOTAL}", total.ToString());
|
||||
final = final.Replace("{COUNT}", count.ToString());
|
||||
final = final.Replace("{PERCENT}", percent.ToString());
|
||||
|
||||
if (onString != null)
|
||||
{
|
||||
onString.Invoke(final);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwColorCounterText;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwTeamText_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("counters", "This allows you to specify the counters that will be used.\n\nZero = All active and enabled counters in the scene.");
|
||||
|
||||
Separator();
|
||||
|
||||
BeginError(Any(tgts, t => t.Color == null));
|
||||
Draw("color", "This allows you to set which color will be handled by this component.");
|
||||
EndError();
|
||||
Draw("inverse", "Inverse the Count and Percent values?");
|
||||
Draw("decimalPlaces", "This allows you to set the amount of decimal places when using the percentage output.");
|
||||
Draw("format", "This allows you to set the format of the team text. You can use the following tokens:\n\n{COLOR} = Name of the color.\n\n{TOTAL} = Total amount of pixels that can be painted.\n\n{COUNT} = Total amount of pixel that have been painted.\n\n{PERCENT} = Percentage of pixels that have been painted.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("onString");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d915fd34d42e57d4f806a0ff0f21168a
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,57 @@
|
||||
using UnityEngine;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component automatically destroys this GameObject after some time.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwDestroyAfterTime")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Destroy After Time")]
|
||||
public class CwDestroyAfterTime : MonoBehaviour
|
||||
{
|
||||
/// <summary>If this component has been active for this many seconds, the current GameObject will be destroyed.
|
||||
/// -1 = DestroyNow must be manually called.</summary>
|
||||
public float Seconds { set { seconds = value; } get { return seconds; } } [SerializeField] private float seconds = 5.0f;
|
||||
|
||||
[SerializeField]
|
||||
private float age;
|
||||
|
||||
[ContextMenu("Destroy Now")]
|
||||
public void DestroyNow()
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (seconds >= 0.0f)
|
||||
{
|
||||
age += Time.deltaTime;
|
||||
|
||||
if (age >= seconds)
|
||||
{
|
||||
DestroyNow();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwDestroyAfterTime;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwDestroyAfterTime_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("seconds", "If this component has been active for this many seconds, the current GameObject will be destroyed.\n-1 = DestroyNow must be manually called.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6f5033e3ef44444888c8e482ef15ad0
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
using UnityEngine;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component automatically destroys the specified GameObject when sent a hit point. Hit points will automatically be sent by any <b>CwHit___</b> component on this GameObject, or its ancestors.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwDestroyer")]
|
||||
[AddComponentMenu(PaintCore.CwCommon.ComponentHitMenuPrefix + "Destroyer")]
|
||||
public class CwDestroyer : MonoBehaviour, IHitPoint, IHitLine, IHitQuad
|
||||
{
|
||||
/// <summary>This GameObject will be destroyed.</summary>
|
||||
public GameObject Target { set { target = value; } get { return target; } } [SerializeField] private GameObject target;
|
||||
|
||||
[ContextMenu("Destroy Now")]
|
||||
public void DestroyNow()
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
public void HandleHitPoint(bool preview, int priority, float pressure, int seed, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
DestroyNow();
|
||||
}
|
||||
|
||||
public void HandleHitLine(bool preview, int priority, float pressure, int seed, Vector3 positionA, Vector3 positionB, Quaternion rotation, bool clip)
|
||||
{
|
||||
DestroyNow();
|
||||
}
|
||||
|
||||
public void HandleHitQuad(bool preview, int priority, float pressure, int seed, Vector3 positionA, Vector3 positionB, Vector3 positionC, Vector3 positionD, Quaternion rotation, bool clip)
|
||||
{
|
||||
DestroyNow();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected virtual void Reset()
|
||||
{
|
||||
target = gameObject;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwDestroyer;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwDestroyer_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
BeginError(Any(tgts, t => t.Target == null));
|
||||
Draw("target", "This GameObject will be destroyed.");
|
||||
EndError();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afef5f4836ceb7940889da8ecd864c64
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,67 @@
|
||||
using UnityEngine;
|
||||
using CW.Common;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component performs an action every time a paint hit is received. Hit points will automatically be sent by any <b>CwHit___</b> component on this GameObject, or its ancestors.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwPaintAction")]
|
||||
[AddComponentMenu(CwCommon.ComponentHitMenuPrefix + "Paint Action")]
|
||||
public class CwPaintAction : MonoBehaviour, IHitPoint, IHitLine, IHitTriangle, IHitQuad
|
||||
{
|
||||
/// <summary>The event that will be invoked.</summary>
|
||||
public UnityEvent Action { get { if (action == null) action = new UnityEvent(); return action; } } [SerializeField] public UnityEvent action;
|
||||
|
||||
public void HandleHitPoint(bool preview, int priority, float pressure, int seed, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleHitLine(bool preview, int priority, float pressure, int seed, Vector3 position, Vector3 endPosition, Quaternion rotation, bool clip)
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleHitTriangle(bool preview, int priority, float pressure, int seed, Vector3 positionA, Vector3 positionB, Vector3 positionC, Quaternion rotation)
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleHitQuad(bool preview, int priority, float pressure, int seed, Vector3 position, Vector3 endPosition, Vector3 position2, Vector3 endPosition2, Quaternion rotation, bool clip)
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwPaintAction;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwPaintAction_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("action");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0bfe6324ffd7fc49b443050935d105a
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,123 @@
|
||||
using UnityEngine;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to debug hit points into the <b>Scene</b> tab. Hit points will automatically be sent by any <b>CwHit___</b> component on this GameObject, or its ancestors.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwPaintDebug")]
|
||||
[AddComponentMenu(CwCommon.ComponentHitMenuPrefix + "Paint Debug")]
|
||||
public class CwPaintDebug : MonoBehaviour, IHitPoint, IHitLine, IHitTriangle, IHitQuad
|
||||
{
|
||||
/// <summary>The color of the debug.</summary>
|
||||
public Color Color { set { color = value; } get { return color; } } [SerializeField] private Color color = Color.white;
|
||||
|
||||
/// <summary>The duration of the debug.</summary>
|
||||
public float Duration { set { duration = value; } get { return duration; } } [SerializeField] private float duration = 0.05f;
|
||||
|
||||
/// <summary>The size of the debug.</summary>
|
||||
public float Size { set { size = value; } get { return size; } } [SerializeField] private float size = 0.05f;
|
||||
|
||||
public void HandleHitPoint(bool preview, int priority, float pressure, int seed, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
var tint = GetColor(preview, pressure, color);
|
||||
var back = position + rotation * new Vector3(0.0f, 0.0f, -size);
|
||||
|
||||
DrawArrow(position, rotation, tint);
|
||||
|
||||
Debug.DrawLine(position, back, tint, duration);
|
||||
}
|
||||
|
||||
public void HandleHitLine(bool preview, int priority, float pressure, int seed, Vector3 position, Vector3 endPosition, Quaternion rotation, bool clip)
|
||||
{
|
||||
var tint = GetColor(preview, pressure, color);
|
||||
|
||||
DrawArrow(endPosition, rotation, tint);
|
||||
|
||||
Debug.DrawLine(position, endPosition, tint, duration);
|
||||
}
|
||||
|
||||
public void HandleHitTriangle(bool preview, int priority, float pressure, int seed, Vector3 positionA, Vector3 positionB, Vector3 positionC, Quaternion rotation)
|
||||
{
|
||||
var tint = GetColor(preview, pressure, color);
|
||||
|
||||
DrawArrow(positionA, rotation, tint);
|
||||
DrawArrow(positionB, rotation, tint);
|
||||
DrawArrow(positionC, rotation, tint);
|
||||
|
||||
Debug.DrawLine(positionA, positionB, tint, duration);
|
||||
Debug.DrawLine(positionB, positionC, tint, duration);
|
||||
Debug.DrawLine(positionC, positionA, tint, duration);
|
||||
}
|
||||
|
||||
public void HandleHitQuad(bool preview, int priority, float pressure, int seed, Vector3 position, Vector3 endPosition, Vector3 position2, Vector3 endPosition2, Quaternion rotation, bool clip)
|
||||
{
|
||||
var tint = GetColor(preview, pressure, color);
|
||||
|
||||
DrawArrow(endPosition, rotation, tint);
|
||||
DrawArrow(endPosition2, rotation, tint);
|
||||
|
||||
Debug.DrawLine(position, endPosition, tint, duration);
|
||||
Debug.DrawLine(position2, endPosition2, tint, duration);
|
||||
Debug.DrawLine(position, position2, tint, duration);
|
||||
Debug.DrawLine(endPosition, endPosition2, tint, duration);
|
||||
}
|
||||
|
||||
private Color GetColor(bool preview, float pressure, Color color)
|
||||
{
|
||||
if (preview == true)
|
||||
{
|
||||
color.a *= 0.5f;
|
||||
}
|
||||
|
||||
color.a *= pressure * 0.75f + 0.25f;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
private void DrawArrow(Vector3 position, Quaternion rotation, Color tint)
|
||||
{
|
||||
var cornerA = position + rotation * new Vector3(-size, -size);
|
||||
var cornerB = position + rotation * new Vector3(-size, +size);
|
||||
var cornerC = position + rotation * new Vector3(+size, +size);
|
||||
var cornerD = position + rotation * new Vector3(+size, -size);
|
||||
|
||||
Debug.DrawLine(cornerA, cornerB, tint, duration);
|
||||
Debug.DrawLine(cornerB, cornerC, tint, duration);
|
||||
Debug.DrawLine(cornerC, cornerD, tint, duration);
|
||||
Debug.DrawLine(cornerD, cornerA, tint, duration);
|
||||
|
||||
var front = position + rotation * new Vector3(0.0f, 0.0f, +size);
|
||||
|
||||
Debug.DrawLine(front, cornerA, tint, duration);
|
||||
Debug.DrawLine(front, cornerB, tint, duration);
|
||||
Debug.DrawLine(front, cornerC, tint, duration);
|
||||
Debug.DrawLine(front, cornerD, tint, duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwPaintDebug;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwPaintDebug_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("color", "The color of the debug.");
|
||||
BeginError(Any(tgts, t => t.Duration <= 0.0f));
|
||||
Draw("duration", "The duration of the debug.");
|
||||
EndError();
|
||||
BeginError(Any(tgts, t => t.Size <= 0.0f));
|
||||
Draw("size", "The size of the debug.");
|
||||
EndError();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 551627f52224d054b84cab8d62b9ac52
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component allows you to perform an event when the attached <b>CwReadColor</b> component reads a specific color.</summary>
|
||||
[RequireComponent(typeof(CwReadColor))]
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwReadColorEvent")]
|
||||
[AddComponentMenu(CwCommon.ComponentMenuPrefix + "Read Color Event")]
|
||||
public class CwReadColorEvent : MonoBehaviour
|
||||
{
|
||||
[System.Serializable] public class ColorEvent : UnityEvent<Color> {}
|
||||
|
||||
/// <summary>This color we want to detect.</summary>
|
||||
public Color Color { set { color = value; } get { return color; } } [SerializeField] private Color color = Color.white;
|
||||
|
||||
/// <summary>The RGBA values must be within this range of a color for it to be counted.</summary>
|
||||
public float Threshold { set { threshold = value; } get { return threshold; } } [Range(0.0f, 1.0f)] [SerializeField] private float threshold = 0.1f;
|
||||
|
||||
/// <summary>When the expected color is read, this event will be invoked.
|
||||
/// Color = The expected color.</summary>
|
||||
public ColorEvent OnColor { get { if (onColor == null) onColor = new ColorEvent(); return onColor; } } [SerializeField] private ColorEvent onColor;
|
||||
|
||||
[System.NonSerialized]
|
||||
private CwReadColor cachedReadColor;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
cachedReadColor = GetComponent<CwReadColor>();
|
||||
|
||||
cachedReadColor.OnColor.AddListener(HandleColor);
|
||||
}
|
||||
|
||||
protected virtual void OnDisable()
|
||||
{
|
||||
cachedReadColor.OnColor.RemoveListener(HandleColor);
|
||||
}
|
||||
|
||||
private void HandleColor(Color read)
|
||||
{
|
||||
var color32 = (Color32)color;
|
||||
var read32 = (Color32)read;
|
||||
var threshold32 = (int)(threshold * 255.0f);
|
||||
var distance = 0;
|
||||
|
||||
distance += System.Math.Abs(color32.r - read32.r);
|
||||
distance += System.Math.Abs(color32.g - read32.g);
|
||||
distance += System.Math.Abs(color32.b - read32.b);
|
||||
distance += System.Math.Abs(color32.a - read32.a);
|
||||
|
||||
if (distance <= threshold32)
|
||||
{
|
||||
if (onColor != null)
|
||||
{
|
||||
onColor.Invoke(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwReadColorEvent;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwReadColorEvent_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("color", "This color we want to detect.");
|
||||
Draw("threshold", "The RGBA values must be within this range of a color for it to be counted.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("onColor");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2d98dbc29ff0fb4cbf759979358738b
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,112 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using CW.Common;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This allows you to spawn a prefab at a hit point. Hit points will automatically be sent by any <b>CwHit___</b> component on this GameObject, or its ancestors.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwSpawner")]
|
||||
[AddComponentMenu(CwCommon.ComponentHitMenuPrefix + "Spawner")]
|
||||
public class CwSpawner : MonoBehaviour, IHitPoint
|
||||
{
|
||||
/// <summary>A random prefab from this list will be spawned.</summary>
|
||||
public List<GameObject> Prefabs { get { if (prefabs == null) prefabs = new List<GameObject>(); return prefabs; } } [SerializeField] private List<GameObject> prefabs;
|
||||
|
||||
/// <summary>The spawned prefab will be randomly offset by a random point within this radius in world space.</summary>
|
||||
public float Radius { set { radius = value; } get { return radius; } } [SerializeField] private float radius;
|
||||
|
||||
/// <summary>If the prefab contains a <b>Rigidbody</b>, it will be given this velocity in local space.</summary>
|
||||
public Vector3 Velocity { set { velocity = value; } get { return velocity; } } [SerializeField] private Vector3 velocity;
|
||||
|
||||
/// <summary>The spawned prefab will be offset from the hit point based on the hit normal by this value in world space.</summary>
|
||||
public float OffsetNormal { set { offsetNormal = value; } get { return offsetNormal; } } [SerializeField] private float offsetNormal;
|
||||
|
||||
/// <summary>The spawned prefab will be offset from the hit point based on this value in world space.</summary>
|
||||
public Vector3 OffsetWorld { set { offsetWorld = value; } get { return offsetWorld; } } [SerializeField] private Vector3 offsetWorld;
|
||||
|
||||
// Legacy
|
||||
[SerializeField] private GameObject prefab;
|
||||
|
||||
/// <summary>Call this if you want to manually spawn the specified prefab.</summary>
|
||||
public void Spawn()
|
||||
{
|
||||
Spawn(transform.position, transform.rotation);
|
||||
}
|
||||
|
||||
public void Spawn(Vector3 position, Vector3 normal)
|
||||
{
|
||||
Spawn(position, Quaternion.LookRotation(normal));
|
||||
}
|
||||
|
||||
public void Spawn(Vector3 position, Quaternion rotation)
|
||||
{
|
||||
UpgradeLegacy();
|
||||
|
||||
if (prefabs != null && prefabs.Count > 0)
|
||||
{
|
||||
var finalPrefab = prefabs[Random.Range(0, prefabs.Count)];
|
||||
|
||||
if (finalPrefab != null)
|
||||
{
|
||||
position += Random.insideUnitSphere * radius;
|
||||
|
||||
var clone = Instantiate(finalPrefab, position, rotation, default(Transform));
|
||||
var rigidbody = clone.GetComponent<Rigidbody>();
|
||||
|
||||
if (rigidbody != null)
|
||||
{
|
||||
rigidbody.velocity = rotation * velocity;
|
||||
}
|
||||
|
||||
clone.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleHitPoint(bool preview, int priority, float pressure, int seed, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
Spawn(position + rotation * Vector3.forward * offsetNormal + offsetWorld, rotation);
|
||||
}
|
||||
|
||||
public void UpgradeLegacy()
|
||||
{
|
||||
if (prefab != null && Prefabs.Count == 0)
|
||||
{
|
||||
prefabs.Add(prefab);
|
||||
|
||||
prefab = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwSpawner;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwSpawner_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Each(tgts, t => t.UpgradeLegacy());
|
||||
|
||||
BeginError(Any(tgts, t => t.Prefabs.Count == 0));
|
||||
Draw("prefabs", "A random prefab from this list will be spawned.");
|
||||
EndError();
|
||||
Draw("radius", "The spawned prefab will be randomly offset by a random point within this radius in world space.");
|
||||
Draw("velocity", "If the prefab contains a Rigidbody, it will be given this velocity in local space.");
|
||||
|
||||
Separator();
|
||||
|
||||
Draw("offsetNormal", "The spawned prefab will be offset from the hit point based on the hit normal by this value in world space.");
|
||||
Draw("offsetWorld", "The spawned prefab will be offset from the hit point based on this value in world space.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ece7b7f939abcb845adf6c9b54fd30d3
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
using UnityEngine;
|
||||
using CW.Common;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace PaintCore
|
||||
{
|
||||
/// <summary>This component performs an action every time you undo/redo/etc.</summary>
|
||||
[HelpURL(CwCommon.HelpUrlPrefix + "CwUndoAction")]
|
||||
[AddComponentMenu(CwCommon.ComponentHitMenuPrefix + "Undo Action")]
|
||||
public class CwUndoAction : MonoBehaviour
|
||||
{
|
||||
/// <summary>Listen for <b>CwStateManager.UndoAll</b> calls?</summary>
|
||||
public bool PreUndoAll { set { preUndoAll = value; } get { return preUndoAll; } } [SerializeField] private bool preUndoAll = true;
|
||||
|
||||
/// <summary>Listen for <b>CwStateManager.RedoAll</b> calls?</summary>
|
||||
public bool PreRedoAll { set { preRedoAll = value; } get { return preRedoAll; } } [SerializeField] private bool preRedoAll = true;
|
||||
|
||||
/// <summary>The event that will be invoked.</summary>
|
||||
public UnityEvent Action { get { if (action == null) action = new UnityEvent(); return action; } } [SerializeField] public UnityEvent action;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
CwStateManager.OnPreUndoAll += HandlePreUndoAll;
|
||||
CwStateManager.OnPreRedoAll += HandlePreRedoAll;
|
||||
}
|
||||
|
||||
protected virtual void OnDisable()
|
||||
{
|
||||
CwStateManager.OnPreUndoAll -= HandlePreUndoAll;
|
||||
CwStateManager.OnPreRedoAll -= HandlePreRedoAll;
|
||||
}
|
||||
|
||||
private void HandlePreUndoAll()
|
||||
{
|
||||
if (preUndoAll == true && action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private void HandlePreRedoAll()
|
||||
{
|
||||
if (preRedoAll == true && action != null)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace PaintCore
|
||||
{
|
||||
using UnityEditor;
|
||||
using TARGET = CwUndoAction;
|
||||
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(TARGET))]
|
||||
public class CwUndoAction_Editor : CwEditor
|
||||
{
|
||||
protected override void OnInspector()
|
||||
{
|
||||
TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts);
|
||||
|
||||
Draw("preUndoAll");
|
||||
Draw("preRedoAll");
|
||||
Draw("action");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41aa403d8ef8661409c17498a5d5af04
|
||||
timeCreated: 1530247183
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
LocalPackages/PaintIn3D/Runtime/PaintCore/PaintCore.asmdef
Normal file
17
LocalPackages/PaintIn3D/Runtime/PaintCore/PaintCore.asmdef
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "PaintCore",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"Unity.InputSystem",
|
||||
"CW.Common"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b4c1437c0fb823428900cb008a49c07
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
10
LocalPackages/PaintIn3D/Runtime/PaintCore/Required.meta
Normal file
10
LocalPackages/PaintIn3D/Runtime/PaintCore/Required.meta
Normal file
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4baaa057cae01da409340e59ba926836
|
||||
folderAsset: yes
|
||||
timeCreated: 1574288548
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 328a9120a5427284a97cc5270bc34780
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07ffcd67894e987459fb365b457d07c0
|
||||
folderAsset: yes
|
||||
timeCreated: 1530247206
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,130 @@
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityStandardUtils.cginc"
|
||||
|
||||
// REPLACE_ORIGINAL + REPLACE_CUSTOM
|
||||
float4 _ReplaceColor;
|
||||
sampler2D _ReplaceTexture;
|
||||
float2 _ReplaceTextureSize;
|
||||
|
||||
// BLUR + FLOW
|
||||
float _Kernel;
|
||||
|
||||
void CW_ContributeMaskedSample(float2 coord, inout float4 totalColor, inout float totalWeight)
|
||||
{
|
||||
float weight = dot(CW_SampleMip0(_LocalMaskTexture, coord), _LocalMaskChannel);
|
||||
|
||||
totalColor += weight * CW_SampleMip0(_Buffer, coord);
|
||||
totalWeight += weight;
|
||||
}
|
||||
|
||||
float4 CW_DoBlend(float4 current, float4 color, float strength, float2 coord, float rot, float4 channels)
|
||||
{
|
||||
float4 old = current;
|
||||
#if BLEND_MODE_INDEX == 0 // ALPHA_BLEND
|
||||
color.a *= strength;
|
||||
float str = 1.0f - color.a;
|
||||
float div = color.a + current.a * str;
|
||||
|
||||
current.rgb = (color.rgb * color.a + current.rgb * current.a * str) / div;
|
||||
current.a = div;
|
||||
#elif BLEND_MODE_INDEX == 1 // ALPHA_BLEND_INVERSE
|
||||
color.a *= strength;
|
||||
float str = 1.0f - current.a;
|
||||
float div = current.a + color.a * str;
|
||||
|
||||
current.rgb = (current.rgb * current.a + color.rgb * color.a * str) / div;
|
||||
current.a = div;
|
||||
#elif BLEND_MODE_INDEX == 2 // PREMULTIPLIED
|
||||
color.a *= strength;
|
||||
color.rgb *= color.a;
|
||||
current = color + (1.0f - color.a) * current;
|
||||
#elif BLEND_MODE_INDEX == 3 // ADDITIVE
|
||||
current += color * strength;
|
||||
#elif BLEND_MODE_INDEX == 4 // ADDITIVE_SOFT
|
||||
current += color * strength * (1.0f - current);
|
||||
#elif BLEND_MODE_INDEX == 5 // SUBTRACTIVE
|
||||
current -= color * strength;
|
||||
#elif BLEND_MODE_INDEX == 6 // SUBTRACTIVE_SOFT
|
||||
current -= color * strength * current;
|
||||
#elif BLEND_MODE_INDEX == 7 // REPLACE
|
||||
current += (color - current) * strength;
|
||||
#elif BLEND_MODE_INDEX == 8 || BLEND_MODE_INDEX == 9 // REPLACE_ORIGINAL || REPLACE_CUSTOM
|
||||
float4 rep = CW_SampleMip0(_ReplaceTexture, coord) * _ReplaceColor;
|
||||
current += (rep - current) * strength;
|
||||
#elif BLEND_MODE_INDEX == 10 // MULTIPLY_INVERSE_RGB
|
||||
//current.rgb *= 1.0f - (1.0f - color.rgb) * strength;
|
||||
color.rgb = lerp(color.rgb, float3(1, 1, 1), 1 - color.a * strength);
|
||||
current.rgb *= color.rgb;
|
||||
#elif BLEND_MODE_INDEX == 11 // BLUR
|
||||
float2 k = _Kernel / _BufferSize;
|
||||
float4 c = 0.0f;
|
||||
float w = 0.0f;
|
||||
CW_ContributeMaskedSample(coord + float2(-k.x, 0.0f), c, w);
|
||||
CW_ContributeMaskedSample(coord + float2(+k.x, 0.0f), c, w);
|
||||
CW_ContributeMaskedSample(coord + float2(0.0f, -k.y), c, w);
|
||||
CW_ContributeMaskedSample(coord + float2(0.0f, +k.y), c, w);
|
||||
current += w != 0.0f ? (c / w - current) * strength : 0.0f;
|
||||
#elif BLEND_MODE_INDEX == 12 // NORMAL BLEND
|
||||
float3 curVec = UnpackNormal(current);
|
||||
float3 dstVec = UnpackNormal(color);
|
||||
dstVec = CW_RotateNormal(dstVec, rot);
|
||||
dstVec = lerp(float3(0.0f, 0.0f, 1.0f), dstVec, strength);
|
||||
curVec = normalize(float3(curVec.xy + dstVec.xy, curVec.z * dstVec.z));
|
||||
current = CW_PackNormal(curVec);
|
||||
#elif BLEND_MODE_INDEX == 13 // NORMAL REPLACE
|
||||
float3 curVec = UnpackNormal(current);
|
||||
float3 dstVec = UnpackNormal(color);
|
||||
dstVec = CW_RotateNormal(dstVec, rot);
|
||||
curVec = normalize(lerp(curVec, dstVec, strength));
|
||||
current = CW_PackNormal(curVec);
|
||||
#elif BLEND_MODE_INDEX == 14 // FLOW
|
||||
float3 dstVec = UnpackNormal(color);
|
||||
dstVec = CW_RotateNormal(dstVec, rot);
|
||||
float2 k = _Kernel / _BufferSize;
|
||||
float4 c = 0.0f;
|
||||
float w = 0.0f;
|
||||
CW_ContributeMaskedSample(coord - k * dstVec.xy * strength, c, w);
|
||||
current += w != 0.0f ? (c / w - current) * strength : 0.0f;
|
||||
#elif BLEND_MODE_INDEX == 15 || BLEND_MODE_INDEX == 16 // NORMAL_REPLACE_ORIGINAL || NORMAL_REPLACE_CUSTOM
|
||||
float4 rep = CW_SampleMip0(_ReplaceTexture, coord) * _ReplaceColor;
|
||||
current += (rep - current) * strength;
|
||||
current = CW_PackNormal(normalize(UnpackNormal(current)));
|
||||
#elif BLEND_MODE_INDEX == 17 || BLEND_MODE_INDEX == 18 // MIN || MAX
|
||||
color.a *= strength;
|
||||
float str = 1.0f - color.a;
|
||||
float div = color.a + current.a * str;
|
||||
|
||||
current.rgb = (color.rgb * color.a + current.rgb * current.a * str) / div;
|
||||
current.a = div;
|
||||
#if BLEND_MODE_INDEX == 17 // MIN
|
||||
current = min(current, old);
|
||||
#elif BLEND_MODE_INDEX == 18 // MAX
|
||||
current = max(current, old);
|
||||
#endif
|
||||
#endif
|
||||
return old + (current - old) * channels;
|
||||
}
|
||||
|
||||
float4 CW_Blend(float4 color, float strength, float2 coord, float rot, float4 channels)
|
||||
{
|
||||
coord = CW_SnapToPixel(coord, _BufferSize);
|
||||
float4 current = CW_SampleMip0(_Buffer, coord);
|
||||
|
||||
return CW_DoBlend(current, color, strength, coord, rot, channels);
|
||||
}
|
||||
|
||||
float4 CW_Blend(float4 color, float strength, float2 coord, float4 channels)
|
||||
{
|
||||
return CW_Blend(color, strength, coord, 0.0f, channels);
|
||||
}
|
||||
|
||||
float4 CW_BlendMinimum(float4 color, float mask, float strength, float2 coord, float4 minimum, float4 channels)
|
||||
{
|
||||
coord = CW_SnapToPixel(coord, _BufferSize);
|
||||
float4 current = CW_SampleMip0(_Buffer, coord);
|
||||
float4 result = CW_DoBlend(current, color, 1.0f, coord, 0.0f, channels);
|
||||
float4 change = (result - current) * mask;
|
||||
float4 maximum = abs(change);
|
||||
|
||||
return current + sign(change) * clamp(maximum * strength, 1.0f / 255.0f, maximum);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12560bac22942ae41bbd5bad953a16d5
|
||||
timeCreated: 1530488570
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
Shader "Hidden/PaintCore/CwBlit"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
|
||||
float4 _Coord;
|
||||
|
||||
#include "CwShared.cginc"
|
||||
|
||||
struct a2v
|
||||
{
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord2 : TEXCOORD2;
|
||||
float2 texcoord3 : TEXCOORD3;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct f2g
|
||||
{
|
||||
float4 color : SV_TARGET;
|
||||
};
|
||||
|
||||
void Vert(a2v i, out v2f o)
|
||||
{
|
||||
float2 texcoord = i.texcoord0 * _Coord.x + i.texcoord1 * _Coord.y + i.texcoord2 * _Coord.z + i.texcoord3 * _Coord.w;
|
||||
o.vertex = float4(texcoord.xy * 2.0f - 1.0f, 0.5f, 1.0f);
|
||||
o.texcoord = texcoord;
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
o.vertex.y = -o.vertex.y;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Frag(v2f i, out f2g o)
|
||||
{
|
||||
o.color = CW_SampleMip0(_Buffer, CW_SnapToPixel(i.texcoord, _BufferSize));
|
||||
}
|
||||
ENDCG
|
||||
} // Pass
|
||||
} // SubShader
|
||||
} // Shader
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user