chore: 외부 에셋 권한 및 줄바꿈 재기록 반영

- Assets/External 하위 샘플 및 서드파티 에셋 파일의 실행 비트 변경을 별도 커밋으로 분리
- PolygonGeneric, SidekickCharacters, Synty 도구 자산 전반의 줄바꿈 및 재직렬화 차이를 그대로 보존
- 프로젝트 고유 로직 변경과 분리해 이후 히스토리에서 외부 에셋 노이즈 범위를 식별하기 쉽게 정리
This commit is contained in:
2026-04-06 14:04:09 +09:00
parent c8edf838fd
commit cf103baf57
140 changed files with 15090 additions and 14829 deletions

View File

@@ -2,7 +2,7 @@
// <auto-generated> // <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.18.0 // version 1.18.0
// from Assets/Synty/AnimationBaseLocomotion/Samples/Scripts/InputSystem/Controls.inputactions // from Assets/External/Animations/AnimationBaseLocomotion/Samples/Scripts/InputSystem/Controls.inputactions
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -16,7 +16,7 @@ using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities; using UnityEngine.InputSystem.Utilities;
/// <summary> /// <summary>
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/Synty/AnimationBaseLocomotion/Samples/Scripts/InputSystem/Controls.inputactions". /// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/External/Animations/AnimationBaseLocomotion/Samples/Scripts/InputSystem/Controls.inputactions".
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified. /// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.

View File

@@ -2,7 +2,7 @@
// <auto-generated> // <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.18.0 // version 1.18.0
// from Assets/Synty/AnimationGoblinLocomotion/Samples/Scripts/InputSystem/GBL_Controls.inputactions // from Assets/External/Animations/AnimationGoblinLocomotion/Samples/Scripts/InputSystem/GBL_Controls.inputactions
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -16,7 +16,7 @@ using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities; using UnityEngine.InputSystem.Utilities;
/// <summary> /// <summary>
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/Synty/AnimationGoblinLocomotion/Samples/Scripts/InputSystem/GBL_Controls.inputactions". /// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/External/Animations/AnimationGoblinLocomotion/Samples/Scripts/InputSystem/GBL_Controls.inputactions".
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified. /// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.

View File

@@ -8,21 +8,32 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Dummy_Mat m_Name: Dummy_Mat
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: -6465566751694194690, guid: 19e269a311c45cd4482cf0ac0e694503, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- _ALPHATEST_ON
- _OVERLAY_UV_CHANNEL_UV0
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties: m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- _AO_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Base_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap: - _BumpMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -43,6 +54,10 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Emission_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex: - _MainTex:
m_Texture: {fileID: 2800000, guid: 52475fb4afae07b4384becbad96a4bee, type: 3} m_Texture: {fileID: 2800000, guid: 52475fb4afae07b4384becbad96a4bee, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -51,33 +66,202 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Metallic_Smoothness_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap: - _OcclusionMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Overlay_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap: - _ParallaxMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Triplanar_Emission_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Normal_Texture_Bottom:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Normal_Texture_Side:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Normal_Texture_Top:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Texture_Bottom:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Texture_Side:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Texture_Top:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- _AO_Intensity: 1
- _AlphaClip: 1
- _AlphaToMask: 1
- _BUILTIN_AlphaClip: 1
- _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 2
- _BUILTIN_DstBlend: 0
- _BUILTIN_QueueControl: -1
- _BUILTIN_QueueOffset: 0
- _BUILTIN_SrcBlend: 1
- _BUILTIN_Surface: 0
- _BUILTIN_ZTest: 4
- _BUILTIN_ZWrite: 1
- _BUILTIN_ZWriteControl: 0
- _Blend: 0
- _BlendModePreserveSpecular: 0
- _Bottom_Metallic: 0
- _Bottom_Smoothness: 0
- _BumpScale: 1 - _BumpScale: 1
- _CastShadows: 1
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
- _DstBlendAlpha: 0
- _Enable_Ambient_Occlusion: 0
- _Enable_Base_Texture: 0
- _Enable_Emission_Texture: 0
- _Enable_Normal_Texture: 0
- _Enable_Overlay_Texture: 0
- _Enable_Snow: 0
- _Enable_Triplanar_Emission: 0
- _Enable_Triplanar_Normals: 0
- _Enable_Triplanar_Texture: 0
- _Generate_From_Base_Normals: 0
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.5 - _Glossiness: 0.5
- _GlossyReflections: 1 - _GlossyReflections: 1
- _Metallic: 0 - _Metallic: 0
- _Mode: 0 - _Mode: 0
- _Normal_Intensity: 1
- _OVERLAY_UV_CHANNEL: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Overlay_Intensity: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueControl: -1
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Side_Metallic: 0
- _Side_Smoothness: 0
- _Smoothness: 0
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _Snow_Level: 0
- _Snow_Metallic: 0.1
- _Snow_Smoothness: 0.5
- _Snow_Transition: 1
- _Snow_Use_World_Up: 1
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _Top_Metallic: 0
- _Top_Smoothness: 0
- _Triplanar_Emission_Blend: 1
- _Triplanar_Emission_Intensity: 1
- _Triplanar_Emission_Tiling: 0.25
- _Triplanar_Fade: 1
- _Triplanar_Intensity: 1
- _Triplanar_Normal_Fade: 0
- _Triplanar_Normal_Intensity_Bottom: 1
- _Triplanar_Normal_Intensity_Side: 1
- _Triplanar_Normal_Intensity_Top: 1
- _Triplanar_Normal_Top_To_Side_Difference: 0.2
- _Triplanar_Top_To_Side_Difference: 0.2
- _UVSec: 0 - _UVSec: 0
- _WorkflowMode: 1
- _ZTest: 4
- _ZWrite: 1 - _ZWrite: 1
- _ZWriteControl: 0
m_Colors: m_Colors:
- _AO_Offset: {r: 0, g: 0, b: 0, a: 0}
- _AO_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Base_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Base_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color_Tint: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Emission_Color_Tint: {r: 0, g: 0, b: 0, a: 0}
- _Emission_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Emission_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Normal_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Normal_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Overlay_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Overlay_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Snow_Color: {r: 0.85, g: 0.85, b: 0.85, a: 0}
- _Triplanar_Emission_Color_Tint: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Offset_Bottom: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Offset_Side: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Offset_Top: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Tiling_Bottom: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Normal_Tiling_Side: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Normal_Tiling_Top: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Offset_Bottom: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Offset_Side: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Offset_Top: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Tiling_Bottom: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Tiling_Side: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Tiling_Top: {r: 1, g: 1, b: 0, a: 0}
- _UVPan: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &1478222285771911038
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.ShaderGraph.Editor::UnityEditor.Rendering.BuiltIn.AssetVersion
version: 0
--- !u!114 &3036035668096195608
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -1,24 +1,52 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!114 &-300816632722559782
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000 --- !u!21 &2100000
Material: Material:
serializedVersion: 6 serializedVersion: 8
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Ground_Mat m_Name: Ground_Mat
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: -6465566751694194690, guid: 19e269a311c45cd4482cf0ac0e694503, type: 3}
m_ShaderKeywords: m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHATEST_ON
- _OVERLAY_UV_CHANNEL_UV0
m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- _AO_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Base_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap: - _BumpMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -39,6 +67,10 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Emission_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex: - _MainTex:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -47,32 +79,189 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Metallic_Smoothness_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap: - _OcclusionMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Overlay_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap: - _ParallaxMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Triplanar_Emission_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Normal_Texture_Bottom:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Normal_Texture_Side:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Normal_Texture_Top:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Texture_Bottom:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Texture_Side:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_Texture_Top:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: m_Floats:
- _AO_Intensity: 1
- _AlphaClip: 1
- _AlphaToMask: 1
- _BUILTIN_AlphaClip: 1
- _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 2
- _BUILTIN_DstBlend: 0
- _BUILTIN_QueueControl: -1
- _BUILTIN_QueueOffset: 0
- _BUILTIN_SrcBlend: 1
- _BUILTIN_Surface: 0
- _BUILTIN_ZTest: 4
- _BUILTIN_ZWrite: 1
- _BUILTIN_ZWriteControl: 0
- _Blend: 0
- _BlendModePreserveSpecular: 0
- _Bottom_Metallic: 0
- _Bottom_Smoothness: 0
- _BumpScale: 1 - _BumpScale: 1
- _CastShadows: 1
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
- _DstBlendAlpha: 0
- _Enable_Ambient_Occlusion: 0
- _Enable_Base_Texture: 0
- _Enable_Emission_Texture: 0
- _Enable_Normal_Texture: 0
- _Enable_Overlay_Texture: 0
- _Enable_Snow: 0
- _Enable_Triplanar_Emission: 0
- _Enable_Triplanar_Normals: 0
- _Enable_Triplanar_Texture: 0
- _Generate_From_Base_Normals: 0
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.2 - _Glossiness: 0.2
- _GlossyReflections: 1 - _GlossyReflections: 1
- _Metallic: 0 - _Metallic: 0
- _Mode: 0 - _Mode: 0
- _Normal_Intensity: 1
- _OVERLAY_UV_CHANNEL: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Overlay_Intensity: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueControl: -1
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Side_Metallic: 0
- _Side_Smoothness: 0
- _Smoothness: 0
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _Snow_Level: 0
- _Snow_Metallic: 0.1
- _Snow_Smoothness: 0.5
- _Snow_Transition: 1
- _Snow_Use_World_Up: 1
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _Top_Metallic: 0
- _Top_Smoothness: 0
- _Triplanar_Emission_Blend: 1
- _Triplanar_Emission_Intensity: 1
- _Triplanar_Emission_Tiling: 0.25
- _Triplanar_Fade: 1
- _Triplanar_Intensity: 1
- _Triplanar_Normal_Fade: 0
- _Triplanar_Normal_Intensity_Bottom: 1
- _Triplanar_Normal_Intensity_Side: 1
- _Triplanar_Normal_Intensity_Top: 1
- _Triplanar_Normal_Top_To_Side_Difference: 0.2
- _Triplanar_Top_To_Side_Difference: 0.2
- _UVSec: 0 - _UVSec: 0
- _WorkflowMode: 1
- _ZTest: 4
- _ZWrite: 1 - _ZWrite: 1
- _ZWriteControl: 0
m_Colors: m_Colors:
- _AO_Offset: {r: 0, g: 0, b: 0, a: 0}
- _AO_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Base_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Base_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Color: {r: 0.5553578, g: 0.5795657, b: 0.6037736, a: 1} - _Color: {r: 0.5553578, g: 0.5795657, b: 0.6037736, a: 1}
- _Color_Tint: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Emission_Color_Tint: {r: 0, g: 0, b: 0, a: 0}
- _Emission_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Emission_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Normal_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Normal_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Overlay_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Overlay_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Snow_Color: {r: 0.85, g: 0.85, b: 0.85, a: 0}
- _Triplanar_Emission_Color_Tint: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Offset_Bottom: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Offset_Side: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Offset_Top: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Normal_Tiling_Bottom: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Normal_Tiling_Side: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Normal_Tiling_Top: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Offset_Bottom: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Offset_Side: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Offset_Top: {r: 0, g: 0, b: 0, a: 0}
- _Triplanar_Tiling_Bottom: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Tiling_Side: {r: 1, g: 1, b: 0, a: 0}
- _Triplanar_Tiling_Top: {r: 1, g: 1, b: 0, a: 0}
- _UVPan: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &1519216836111423043
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.ShaderGraph.Editor::UnityEditor.Rendering.BuiltIn.AssetVersion
version: 0

View File

@@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: M_Dummy m_Name: M_Dummy
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
@@ -17,12 +17,18 @@ Material:
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap:
disabledShaderPasses: [] RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties: m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: 52475fb4afae07b4384becbad96a4bee, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap: - _BumpMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -59,12 +65,39 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1 - _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.5 - _Glossiness: 0.5
- _GlossyReflections: 1 - _GlossyReflections: 1
@@ -72,12 +105,35 @@ Material:
- _Mode: 0 - _Mode: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0 - _UVSec: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &8796169509839380165
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ba9ac54bb93ffaf4f9d335d994ebfabd guid: 7181c4f41342f22d8bfa7ed36730f373
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000 mainObjectFileID: 2100000

View File

@@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: M_Ground m_Name: M_Ground
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
@@ -17,12 +17,18 @@ Material:
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap:
disabledShaderPasses: [] RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties: m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap: - _BumpMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -59,12 +65,39 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1 - _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.2 - _Glossiness: 0.2
- _GlossyReflections: 1 - _GlossyReflections: 1
@@ -72,12 +105,35 @@ Material:
- _Mode: 0 - _Mode: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.2
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0 - _UVSec: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _Color: {r: 0.5553578, g: 0.5795657, b: 0.6037736, a: 1} - _BaseColor: {r: 0.55535775, g: 0.5795657, b: 0.6037736, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &686116854676397900
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a8382f46b72a5d64283c4060b7311644 guid: 6292c9818a88933b89f67a3b92eec4c7
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000 mainObjectFileID: 2100000

View File

@@ -2,23 +2,33 @@
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000 --- !u!21 &2100000
Material: Material:
serializedVersion: 6 serializedVersion: 8
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: M_Sky m_Name: M_Sky
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
m_ShaderKeywords: m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap:
disabledShaderPasses: [] RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap: - _BumpMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -55,11 +65,19 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendOp: 0
- _BumpScale: 1 - _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
- _DstBlendAlpha: 0
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0 - _Glossiness: 0
- _GlossyReflections: 1 - _GlossyReflections: 1
@@ -67,12 +85,32 @@ Material:
- _Mode: 0 - _Mode: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueOffset: 0
- _SampleGI: 0
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0 - _UVSec: 0
- _XRMotionVectorsPass: 1
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _Color: {r: 0.53333336, g: 0.5764706, b: 0.6, a: 1} - _BaseColor: {r: 0.5333333, g: 0.57647055, b: 0.6, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &7601943180835571591
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e91303e74a336ee4eaf3299ee34d991d guid: f9d20658359836af8a2e03271e776196
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000 mainObjectFileID: 2100000

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 887c2720749571e41b36e668ec74a639 guid: 983ae9de876815b0894058ef6ddc6f42
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

View File

@@ -45,7 +45,7 @@ Material:
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: 2450
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: disabledShaderPasses:
- MOTIONVECTORS - MOTIONVECTORS
@@ -57,6 +57,10 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Alpha_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Base_Texture: - _Base_Texture:
m_Texture: {fileID: 2800000, guid: 9614e1c2eb9ea3240a97d2245414317b, type: 3} m_Texture: {fileID: 2800000, guid: 9614e1c2eb9ea3240a97d2245414317b, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@@ -158,6 +162,8 @@ Material:
- _AO_Intensity: 1 - _AO_Intensity: 1
- _AlphaClip: 1 - _AlphaClip: 1
- _AlphaToMask: 1 - _AlphaToMask: 1
- _Alpha_Clip_Threshold: 0.5
- _Alpha_Transparency: 1
- _BUILTIN_AlphaClip: 0 - _BUILTIN_AlphaClip: 0
- _BUILTIN_Blend: 0 - _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 2 - _BUILTIN_CullMode: 2
@@ -179,12 +185,14 @@ Material:
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
- _DstBlendAlpha: 0
- _Enable_Ambient_Occlusion: 0 - _Enable_Ambient_Occlusion: 0
- _Enable_Base_Texture: 1 - _Enable_Base_Texture: 1
- _Enable_Emission_Texture: 0 - _Enable_Emission_Texture: 0
- _Enable_Normal_Texture: 1 - _Enable_Normal_Texture: 1
- _Enable_Overlay_Texture: 0 - _Enable_Overlay_Texture: 0
- _Enable_Snow: 0 - _Enable_Snow: 0
- _Enable_Transparency: 0
- _Enable_Triplanar_Emission: 0 - _Enable_Triplanar_Emission: 0
- _Enable_Triplanar_Normals: 0 - _Enable_Triplanar_Normals: 0
- _Enable_Triplanar_Texture: 1 - _Enable_Triplanar_Texture: 1
@@ -213,6 +221,7 @@ Material:
- _Snow_Use_World_Up: 1 - _Snow_Use_World_Up: 1
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0 - _Surface: 0
- _Top_Metallic: 0 - _Top_Metallic: 0
- _Top_Smoothness: 0 - _Top_Smoothness: 0
@@ -228,6 +237,7 @@ Material:
- _Triplanar_Normal_Top_To_Side_Difference: 0.2 - _Triplanar_Normal_Top_To_Side_Difference: 0.2
- _Triplanar_Top_To_Side_Difference: 0.2 - _Triplanar_Top_To_Side_Difference: 0.2
- _UVSec: 0 - _UVSec: 0
- _Use_Separate_Alpha_Map: 0
- _WorkflowMode: 1 - _WorkflowMode: 1
- _ZTest: 4 - _ZTest: 4
- _ZWrite: 1 - _ZWrite: 1
@@ -235,6 +245,8 @@ Material:
m_Colors: m_Colors:
- _AO_Offset: {r: 0, g: 0, b: 0, a: 0} - _AO_Offset: {r: 0, g: 0, b: 0, a: 0}
- _AO_Tiling: {r: 1, g: 1, b: 0, a: 0} - _AO_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Alpha_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Alpha_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Base_Offset: {r: 0, g: 0, b: 0, a: 0} - _Base_Offset: {r: 0, g: 0, b: 0, a: 0}
- _Base_Tiling: {r: 1, g: 1, b: 0, a: 0} - _Base_Tiling: {r: 1, g: 1, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
Assets/External/Models/PolygonGeneric/Materials/Skybox_01.mat.meta vendored Normal file → Executable file
View File

View File

70
Assets/External/Models/PolygonGeneric/Scripts/Generic_SimpleRotate.cs vendored Normal file → Executable file
View File

@@ -1,35 +1,35 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class Generic_SimpleRotate : MonoBehaviour public class Generic_SimpleRotate : MonoBehaviour
{ {
public bool rotX; public bool rotX;
public float rotXSpeed = 50f; public float rotXSpeed = 50f;
public bool rotY; public bool rotY;
public float rotYSpeed = 50f; public float rotYSpeed = 50f;
public bool rotZ; public bool rotZ;
public float rotZSpeed = 50f; public float rotZSpeed = 50f;
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if (rotX == true) if (rotX == true)
{ {
transform.Rotate(Vector3.left * Time.deltaTime * rotXSpeed); transform.Rotate(Vector3.left * Time.deltaTime * rotXSpeed);
} }
if (rotY == true) if (rotY == true)
{ {
transform.Rotate(Vector3.up * Time.deltaTime * rotYSpeed); transform.Rotate(Vector3.up * Time.deltaTime * rotYSpeed);
} }
if (rotZ == true) if (rotZ == true)
{ {
transform.Rotate(Vector3.back * Time.deltaTime * rotZSpeed); transform.Rotate(Vector3.back * Time.deltaTime * rotZSpeed);
} }
} }
} }

View File

View File

@@ -1,31 +1,31 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class Generic_SimpleTranslate : MonoBehaviour public class Generic_SimpleTranslate : MonoBehaviour
{ {
public bool moveX; public bool moveX;
public float moveXSpeed = 2f; public float moveXSpeed = 2f;
public bool moveY; public bool moveY;
public float moveYSpeed = 2f; public float moveYSpeed = 2f;
public bool moveZ; public bool moveZ;
public float moveZSpeed = 2f; public float moveZSpeed = 2f;
void Update() void Update()
{ {
if (moveX == true) if (moveX == true)
{ {
transform.Translate(Vector3.left * Time.deltaTime * moveXSpeed); transform.Translate(Vector3.left * Time.deltaTime * moveXSpeed);
} }
if (moveY == true) if (moveY == true)
{ {
transform.Translate(Vector3.up * Time.deltaTime * moveYSpeed); transform.Translate(Vector3.up * Time.deltaTime * moveYSpeed);
} }
if (moveZ == true) if (moveZ == true)
{ {
transform.Translate(Vector3.back * Time.deltaTime * moveZSpeed); transform.Translate(Vector3.back * Time.deltaTime * moveZSpeed);
} }
} }
} }

View File

88
Assets/External/Models/PolygonGeneric/Scripts/Generic_WaterBob.cs vendored Normal file → Executable file
View File

@@ -1,44 +1,44 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class Generic_WaterBob : MonoBehaviour public class Generic_WaterBob : MonoBehaviour
{ {
public float bobbingHeight = 0.08f; // The height the object will bob up and down public float bobbingHeight = 0.08f; // The height the object will bob up and down
public float bobbingSpeed = 1.5f; // The speed of the bobbing motion public float bobbingSpeed = 1.5f; // The speed of the bobbing motion
public float rotationAmount = 0.8f; // The amount of rotation applied to the object public float rotationAmount = 0.8f; // The amount of rotation applied to the object
public bool randomOffset = true; // Determines if random offsets are applied to speed and rotation public bool randomOffset = true; // Determines if random offsets are applied to speed and rotation
public Vector2 randomRange = new Vector2(0.1f, 1f); // The range for the random offset public Vector2 randomRange = new Vector2(0.1f, 1f); // The range for the random offset
private Vector3 startPos; private Vector3 startPos;
private Quaternion startRotation; private Quaternion startRotation;
void Start() void Start()
{ {
startPos = transform.position; startPos = transform.position;
startRotation = transform.rotation; // Save the initial rotation startRotation = transform.rotation; // Save the initial rotation
if (randomOffset) if (randomOffset)
{ {
bobbingSpeed += UnityEngine.Random.Range(randomRange.x, randomRange.y); bobbingSpeed += UnityEngine.Random.Range(randomRange.x, randomRange.y);
rotationAmount += UnityEngine.Random.Range(randomRange.x, randomRange.y); rotationAmount += UnityEngine.Random.Range(randomRange.x, randomRange.y);
} }
} }
void Update() void Update()
{ {
// Calculate the vertical bobbing motion // Calculate the vertical bobbing motion
float newY = startPos.y + Mathf.Sin(Time.time * bobbingSpeed) * bobbingHeight; float newY = startPos.y + Mathf.Sin(Time.time * bobbingSpeed) * bobbingHeight;
Vector3 newPos = new Vector3(transform.position.x, newY, transform.position.z); Vector3 newPos = new Vector3(transform.position.x, newY, transform.position.z);
transform.position = newPos; transform.position = newPos;
// Calculate rotation offsets based on time // Calculate rotation offsets based on time
float rotationX = Mathf.Sin(Time.time * bobbingSpeed * 0.5f) * rotationAmount; float rotationX = Mathf.Sin(Time.time * bobbingSpeed * 0.5f) * rotationAmount;
float rotationY = Mathf.Sin(Time.time * bobbingSpeed * 0.7f) * rotationAmount; float rotationY = Mathf.Sin(Time.time * bobbingSpeed * 0.7f) * rotationAmount;
float rotationZ = Mathf.Sin(Time.time * bobbingSpeed * 0.9f) * rotationAmount; float rotationZ = Mathf.Sin(Time.time * bobbingSpeed * 0.9f) * rotationAmount;
// Apply the incremental rotation as an offset to the existing rotation // Apply the incremental rotation as an offset to the existing rotation
Quaternion incrementalRotation = Quaternion.Euler(rotationX, rotationY, rotationZ); Quaternion incrementalRotation = Quaternion.Euler(rotationX, rotationY, rotationZ);
transform.rotation = startRotation * incrementalRotation; transform.rotation = startRotation * incrementalRotation;
} }
} }

View File

View File

@@ -1,204 +1,204 @@
using UnityEditor; using UnityEditor;
public class PolygonShaderGUI : ShaderGUI public class PolygonShaderGUI : ShaderGUI
{ {
private bool _showBaseTexture = false; private bool _showBaseTexture = false;
private bool _showOverlayTexture = false; private bool _showOverlayTexture = false;
private bool _showAlphaTexture = false; private bool _showAlphaTexture = false;
private bool _showNormalTexture = false; private bool _showNormalTexture = false;
private bool _showTriplanar = false; private bool _showTriplanar = false;
private bool _showNormalTriplanar = false; private bool _showNormalTriplanar = false;
private bool _showEmissionTexture = false; private bool _showEmissionTexture = false;
private bool _showSnow = false; private bool _showSnow = false;
private bool _showWave = false; private bool _showWave = false;
private bool CreatePropertyGroup(string title, string[] groupProperties, bool foldout, MaterialEditor materialEditor, MaterialProperty[] allProperties) private bool CreatePropertyGroup(string title, string[] groupProperties, bool foldout, MaterialEditor materialEditor, MaterialProperty[] allProperties)
{ {
foldout = EditorGUILayout.BeginFoldoutHeaderGroup(foldout, title); foldout = EditorGUILayout.BeginFoldoutHeaderGroup(foldout, title);
if (foldout) if (foldout)
{ {
foreach (string property in groupProperties) foreach (string property in groupProperties)
{ {
MaterialProperty propertyReference = FindProperty(property, allProperties); MaterialProperty propertyReference = FindProperty(property, allProperties);
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 1); materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 1);
} }
} }
EditorGUILayout.EndFoldoutHeaderGroup(); EditorGUILayout.EndFoldoutHeaderGroup();
return foldout; return foldout;
} }
override public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) override public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{ {
EditorGUILayout.LabelField("Basic Parameters", EditorStyles.boldLabel); EditorGUILayout.LabelField("Basic Parameters", EditorStyles.boldLabel);
// Ungrouped Basic Parameters // Ungrouped Basic Parameters
string[] shaderProperties = string[] shaderProperties =
{ {
"_Color_Tint", "_Color_Tint",
"_Metallic", "_Metallic",
"_Smoothness", "_Smoothness",
"_Metallic_Smoothness_Texture", "_Metallic_Smoothness_Texture",
"_Ambient_Occlusion", "_Ambient_Occlusion",
"_Specular_Color", "_Specular_Color",
"_Alpha_Transparency" "_Alpha_Transparency"
}; };
foreach (string property in shaderProperties) foreach (string property in shaderProperties)
{ {
MaterialProperty propertyReference = FindProperty(property, properties); MaterialProperty propertyReference = FindProperty(property, properties);
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 0); materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 0);
} }
EditorGUILayout.Separator(); EditorGUILayout.Separator();
// Base Texture Parameters // Base Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Base_Texture", "_Enable_Base_Texture",
"_Base_Texture", "_Base_Texture",
"_Base_Tiling", "_Base_Tiling",
"_Base_Offset" "_Base_Offset"
}; };
_showBaseTexture = CreatePropertyGroup("Base Texture", shaderProperties, _showBaseTexture, materialEditor, properties); _showBaseTexture = CreatePropertyGroup("Base Texture", shaderProperties, _showBaseTexture, materialEditor, properties);
// Alpha Texture Parameters // Alpha Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Alpha_Texture", "_Enable_Alpha_Texture",
"_Alpha_Texture", "_Alpha_Texture",
"_Alpha_Tiling", "_Alpha_Tiling",
"_Alpha_Offset" "_Alpha_Offset"
}; };
_showAlphaTexture = CreatePropertyGroup("Alpha Texture", shaderProperties, _showAlphaTexture, materialEditor, properties); _showAlphaTexture = CreatePropertyGroup("Alpha Texture", shaderProperties, _showAlphaTexture, materialEditor, properties);
// Normal Texture Parameters // Normal Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Normal_Texture", "_Enable_Normal_Texture",
"_Normal_Texture", "_Normal_Texture",
"_Normal_Tiling", "_Normal_Tiling",
"_Normal_Offset" "_Normal_Offset"
}; };
_showNormalTexture = CreatePropertyGroup("Normal Texture", shaderProperties, _showNormalTexture, materialEditor, properties); _showNormalTexture = CreatePropertyGroup("Normal Texture", shaderProperties, _showNormalTexture, materialEditor, properties);
// Emission Texture Parameters // Emission Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Emission_Texture", "_Enable_Emission_Texture",
"_Emission_Texture", "_Emission_Texture",
"_Emission_Tiling", "_Emission_Tiling",
"_Emission_Offset" "_Emission_Offset"
}; };
_showEmissionTexture = CreatePropertyGroup("Emission Texture", shaderProperties, _showEmissionTexture, materialEditor, properties); _showEmissionTexture = CreatePropertyGroup("Emission Texture", shaderProperties, _showEmissionTexture, materialEditor, properties);
EditorGUILayout.Separator(); EditorGUILayout.Separator();
EditorGUILayout.LabelField("Advanced Parameters", EditorStyles.boldLabel); EditorGUILayout.LabelField("Advanced Parameters", EditorStyles.boldLabel);
// Overlay Texture Parameters // Overlay Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Overlay_Texture", "_Enable_Overlay_Texture",
"_Overlay_Texture", "_Overlay_Texture",
"_Overlay_Tiling", "_Overlay_Tiling",
"_Overlay_Offset", "_Overlay_Offset",
"_OVERLAY_UV_CHANNEL", "_OVERLAY_UV_CHANNEL",
"_Overlay_Intensity" "_Overlay_Intensity"
}; };
_showOverlayTexture = CreatePropertyGroup("Overlay Texture", shaderProperties, _showOverlayTexture, materialEditor, properties); _showOverlayTexture = CreatePropertyGroup("Overlay Texture", shaderProperties, _showOverlayTexture, materialEditor, properties);
// Triplanar Texture Parameters // Triplanar Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Triplanar_Texture", "_Enable_Triplanar_Texture",
"_Triplanar_Texture_Top", "_Triplanar_Texture_Top",
"_Triplanar_Tiling_Top", "_Triplanar_Tiling_Top",
"_Triplanar_Offset_Top", "_Triplanar_Offset_Top",
"_Triplanar_Texture_Bottom", "_Triplanar_Texture_Bottom",
"_Triplanar_Tiling_Bottom", "_Triplanar_Tiling_Bottom",
"_Triplanar_Offset_Bottom", "_Triplanar_Offset_Bottom",
"_Triplanar_Texture_Side", "_Triplanar_Texture_Side",
"_Triplanar_Tiling_Side", "_Triplanar_Tiling_Side",
"_Triplanar_Offset_Side", "_Triplanar_Offset_Side",
"_Triplanar_Top_To_Side_Difference", "_Triplanar_Top_To_Side_Difference",
"_Triplanar_Fade", "_Triplanar_Intensity" "_Triplanar_Fade", "_Triplanar_Intensity"
}; };
_showTriplanar = CreatePropertyGroup("Triplanar Texture", shaderProperties, _showTriplanar, materialEditor, properties); _showTriplanar = CreatePropertyGroup("Triplanar Texture", shaderProperties, _showTriplanar, materialEditor, properties);
// Triplanar Normal Texture Parameters // Triplanar Normal Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Triplanar_Normals", "_Enable_Triplanar_Normals",
"_Triplanar_Normal_Texture_Top", "_Triplanar_Normal_Texture_Top",
"_Triplanar_Normal_Intensity_Top", "_Triplanar_Normal_Intensity_Top",
"_Triplanar_Normal_Tiling_Top", "_Triplanar_Normal_Tiling_Top",
"_Triplanar_Normal_Offset_Top", "_Triplanar_Normal_Offset_Top",
"_Triplanar_Normal_Texture_Bottom", "_Triplanar_Normal_Texture_Bottom",
"_Triplanar_Normal_Intensity_Bottom", "_Triplanar_Normal_Intensity_Bottom",
"_Triplanar_Normal_Tiling_Bottom", "_Triplanar_Normal_Tiling_Bottom",
"_Triplanar_Normal_Offset_Bottom", "_Triplanar_Normal_Offset_Bottom",
"_Triplanar_Normal_Texture_Side", "_Triplanar_Normal_Texture_Side",
"_Triplanar_Normal_Intensity_Side", "_Triplanar_Normal_Intensity_Side",
"_Triplanar_Normal_Tiling_Side", "_Triplanar_Normal_Tiling_Side",
"_Triplanar_Normal_Offset_Side", "_Triplanar_Normal_Offset_Side",
"_Triplanar_Normal_Top_To_Side_Difference", "_Triplanar_Normal_Top_To_Side_Difference",
"_Triplanar_Normal_Fade" "_Triplanar_Normal_Fade"
}; };
_showNormalTriplanar = CreatePropertyGroup("Triplanar Normal Texture", shaderProperties, _showNormalTriplanar, materialEditor, properties); _showNormalTriplanar = CreatePropertyGroup("Triplanar Normal Texture", shaderProperties, _showNormalTriplanar, materialEditor, properties);
// Snow Parameters // Snow Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Snow", "_Enable_Snow",
"_Snow_Metallic", "_Snow_Metallic",
"_Snow_Smoothness", "_Snow_Smoothness",
"_Snow_Level", "_Snow_Level",
"_Snow_Transition", "_Snow_Transition",
"_Snow_Transition_Threshold", "_Snow_Transition_Threshold",
"_Snow_Transition_Threshold_Steps", "_Snow_Transition_Threshold_Steps",
"_Snow_Transition_Threshold_Step_Count", "_Snow_Transition_Threshold_Step_Count",
"_Snow_Angle_Threshold", "_Snow_Angle_Threshold",
"_Snow_Color", "_Snow_Color",
"_Sea_Level", "_Sea_Level",
"_Snow_Edge_Noise", "_Snow_Edge_Noise",
"_Snow_Noise_Tiling", "_Snow_Noise_Tiling",
"_Snow_Noise_Offset", "_Snow_Noise_Offset",
"_Snow_Noise_Fade", "_Snow_Noise_Fade",
"_Snow_Noise_Top_To_Side_Difference", "_Snow_Noise_Top_To_Side_Difference",
"_Snow_Normal_Texture", "_Snow_Normal_Texture",
"_Snow_Overrides_Normals", "_Snow_Overrides_Normals",
"_Snow_Normal_Intensity", "_Snow_Normal_Intensity",
"_Snow_Normal_Tiling", "_Snow_Normal_Tiling",
"_Snow_Normal_Offset", "_Snow_Normal_Offset",
"_Snow_Normal_Fade", "_Snow_Normal_Fade",
"_Snow_Metallic_Smoothness_Texture", "_Snow_Metallic_Smoothness_Texture",
"_Snow_Metallic_Smoothness_Tiling", "_Snow_Metallic_Smoothness_Tiling",
"_Snow_Metallic_Smoothness_Offset" "_Snow_Metallic_Smoothness_Offset"
}; };
_showSnow = CreatePropertyGroup("Snow", shaderProperties, _showSnow, materialEditor, properties); _showSnow = CreatePropertyGroup("Snow", shaderProperties, _showSnow, materialEditor, properties);
// Wave Parameters // Wave Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Wave", "_Enable_Wave",
"_Wave_Direction_Vector", "_Wave_Direction_Vector",
"_Wave_Scale", "_Wave_Scale",
"_Wave_Noise_Tiling", "_Wave_Noise_Tiling",
"_Wave_Speed", "_Wave_Speed",
"_Fade_Wave_To_Object_Origin", "_Fade_Wave_To_Object_Origin",
"_Fade_Wave_Scale", "_Fade_Wave_Scale",
"_Fade_Wave_Vertical_Offset", "_Fade_Wave_Vertical_Offset",
"_Wave_Object_Offset" "_Wave_Object_Offset"
}; };
_showWave = CreatePropertyGroup("Wave", shaderProperties, _showWave, materialEditor, properties); _showWave = CreatePropertyGroup("Wave", shaderProperties, _showWave, materialEditor, properties);
} }
} }

View File

@@ -1,145 +1,145 @@
using UnityEditor; using UnityEditor;
public class PolygonTransparencyShaderGUI : ShaderGUI public class PolygonTransparencyShaderGUI : ShaderGUI
{ {
private bool _showBaseTexture = false; private bool _showBaseTexture = false;
private bool _showOverlayTexture = false; private bool _showOverlayTexture = false;
private bool _showAlphaTexture = false; private bool _showAlphaTexture = false;
private bool _showNormalTexture = false; private bool _showNormalTexture = false;
private bool _showEmissionTexture = false; private bool _showEmissionTexture = false;
private bool _showSnow = false; private bool _showSnow = false;
private bool CreatePropertyGroup(string title, string[] groupProperties, bool foldout, MaterialEditor materialEditor, MaterialProperty[] allProperties) private bool CreatePropertyGroup(string title, string[] groupProperties, bool foldout, MaterialEditor materialEditor, MaterialProperty[] allProperties)
{ {
foldout = EditorGUILayout.BeginFoldoutHeaderGroup(foldout, title); foldout = EditorGUILayout.BeginFoldoutHeaderGroup(foldout, title);
if (foldout) if (foldout)
{ {
foreach (string property in groupProperties) foreach (string property in groupProperties)
{ {
MaterialProperty propertyReference = FindProperty(property, allProperties); MaterialProperty propertyReference = FindProperty(property, allProperties);
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 1); materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 1);
} }
} }
EditorGUILayout.EndFoldoutHeaderGroup(); EditorGUILayout.EndFoldoutHeaderGroup();
return foldout; return foldout;
} }
override public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) override public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{ {
EditorGUILayout.LabelField("Basic Parameters", EditorStyles.boldLabel); EditorGUILayout.LabelField("Basic Parameters", EditorStyles.boldLabel);
// Ungrouped Basic Parameters // Ungrouped Basic Parameters
string[] shaderProperties = string[] shaderProperties =
{ {
"_Color_Tint", "_Color_Tint",
"_Metallic", "_Metallic",
"_Smoothness", "_Smoothness",
"_Metallic_Smoothness_Texture", "_Metallic_Smoothness_Texture",
"_Ambient_Occlusion", "_Ambient_Occlusion",
"_Alpha_Transparency", "_Alpha_Transparency",
"_Alpha_Clip_Threshold" "_Alpha_Clip_Threshold"
}; };
foreach (string property in shaderProperties) foreach (string property in shaderProperties)
{ {
MaterialProperty propertyReference = FindProperty(property, properties); MaterialProperty propertyReference = FindProperty(property, properties);
materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 0); materialEditor.ShaderProperty(propertyReference, propertyReference.displayName, 0);
} }
EditorGUILayout.Separator(); EditorGUILayout.Separator();
// Base Texture Parameters // Base Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Base_Texture", "_Enable_Base_Texture",
"_Base_Texture", "_Base_Texture",
"_Base_Tiling", "_Base_Tiling",
"_Base_Offset" "_Base_Offset"
}; };
_showBaseTexture = CreatePropertyGroup("Base Texture", shaderProperties, _showBaseTexture, materialEditor, properties); _showBaseTexture = CreatePropertyGroup("Base Texture", shaderProperties, _showBaseTexture, materialEditor, properties);
// Alpha Texture Parameters // Alpha Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Alpha_Texture", "_Enable_Alpha_Texture",
"_Alpha_Texture", "_Alpha_Texture",
"_Alpha_Tiling", "_Alpha_Tiling",
"_Alpha_Offset" "_Alpha_Offset"
}; };
_showAlphaTexture = CreatePropertyGroup("Alpha Texture", shaderProperties, _showAlphaTexture, materialEditor, properties); _showAlphaTexture = CreatePropertyGroup("Alpha Texture", shaderProperties, _showAlphaTexture, materialEditor, properties);
// Normal Texture Parameters // Normal Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Normal_Texture", "_Enable_Normal_Texture",
"_Normal_Texture", "_Normal_Texture",
"_Normal_Tiling", "_Normal_Tiling",
"_Normal_Offset" "_Normal_Offset"
}; };
_showNormalTexture = CreatePropertyGroup("Normal Texture", shaderProperties, _showNormalTexture, materialEditor, properties); _showNormalTexture = CreatePropertyGroup("Normal Texture", shaderProperties, _showNormalTexture, materialEditor, properties);
// Emission Texture Parameters // Emission Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Emission_Texture", "_Enable_Emission_Texture",
"_Emission_Texture", "_Emission_Texture",
"_Emission_Tiling", "_Emission_Tiling",
"_Emission_Offset" "_Emission_Offset"
}; };
_showEmissionTexture = CreatePropertyGroup("Emission Texture", shaderProperties, _showEmissionTexture, materialEditor, properties); _showEmissionTexture = CreatePropertyGroup("Emission Texture", shaderProperties, _showEmissionTexture, materialEditor, properties);
EditorGUILayout.Separator(); EditorGUILayout.Separator();
EditorGUILayout.LabelField("Advanced Parameters", EditorStyles.boldLabel); EditorGUILayout.LabelField("Advanced Parameters", EditorStyles.boldLabel);
// Overlay Texture Parameters // Overlay Texture Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Overlay_Texture", "_Enable_Overlay_Texture",
"_Overlay_Texture", "_Overlay_Texture",
"_Overlay_Tiling", "_Overlay_Tiling",
"_Overlay_Offset", "_Overlay_Offset",
"_OVERLAY_UV_CHANNEL", "_OVERLAY_UV_CHANNEL",
"_Overlay_Intensity" "_Overlay_Intensity"
}; };
_showOverlayTexture = CreatePropertyGroup("Overlay Texture", shaderProperties, _showOverlayTexture, materialEditor, properties); _showOverlayTexture = CreatePropertyGroup("Overlay Texture", shaderProperties, _showOverlayTexture, materialEditor, properties);
// Snow Parameters // Snow Parameters
shaderProperties = new[] shaderProperties = new[]
{ {
"_Enable_Snow", "_Enable_Snow",
"_Snow_Metallic", "_Snow_Metallic",
"_Snow_Smoothness", "_Snow_Smoothness",
"_Snow_Level", "_Snow_Level",
"_Snow_Transition", "_Snow_Transition",
"_Snow_Transition_Threshold", "_Snow_Transition_Threshold",
"_Snow_Transition_Threshold_Steps", "_Snow_Transition_Threshold_Steps",
"_Snow_Transition_Threshold_Step_Count", "_Snow_Transition_Threshold_Step_Count",
"_Snow_Angle_Threshold", "_Snow_Angle_Threshold",
"_Snow_Color", "_Snow_Color",
"_Sea_Level", "_Sea_Level",
"_Snow_Edge_Noise", "_Snow_Edge_Noise",
"_Snow_Noise_Tiling", "_Snow_Noise_Tiling",
"_Snow_Noise_Offset", "_Snow_Noise_Offset",
"_Snow_Noise_Fade", "_Snow_Noise_Fade",
"_Snow_Noise_Top_To_Side_Difference", "_Snow_Noise_Top_To_Side_Difference",
"_Snow_Normal_Texture", "_Snow_Normal_Texture",
"_Snow_Overrides_Normals", "_Snow_Overrides_Normals",
"_Snow_Normal_Intensity", "_Snow_Normal_Intensity",
"_Snow_Normal_Tiling", "_Snow_Normal_Tiling",
"_Snow_Normal_Offset", "_Snow_Normal_Offset",
"_Snow_Normal_Fade", "_Snow_Normal_Fade",
"_Snow_Metallic_Smoothness_Texture", "_Snow_Metallic_Smoothness_Texture",
"_Snow_Metallic_Smoothness_Tiling", "_Snow_Metallic_Smoothness_Tiling",
"_Snow_Metallic_Smoothness_Offset" "_Snow_Metallic_Smoothness_Offset"
}; };
_showSnow = CreatePropertyGroup("Snow", shaderProperties, _showSnow, materialEditor, properties); _showSnow = CreatePropertyGroup("Snow", shaderProperties, _showSnow, materialEditor, properties);
} }
} }

View File

@@ -8,16 +8,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: FantasyKnights_01 m_Name: FantasyKnights_01
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -164,6 +168,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &1358846705396397422 --- !u!114 &1358846705396397422
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -176,7 +181,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10
--- !u!114 &7967226135815873431 --- !u!114 &7967226135815873431
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11

View File

@@ -8,16 +8,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: FantasyKnights_02 m_Name: FantasyKnights_02
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -164,6 +168,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &7993738256033606102 --- !u!114 &7993738256033606102
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -189,4 +194,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10

View File

@@ -8,16 +8,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: FantasyKnights_03 m_Name: FantasyKnights_03
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -164,6 +168,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5122993062315569858 --- !u!114 &5122993062315569858
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -176,7 +181,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10
--- !u!114 &8780454250115516571 --- !u!114 &8780454250115516571
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11

View File

@@ -21,16 +21,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: FantasyKnights_04 m_Name: FantasyKnights_04
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -177,6 +181,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &6809264838136373543 --- !u!114 &6809264838136373543
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -189,4 +194,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10

View File

@@ -25,7 +25,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10
--- !u!21 &2100000 --- !u!21 &2100000
Material: Material:
serializedVersion: 8 serializedVersion: 8
@@ -34,16 +34,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: FantasyKnights_05 m_Name: FantasyKnights_05
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -190,3 +194,4 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -8,16 +8,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: FantasyKnights_06 m_Name: FantasyKnights_06
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -164,6 +168,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &1513622437145775386 --- !u!114 &1513622437145775386
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -176,7 +181,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10
--- !u!114 &5488310361178818670 --- !u!114 &5488310361178818670
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11

View File

@@ -21,16 +21,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: HumanSpecies_01 m_Name: HumanSpecies_01
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -177,6 +181,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &153752790335324610 --- !u!114 &153752790335324610
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -189,4 +194,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10

View File

@@ -21,16 +21,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: HumanSpecies_02 m_Name: HumanSpecies_02
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -148,6 +152,7 @@ Material:
- _DirtAmount: 0.306 - _DirtAmount: 0.306
- _DstBlend: 0 - _DstBlend: 0
- _EnvironmentReflections: 1 - _EnvironmentReflections: 1
- _EyelinerAmount: 0
- _FeminieAmount: 0 - _FeminieAmount: 0
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.5 - _Glossiness: 0.5
@@ -176,6 +181,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &1793314631237679544 --- !u!114 &1793314631237679544
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -188,4 +194,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10

View File

@@ -21,16 +21,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: HumanSpecies_03 m_Name: HumanSpecies_03
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -177,6 +181,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &7804425326570313428 --- !u!114 &7804425326570313428
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -189,4 +194,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10

View File

@@ -21,16 +21,20 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: HumanSpecies_04 m_Name: HumanSpecies_04
m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, m_Shader: {fileID: -6465566751694194690, guid: db628544640279b41a4a7aa5d75c0322, type: 3}
type: 3} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2 m_LightmapFlags: 2
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@@ -177,6 +181,7 @@ Material:
- _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0} - _Grey: {r: 0.59748423, g: 0.59748423, b: 0.59748423, a: 0}
- _SkinColor: {r: 0, g: 0, b: 0, a: 0} - _SkinColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &6958986610217973014 --- !u!114 &6958986610217973014
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 11 m_ObjectHideFlags: 11
@@ -189,4 +194,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
version: 5 version: 10

View File

View File

@@ -1,29 +1,29 @@
using System.Resources; using System.Resources;
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("SQLite-net Official Portable Library")] [assembly: AssemblyTitle("SQLite-net Official Portable Library")]
[assembly: AssemblyDescription("Light weight library providing easy SQLite database storage")] [assembly: AssemblyDescription("Light weight library providing easy SQLite database storage")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Krueger Systems, Inc.")] [assembly: AssemblyCompany("Krueger Systems, Inc.")]
[assembly: AssemblyProduct("SQLite-net")] [assembly: AssemblyProduct("SQLite-net")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")] [assembly: NeutralResourcesLanguage("en")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //
// Major Version // Major Version
// Minor Version // Minor Version
// Build Number // Build Number
// Revision // Revision
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,15 @@
// Copyright (c) 2024 Synty Studios Limited. All rights reserved. // Copyright (c) 2024 Synty Studios Limited. All rights reserved.
// //
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA) // Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
// available at: https://syntystore.com/pages/end-user-licence-agreement // available at: https://syntystore.com/pages/end-user-licence-agreement
// //
// For additional details, see the LICENSE.MD file bundled with this software. // For additional details, see the LICENSE.MD file bundled with this software.
namespace Synty.SidekickCharacters namespace Synty.SidekickCharacters
{ {
public class DatabaseUpdateController public class DatabaseUpdateController
{ {
// This class is no longer required, and will be deleted in the future. // This class is no longer required, and will be deleted in the future.
// Included as an empty class to remove code dependencies to allow for deletion without causing project errors. // Included as an empty class to remove code dependencies to allow for deletion without causing project errors.
} }
} }

View File

@@ -1,396 +1,354 @@
// Copyright (c) 2025 Synty Studios Limited. All rights reserved. // Copyright (c) 2025 Synty Studios Limited. All rights reserved.
// //
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA) // Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
// available at: https://syntystore.com/pages/end-user-licence-agreement // available at: https://syntystore.com/pages/end-user-licence-agreement
// //
// For additional details, see the LICENSE.MD file bundled with this software. // For additional details, see the LICENSE.MD file bundled with this software.
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
using UnityEngine.UIElements; using UnityEngine.UIElements;
namespace Synty.SidekickCharacters namespace Synty.SidekickCharacters
{ {
public class ToolDownloader : EditorWindow public class ToolDownloader : EditorWindow
{ {
private const string _GIT_URL = "https://github.com/SyntyStudios/SidekicksToolRelease/releases/latest/download/Sidekicks.unitypackage"; private const string _GIT_URL = "https://github.com/SyntyStudios/SidekicksToolRelease/releases/latest/download/Sidekicks.unitypackage";
private const string _GIT_DB_URL = "https://github.com/SyntyStudios/SidekicksToolRelease/releases/latest/download/SidekicksDatabase.unitypackage"; private const string _GIT_DB_URL = "https://github.com/SyntyStudios/SidekicksToolRelease/releases/latest/download/SidekicksDatabase.unitypackage";
private const string _PACKAGE_CACHE = "Assets/DownloadCache/Sidekicks.unitypackage"; private const string _PACKAGE_CACHE = "Assets/DownloadCache/Sidekicks.unitypackage";
private const string _DB_PACKAGE_CACHE = "Assets/DownloadCache/SidekicksDatabase.unitypackage"; private const string _DB_PACKAGE_CACHE = "Assets/DownloadCache/SidekicksDatabase.unitypackage";
private const string _VERSION_FILE_NAME = "version.txt"; private const string _VERSION_FILE = "Assets/External/Models/SidekickCharacters/Scripts/Editor/version.txt";
private const string _VERSION_TAG = "\"tag_name\":"; private const string _VERSION_TAG = "\"tag_name\":";
private const string _VERSION_KEY = "sk_current_tool_version"; private const string _VERSION_KEY = "sk_current_tool_version";
private const string _SIDEKICK_TOOL_MENU_ITEM = "Synty/Sidekick Character Tool"; private const string _SIDEKICK_TOOL_MENU_ITEM = "Synty/Sidekick Character Tool";
private string _version = "-"; private string _version = "-";
private Label _latestVersion; private Label _latestVersion;
public void Awake() public void Awake()
{ {
BackgroundUpdateCheck(); BackgroundUpdateCheck();
} }
public void CreateGUI() public void CreateGUI()
{ {
VisualElement root = rootVisualElement; VisualElement root = rootVisualElement;
root.Clear(); root.Clear();
Button downloadButton = new Button(DownloadLatestDBVersion) Button downloadButton = new Button(DownloadLatestDBVersion)
{ {
text = "Download and Install", text = "Download and Install",
style = style =
{ {
height = 40 height = 40
} }
}; };
root.Add(downloadButton); root.Add(downloadButton);
Label textPrompt = new Label("This tool will download and install the latest version of the Sidekicks Tool."); Label textPrompt = new Label("This tool will download and install the latest version of the Sidekicks Tool.");
Label textPrompt2 = new Label("Or you can manually download from this link:\nhttps://github.com/SyntyStudios/SidekicksToolRelease/releases/latest/"); Label textPrompt2 = new Label("Or you can manually download from this link:\nhttps://github.com/SyntyStudios/SidekicksToolRelease/releases/latest/");
root.Add(textPrompt); root.Add(textPrompt);
root.Add(textPrompt2); root.Add(textPrompt2);
string version = LoadCurrentInstalledVersion(); string version = LoadCurrentInstalledVersion();
Label currentVersion = new Label("Currently Installed: " + (string.IsNullOrEmpty(version) ? "N/A" : version)) Label currentVersion = new Label("Currently Installed: " + (string.IsNullOrEmpty(version) ? "N/A" : version))
{ {
style = style =
{ {
marginTop = 5 marginTop = 5
} }
}; };
_latestVersion = new Label("Latest Version: " + _version); _latestVersion = new Label("Latest Version: " + _version);
root.Add(currentVersion); root.Add(currentVersion);
root.Add(_latestVersion); root.Add(_latestVersion);
Button changeLogButton = new Button() Button changeLogButton = new Button()
{ {
text = "Show Changelog" text = "Show Changelog"
}; };
root.Add(changeLogButton); root.Add(changeLogButton);
changeLogButton.clickable.clicked += delegate changeLogButton.clickable.clicked += delegate
{ {
Application.OpenURL("https://syntystore.com/pages/sidekicks-changelog"); Application.OpenURL("https://syntystore.com/pages/sidekicks-changelog");
}; };
} }
public async void BackgroundUpdateCheck() public async void BackgroundUpdateCheck()
{ {
_version = await CheckAvailableVersion(); _version = await CheckAvailableVersion();
if (_latestVersion != null) if (_latestVersion != null)
{ {
_latestVersion.text = "Latest Version: " + _version; _latestVersion.text = "Latest Version: " + _version;
} }
if (IsNewVersionAvailable(_version)) if (IsNewVersionAvailable(_version))
{ {
DownloaderBackgroundService.ShowToolDownloaderWindow(); DownloaderBackgroundService.ShowToolDownloaderWindow();
} }
} }
private async Task<string> CheckAvailableVersion() private async Task<string> CheckAvailableVersion()
{ {
HttpClient client = new HttpClient(); HttpClient client = new HttpClient();
string uri = "http://api.github.com/repos/SyntyStudios/SidekicksToolRelease/releases/latest"; string uri = "http://api.github.com/repos/SyntyStudios/SidekicksToolRelease/releases/latest";
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, uri); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, uri);
request.Headers.Add("Accept", "application/vnd.github+json"); request.Headers.Add("Accept", "application/vnd.github+json");
request.Headers.Add("X-GitHub-Api-Version", "2022-11-28"); request.Headers.Add("X-GitHub-Api-Version", "2022-11-28");
request.Headers.Add("User-Agent", "Sidekicks Download Tool"); request.Headers.Add("User-Agent", "Sidekicks Download Tool");
HttpResponseMessage response = await client.SendAsync(request); HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
// Read the response content as a string // Read the response content as a string
string responseBody = await response.Content.ReadAsStringAsync(); string responseBody = await response.Content.ReadAsStringAsync();
return GetVersionNumber(responseBody); return GetVersionNumber(responseBody);
} }
private string GetVersionNumber(string data) private string GetVersionNumber(string data)
{ {
int index = data.IndexOf(_VERSION_TAG, StringComparison.OrdinalIgnoreCase) + _VERSION_TAG.Length; int index = data.IndexOf(_VERSION_TAG, StringComparison.OrdinalIgnoreCase) + _VERSION_TAG.Length;
string portion = data.Substring(index, data.Length - index); string portion = data.Substring(index, data.Length - index);
string number = portion.Substring(0, portion.IndexOf(',')).Replace("\"", "").Replace(" ", ""); string number = portion.Substring(0, portion.IndexOf(',')).Replace("\"", "").Replace(" ", "");
return number; return number;
} }
private bool IsNewVersionAvailable(string version) private bool IsNewVersionAvailable(string version)
{ {
string currentVersion = LoadCurrentInstalledVersion(); string currentVersion = LoadCurrentInstalledVersion();
if (string.IsNullOrEmpty(currentVersion)) if (string.IsNullOrEmpty(currentVersion))
{ {
return true; return true;
} }
if (!currentVersion.Contains('.') || !version.Contains('.')) if (!currentVersion.Contains('.') || !version.Contains('.'))
{ {
return false; return false;
} }
string[] currentSplitVersion = currentVersion.Split('.'); string[] currentSplitVersion = currentVersion.Split('.');
string[] newSplitVersion = version.Split('.'); string[] newSplitVersion = version.Split('.');
if (currentSplitVersion.Length != newSplitVersion.Length) if (currentSplitVersion.Length != newSplitVersion.Length)
{ {
return false; return false;
} }
for (int i = 0; i < newSplitVersion.Length; i++) for (int i = 0; i < newSplitVersion.Length; i++)
{ {
if (int.TryParse(currentSplitVersion[i], out int current)) if (int.TryParse(currentSplitVersion[i], out int current))
{ {
if (int.TryParse(newSplitVersion[i], out int newVersion)) if (int.TryParse(newSplitVersion[i], out int newVersion))
{ {
if (newVersion > current) if (newVersion > current)
{ {
return true; return true;
} }
} }
} }
} }
return false; return false;
} }
private void SaveCurrentInstalledVersion(string version) private void SaveCurrentInstalledVersion(string version)
{ {
string versionFilePath = GetVersionFilePath(); File.WriteAllText(_VERSION_FILE, version);
if (string.IsNullOrEmpty(versionFilePath)) }
{
Debug.LogWarning("Unable to resolve Sidekick version file path."); private string LoadCurrentInstalledVersion()
return; {
} if (File.Exists(_VERSION_FILE))
{
File.WriteAllText(versionFilePath, version); return File.ReadAllText(_VERSION_FILE);
} }
private string LoadCurrentInstalledVersion() return null;
{ }
string versionFilePath = GetVersionFilePath();
if (string.IsNullOrEmpty(versionFilePath)) private void DownloadLatestDBVersion()
{ {
return null; WebClient client = new WebClient();
} client.DownloadFileCompleted += (sender, e) =>
{
if (File.Exists(versionFilePath)) if (e.Error == null)
{ {
return File.ReadAllText(versionFilePath); CloseOpenToolWindow();
} AssetDatabase.ImportPackage(_DB_PACKAGE_CACHE, false);
AssetDatabase.importPackageCompleted += ProceedWithInstall;
return null; }
} else
{
private string GetVersionFilePath() Debug.LogError("Error downloading file: " + e.Error.Message);
{ }
MonoScript currentScript = MonoScript.FromScriptableObject(this); };
if (currentScript == null)
{ // Ensure the directory exists
return null; string directory = Path.GetDirectoryName(_DB_PACKAGE_CACHE);
} if (!Directory.Exists(directory))
{
string scriptPath = AssetDatabase.GetAssetPath(currentScript); Directory.CreateDirectory(directory);
if (string.IsNullOrEmpty(scriptPath)) }
{
return null; client.DownloadFileAsync(new System.Uri(_GIT_DB_URL), _DB_PACKAGE_CACHE);
} }
string utilityDirectory = Path.GetDirectoryName(scriptPath); private async void DownloadLatestToolVersion()
if (string.IsNullOrEmpty(utilityDirectory)) {
{ WebClient client = new WebClient();
return null; _version = await CheckAvailableVersion();
} client.DownloadFileCompleted += (sender, e) =>
{
string editorDirectory = Path.GetDirectoryName(utilityDirectory); if (e.Error == null)
if (string.IsNullOrEmpty(editorDirectory)) {
{ SaveCurrentInstalledVersion(_version);
return null; AssetDatabase.ImportPackage(_PACKAGE_CACHE, false);
} AssetDatabase.importPackageCompleted += ProceedWithInstall;
}
return Path.GetFullPath(Path.Combine(editorDirectory, _VERSION_FILE_NAME)); else
} {
Debug.LogError("Error downloading file: " + e.Error.Message);
private void DownloadLatestDBVersion() }
{ };
WebClient client = new WebClient();
client.DownloadFileCompleted += (sender, e) => // Ensure the directory exists
{ string directory = Path.GetDirectoryName(_PACKAGE_CACHE);
if (e.Error == null) if (!Directory.Exists(directory))
{ {
CloseOpenToolWindow(); Directory.CreateDirectory(directory);
AssetDatabase.ImportPackage(_DB_PACKAGE_CACHE, false); }
AssetDatabase.importPackageCompleted += ProceedWithInstall;
} client.DownloadFileAsync(new System.Uri(_GIT_URL), _PACKAGE_CACHE);
else }
{
Debug.LogError("Error downloading file: " + e.Error.Message); private void ProceedWithInstall(string packageName)
} {
}; if (packageName == "SidekicksDatabase")
{
// Ensure the directory exists AssetDatabase.importPackageCompleted -= ProceedWithInstall;
string directory = Path.GetDirectoryName(_DB_PACKAGE_CACHE); DownloadLatestToolVersion();
if (!Directory.Exists(directory)) }
{ else if (packageName == "Sidekicks")
Directory.CreateDirectory(directory); {
} AssetDatabase.importPackageCompleted -= ProceedWithInstall;
DownloaderBackgroundService.RefreshWindow();
client.DownloadFileAsync(new System.Uri(_GIT_DB_URL), _DB_PACKAGE_CACHE);
} if (EditorUtility.DisplayDialog("Installation Finished", "Sidekick Tool installation has completed.", "Re-open Sidekicks Tool",
"Close"))
private async void DownloadLatestToolVersion() {
{ ReopenToolWindow();
WebClient client = new WebClient(); }
_version = await CheckAvailableVersion(); }
client.DownloadFileCompleted += (sender, e) => }
{
if (e.Error == null) private bool CloseOpenToolWindow()
{ {
SaveCurrentInstalledVersion(_version); EditorWindow[] allWindows = Resources.FindObjectsOfTypeAll<EditorWindow>();
AssetDatabase.ImportPackage(_PACKAGE_CACHE, false);
AssetDatabase.importPackageCompleted += ProceedWithInstall; // Filter the windows to find the one with the desired type name
} EditorWindow foundWindow = allWindows.FirstOrDefault(window => window.GetType().Name == "ModularCharacterWindow");
else
{ if (foundWindow != null)
Debug.LogError("Error downloading file: " + e.Error.Message); {
} foundWindow.Close();
}; Thread.Sleep(1500);
return true;
// Ensure the directory exists }
string directory = Path.GetDirectoryName(_PACKAGE_CACHE);
if (!Directory.Exists(directory)) return false;
{ }
Directory.CreateDirectory(directory);
} private void ReopenToolWindow()
{
client.DownloadFileAsync(new System.Uri(_GIT_URL), _PACKAGE_CACHE); try
} {
EditorApplication.ExecuteMenuItem(_SIDEKICK_TOOL_MENU_ITEM);
private void ProceedWithInstall(string packageName) }
{ catch (Exception ex)
if (packageName == "SidekicksDatabase") {
{ Debug.LogWarning("Sidekicks Tool menu item not found. Please verify installation.");
AssetDatabase.importPackageCompleted -= ProceedWithInstall; Debug.LogWarning("Exception details: " + ex.Message);
DownloadLatestToolVersion(); }
} }
else if (packageName == "Sidekicks") }
{
AssetDatabase.importPackageCompleted -= ProceedWithInstall; /// <summary>
DownloaderBackgroundService.RefreshWindow(); /// Creates an instance of the Downloader Tool, to allow checks for new versions on editor startup.
/// </summary>
if (EditorUtility.DisplayDialog("Installation Finished", "Sidekick Tool installation has completed.", "Re-open Sidekicks Tool", [InitializeOnLoad]
"Close")) public static class DownloaderBackgroundService
{ {
ReopenToolWindow(); private static ToolDownloader _instance;
}
} static DownloaderBackgroundService()
} {
EditorApplication.update += CreateToolInstance;
private bool CloseOpenToolWindow() }
{
EditorWindow[] allWindows = Resources.FindObjectsOfTypeAll<EditorWindow>(); static void CreateToolInstance()
{
// Filter the windows to find the one with the desired type name EditorApplication.update -= CreateToolInstance;
EditorWindow foundWindow = allWindows.FirstOrDefault(window => window.GetType().Name == "ModularCharacterWindow"); EditorWindow[] allWindows = Resources.FindObjectsOfTypeAll<EditorWindow>();
if (foundWindow != null) // Filter the windows to find the one with the desired type name
{ EditorWindow foundWindow = allWindows.FirstOrDefault(window => window.GetType().Name == "ToolDownloader");
foundWindow.Close();
Thread.Sleep(1500); if (foundWindow != null)
return true; {
} _instance = (ToolDownloader) foundWindow;
}
return false; else
} {
_instance = ScriptableObject.CreateInstance<ToolDownloader>();
private void ReopenToolWindow() }
{ _instance.titleContent.text = "Sidekick Tool Downloader";
try _instance.minSize = new Vector2(600, 150);
{ }
EditorApplication.ExecuteMenuItem(_SIDEKICK_TOOL_MENU_ITEM);
} /// <summary>
catch (Exception ex) /// Refreshes the Tool Downloader window to ensure it shows the latest version. Repaint is unreliable.
{ /// </summary>
Debug.LogWarning("Sidekicks Tool menu item not found. Please verify installation."); public static void RefreshWindow()
Debug.LogWarning("Exception details: " + ex.Message); {
} if (_instance == null)
} {
} CreateToolInstance();
}
/// <summary>
/// Creates an instance of the Downloader Tool, to allow checks for new versions on editor startup. _instance.Close();
/// </summary>
[InitializeOnLoad] if (_instance == null)
public static class DownloaderBackgroundService {
{ CreateToolInstance();
private static ToolDownloader _instance; }
static DownloaderBackgroundService() _instance.Show();
{ }
EditorApplication.update += CreateToolInstance;
} [MenuItem("Synty/Sidekick Tool Downloader")]
public static void ShowToolDownloaderWindow()
static void CreateToolInstance() {
{ if (_instance == null)
EditorApplication.update -= CreateToolInstance; {
EditorWindow[] allWindows = Resources.FindObjectsOfTypeAll<EditorWindow>(); CreateToolInstance();
}
// Filter the windows to find the one with the desired type name
EditorWindow foundWindow = allWindows.FirstOrDefault(window => window.GetType().Name == "ToolDownloader"); _instance.Show();
}
if (foundWindow != null) }
{ }
_instance = (ToolDownloader) foundWindow;
}
else
{
_instance = ScriptableObject.CreateInstance<ToolDownloader>();
}
_instance.titleContent.text = "Sidekick Tool Downloader";
_instance.minSize = new Vector2(600, 150);
}
/// <summary>
/// Refreshes the Tool Downloader window to ensure it shows the latest version. Repaint is unreliable.
/// </summary>
public static void RefreshWindow()
{
if (_instance == null)
{
CreateToolInstance();
}
_instance.Close();
if (_instance == null)
{
CreateToolInstance();
}
_instance.Show();
}
[MenuItem("Synty/Sidekick Tool Downloader")]
public static void ShowToolDownloaderWindow()
{
if (_instance == null)
{
CreateToolInstance();
}
_instance.Show();
}
}
}

View File

@@ -1 +1 @@
1.0.37 1.0.38

View File

@@ -230,42 +230,6 @@ namespace Synty.SidekickCharacters.API
await runtime.PopulatePresetLibrary(); await runtime.PopulatePresetLibrary();
} }
private static List<string> GetSidekickPartFiles()
{
string packageRootPath = DatabaseManager.GetPackageRootAbsolutePath();
if (!string.IsNullOrEmpty(packageRootPath))
{
string meshesRootPath = Path.Combine(packageRootPath, "Resources", "Meshes");
if (Directory.Exists(meshesRootPath))
{
return Directory
.GetFiles(meshesRootPath, "SK_*_*_*_*_*.fbx", SearchOption.AllDirectories)
.Select(ToAssetPath)
.ToList();
}
}
return Directory.GetFiles("Assets", "SK_*_*_*_*_*.fbx", SearchOption.AllDirectories).ToList();
}
private static string ToAssetPath(string fullPath)
{
if (string.IsNullOrWhiteSpace(fullPath))
{
return fullPath;
}
string normalizedFullPath = fullPath.Replace('\\', '/');
string normalizedAssetsPath = Application.dataPath.Replace('\\', '/');
if (!normalizedFullPath.StartsWith(normalizedAssetsPath, StringComparison.OrdinalIgnoreCase))
{
return normalizedFullPath;
}
return "Assets" + normalizedFullPath.Substring(normalizedAssetsPath.Length);
}
/// <summary> /// <summary>
/// Takes all the parts selected in the window, and combines them into a single model in the scene. /// Takes all the parts selected in the window, and combines them into a single model in the scene.
/// </summary> /// </summary>
@@ -548,7 +512,7 @@ namespace Synty.SidekickCharacters.API
_partOutfitToggleMap = new Dictionary<string, bool>(); _partOutfitToggleMap = new Dictionary<string, bool>();
_partCount = 0; _partCount = 0;
List<string> files = GetSidekickPartFiles(); List<string> files = Directory.GetFiles("Assets", "SK_*_*_*_*_*.fbx", SearchOption.AllDirectories).ToList();
foreach (CharacterPartType partType in Enum.GetValues(typeof(CharacterPartType))) foreach (CharacterPartType partType in Enum.GetValues(typeof(CharacterPartType)))
{ {
@@ -646,7 +610,7 @@ namespace Synty.SidekickCharacters.API
_speciesDictionary = new Dictionary<string, SidekickSpecies>(); _speciesDictionary = new Dictionary<string, SidekickSpecies>();
_partCount = 0; _partCount = 0;
List<string> files = GetSidekickPartFiles(); List<string> files = Directory.GetFiles("Assets", "SK_*_*_*_*_*.fbx", SearchOption.AllDirectories).ToList();
Dictionary<string, string> filesOnDisk = new Dictionary<string, string>(); Dictionary<string, string> filesOnDisk = new Dictionary<string, string>();
foreach (string file in files) foreach (string file in files)
{ {

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 37c1c136edf8d3744be383c6fac071a8 guid: 37c1c136edf8d3744be383c6fac071a8
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@@ -1,347 +1,347 @@
// Copyright (c) 2024 Synty Studios Limited. All rights reserved. // Copyright (c) 2024 Synty Studios Limited. All rights reserved.
// //
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA) // Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
// available at: https://syntystore.com/pages/end-user-licence-agreement // available at: https://syntystore.com/pages/end-user-licence-agreement
// //
// For additional details, see the LICENSE.MD file bundled with this software. // For additional details, see the LICENSE.MD file bundled with this software.
using SQLite; using SQLite;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UIElements; using UnityEngine.UIElements;
namespace Synty.SidekickCharacters.Database.DTO namespace Synty.SidekickCharacters.Database.DTO
{ {
[Table("sk_color_row")] [Table("sk_color_row")]
public class SidekickColorRow public class SidekickColorRow
{ {
private SidekickColorSet _colorSet; private SidekickColorSet _colorSet;
private SidekickColorProperty _colorProperty; private SidekickColorProperty _colorProperty;
private Color? _niceColor; private Color? _niceColor;
private Color? _niceMetallic; private Color? _niceMetallic;
private Color? _niceSmoothness; private Color? _niceSmoothness;
private Color? _niceReflection; private Color? _niceReflection;
private Color? _niceEmission; private Color? _niceEmission;
private Color? _niceOpacity; private Color? _niceOpacity;
[PrimaryKey, AutoIncrement, Column("id")] [PrimaryKey, AutoIncrement, Column("id")]
public int ID { get; set; } public int ID { get; set; }
[Column("ptr_color_set")] [Column("ptr_color_set")]
public int PtrColorSet { get; set; } public int PtrColorSet { get; set; }
[Column("ptr_color_property")] [Column("ptr_color_property")]
public int PtrColorProperty { get; set; } public int PtrColorProperty { get; set; }
[Column("color")] [Column("color")]
public string MainColor { get; set; } public string MainColor { get; set; }
[Column("metallic")] [Column("metallic")]
public string Metallic { get; set; } public string Metallic { get; set; }
[Column("smoothness")] [Column("smoothness")]
public string Smoothness { get; set; } public string Smoothness { get; set; }
[Column("reflection")] [Column("reflection")]
public string Reflection { get; set; } public string Reflection { get; set; }
[Column("emission")] [Column("emission")]
public string Emission { get; set; } public string Emission { get; set; }
[Column("opacity")] [Column("opacity")]
public string Opacity { get; set; } public string Opacity { get; set; }
[Ignore] [Ignore]
public SidekickColorSet ColorSet public SidekickColorSet ColorSet
{ {
get => _colorSet; get => _colorSet;
set set
{ {
_colorSet = value; _colorSet = value;
PtrColorSet = value.ID; PtrColorSet = value.ID;
} }
} }
[Ignore] [Ignore]
public SidekickColorProperty ColorProperty public SidekickColorProperty ColorProperty
{ {
get => _colorProperty; get => _colorProperty;
set set
{ {
_colorProperty = value; _colorProperty = value;
PtrColorProperty = value.ID; PtrColorProperty = value.ID;
} }
} }
[Ignore] [Ignore]
public Color NiceColor public Color NiceColor
{ {
get get
{ {
_niceColor ??= ColorUtility.TryParseHtmlString("#" + MainColor, out Color color) ? color : Color.white; _niceColor ??= ColorUtility.TryParseHtmlString("#" + MainColor, out Color color) ? color : Color.white;
return (Color) _niceColor; return (Color) _niceColor;
} }
set set
{ {
_niceColor = value; _niceColor = value;
MainColor = ColorUtility.ToHtmlStringRGB(value); MainColor = ColorUtility.ToHtmlStringRGB(value);
} }
} }
[Ignore] [Ignore]
public Color NiceMetallic public Color NiceMetallic
{ {
get get
{ {
_niceMetallic ??= ColorUtility.TryParseHtmlString("#" + Metallic, out Color color) ? color : Color.white; _niceMetallic ??= ColorUtility.TryParseHtmlString("#" + Metallic, out Color color) ? color : Color.white;
return (Color) _niceMetallic; return (Color) _niceMetallic;
} }
set set
{ {
_niceMetallic = value; _niceMetallic = value;
Metallic = ColorUtility.ToHtmlStringRGB(value); Metallic = ColorUtility.ToHtmlStringRGB(value);
} }
} }
[Ignore] [Ignore]
public Color NiceSmoothness public Color NiceSmoothness
{ {
get get
{ {
_niceSmoothness ??= ColorUtility.TryParseHtmlString("#" + Smoothness, out Color color) ? color : Color.white; _niceSmoothness ??= ColorUtility.TryParseHtmlString("#" + Smoothness, out Color color) ? color : Color.white;
return (Color) _niceSmoothness; return (Color) _niceSmoothness;
} }
set set
{ {
_niceSmoothness = value; _niceSmoothness = value;
Smoothness = ColorUtility.ToHtmlStringRGB(value); Smoothness = ColorUtility.ToHtmlStringRGB(value);
} }
} }
[Ignore] [Ignore]
public Color NiceReflection public Color NiceReflection
{ {
get get
{ {
_niceReflection ??= ColorUtility.TryParseHtmlString("#" + Reflection, out Color color) ? color : Color.white; _niceReflection ??= ColorUtility.TryParseHtmlString("#" + Reflection, out Color color) ? color : Color.white;
return (Color) _niceReflection; return (Color) _niceReflection;
} }
set set
{ {
_niceReflection = value; _niceReflection = value;
Reflection = ColorUtility.ToHtmlStringRGB(value); Reflection = ColorUtility.ToHtmlStringRGB(value);
} }
} }
[Ignore] [Ignore]
public Color NiceEmission public Color NiceEmission
{ {
get get
{ {
_niceEmission ??= ColorUtility.TryParseHtmlString("#" + Emission, out Color color) ? color : Color.white; _niceEmission ??= ColorUtility.TryParseHtmlString("#" + Emission, out Color color) ? color : Color.white;
return (Color) _niceEmission; return (Color) _niceEmission;
} }
set set
{ {
_niceEmission = value; _niceEmission = value;
Emission = ColorUtility.ToHtmlStringRGB(value); Emission = ColorUtility.ToHtmlStringRGB(value);
} }
} }
[Ignore] [Ignore]
public Color NiceOpacity public Color NiceOpacity
{ {
get get
{ {
_niceOpacity ??= ColorUtility.TryParseHtmlString("#" + Opacity, out Color color) ? color : Color.white; _niceOpacity ??= ColorUtility.TryParseHtmlString("#" + Opacity, out Color color) ? color : Color.white;
return (Color) _niceOpacity; return (Color) _niceOpacity;
} }
set set
{ {
_niceOpacity = value; _niceOpacity = value;
Opacity = ColorUtility.ToHtmlStringRGB(value); Opacity = ColorUtility.ToHtmlStringRGB(value);
} }
} }
[Ignore] [Ignore]
public bool IsLocked { get; set; } public bool IsLocked { get; set; }
[Ignore] [Ignore]
public Image ButtonImage { get; set; } public Image ButtonImage { get; set; }
/// <summary> /// <summary>
/// Gets a list of all the Color Rows in the database. /// Gets a list of all the Color Rows in the database.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
/// <returns>A list of all Color Rows in the database.</returns> /// <returns>A list of all Color Rows in the database.</returns>
public static List<SidekickColorRow> GetAll(DatabaseManager dbManager) public static List<SidekickColorRow> GetAll(DatabaseManager dbManager)
{ {
List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>().ToList(); List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>().ToList();
foreach (SidekickColorRow row in rows) foreach (SidekickColorRow row in rows)
{ {
Decorate(dbManager, row); Decorate(dbManager, row);
} }
return rows; return rows;
} }
/// <summary> /// <summary>
/// Gets a specific Color Row by its database ID. /// Gets a specific Color Row by its database ID.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
/// <param name="id">The id of the required Color Row.</param> /// <param name="id">The id of the required Color Row.</param>
/// <returns>The specific Color Row if it exists; otherwise null.</returns> /// <returns>The specific Color Row if it exists; otherwise null.</returns>
public static SidekickColorRow GetByID(DatabaseManager dbManager, int id) public static SidekickColorRow GetByID(DatabaseManager dbManager, int id)
{ {
SidekickColorRow row = dbManager.GetCurrentDbConnection().Find<SidekickColorRow>(id); SidekickColorRow row = dbManager.GetCurrentDbConnection().Find<SidekickColorRow>(id);
Decorate(dbManager, row); Decorate(dbManager, row);
return row; return row;
} }
/// <summary> /// <summary>
/// Gets a list of all the Color Rows in the database that have the matching Property. /// Gets a list of all the Color Rows in the database that have the matching Property.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
/// <param name="property">The property to get all the color rows for.</param> /// <param name="property">The property to get all the color rows for.</param>
/// <returns>A list of all color rows in the database for the given property.</returns> /// <returns>A list of all color rows in the database for the given property.</returns>
public static List<SidekickColorRow> GetAllByProperty(DatabaseManager dbManager, SidekickColorProperty property) public static List<SidekickColorRow> GetAllByProperty(DatabaseManager dbManager, SidekickColorProperty property)
{ {
List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>() List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>()
.Where(row => row.PtrColorProperty == property.ID) .Where(row => row.PtrColorProperty == property.ID)
.ToList(); .ToList();
foreach (SidekickColorRow row in rows) foreach (SidekickColorRow row in rows)
{ {
row.ColorProperty = property; row.ColorProperty = property;
Decorate(dbManager, row); Decorate(dbManager, row);
} }
return rows; return rows;
} }
/// <summary> /// <summary>
/// Gets a list of all the Color Rows in the database that have the matching Set and Property. /// Gets a list of all the Color Rows in the database that have the matching Set and Property.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
/// <param name="set">The color set to get the color rows for.</param> /// <param name="set">The color set to get the color rows for.</param>
/// <param name="property">The property to get all the color rows for.</param> /// <param name="property">The property to get all the color rows for.</param>
/// <returns>A list of all color rows in the database for the given set and property.</returns> /// <returns>A list of all color rows in the database for the given set and property.</returns>
public static List<SidekickColorRow> GetAllBySetAndProperty(DatabaseManager dbManager, SidekickColorSet set, SidekickColorProperty property) public static List<SidekickColorRow> GetAllBySetAndProperty(DatabaseManager dbManager, SidekickColorSet set, SidekickColorProperty property)
{ {
List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>() List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>()
.Where(row => row.PtrColorSet == set.ID && row.PtrColorProperty == property.ID) .Where(row => row.PtrColorSet == set.ID && row.PtrColorProperty == property.ID)
.ToList(); .ToList();
foreach (SidekickColorRow row in rows) foreach (SidekickColorRow row in rows)
{ {
row.ColorSet = set; row.ColorSet = set;
row.ColorProperty = property; row.ColorProperty = property;
Decorate(dbManager, row); Decorate(dbManager, row);
} }
return rows; return rows;
} }
/// <summary> /// <summary>
/// Gets a list of all the Color Rows in the database that have the matching Set. /// Gets a list of all the Color Rows in the database that have the matching Set.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
/// <param name="set">The color set to get the color rows for.</param> /// <param name="set">The color set to get the color rows for.</param>
/// <returns>A list of all color rows in the database for the given set.</returns> /// <returns>A list of all color rows in the database for the given set.</returns>
public static List<SidekickColorRow> GetAllBySet(DatabaseManager dbManager, SidekickColorSet set) public static List<SidekickColorRow> GetAllBySet(DatabaseManager dbManager, SidekickColorSet set)
{ {
List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>() List<SidekickColorRow> rows = dbManager.GetCurrentDbConnection().Table<SidekickColorRow>()
.Where(row => row.PtrColorSet == set.ID) .Where(row => row.PtrColorSet == set.ID)
.ToList(); .ToList();
foreach (SidekickColorRow row in rows) foreach (SidekickColorRow row in rows)
{ {
row.ColorSet = set; row.ColorSet = set;
Decorate(dbManager, row); Decorate(dbManager, row);
} }
return rows; return rows;
} }
/// <summary> /// <summary>
/// Creates a SidekickColorRow from a SidekickColorPresetRow. /// Creates a SidekickColorRow from a SidekickColorPresetRow.
/// </summary> /// </summary>
/// <param name="row">The SidekickColorPresetRow to convert.</param> /// <param name="row">The SidekickColorPresetRow to convert.</param>
/// <returns>A SidekickColorRow created from a SidekickColorPresetRow.</returns> /// <returns>A SidekickColorRow created from a SidekickColorPresetRow.</returns>
public static SidekickColorRow CreateFromPresetColorRow(SidekickColorPresetRow row) public static SidekickColorRow CreateFromPresetColorRow(SidekickColorPresetRow row)
{ {
SidekickColorRow newRow = new SidekickColorRow() SidekickColorRow newRow = new SidekickColorRow()
{ {
MainColor = row.MainColor, MainColor = row.MainColor,
Emission = row.Emission, Emission = row.Emission,
Metallic = row.Metallic, Metallic = row.Metallic,
Opacity = row.Opacity, Opacity = row.Opacity,
Reflection = row.Reflection, Reflection = row.Reflection,
Smoothness = row.Smoothness, Smoothness = row.Smoothness,
ColorProperty = row.ColorProperty ColorProperty = row.ColorProperty
}; };
return newRow; return newRow;
} }
/// <summary> /// <summary>
/// Ensures that the given row has its nice DTO class properties set /// Ensures that the given row has its nice DTO class properties set
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
/// <param name="row">The color row to decorate</param> /// <param name="row">The color row to decorate</param>
/// <returns>A color row with all DTO class properties set</returns> /// <returns>A color row with all DTO class properties set</returns>
private static void Decorate(DatabaseManager dbManager, SidekickColorRow row) private static void Decorate(DatabaseManager dbManager, SidekickColorRow row)
{ {
// don't need PtrColorProperty check as should always be >= 0; if it's not, we have bad data and want the error // don't need PtrColorProperty check as should always be >= 0; if it's not, we have bad data and want the error
row.ColorProperty ??= SidekickColorProperty.GetByID(dbManager, row.PtrColorProperty); row.ColorProperty ??= SidekickColorProperty.GetByID(dbManager, row.PtrColorProperty);
if (row.ColorSet == null && row.PtrColorSet >= 0) if (row.ColorSet == null && row.PtrColorSet >= 0)
{ {
row.ColorSet = SidekickColorSet.GetByID(dbManager, row.PtrColorSet); row.ColorSet = SidekickColorSet.GetByID(dbManager, row.PtrColorSet);
} }
} }
/// <summary> /// <summary>
/// Delete this color row from the database. /// Delete this color row from the database.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
public void Delete(DatabaseManager dbManager) public void Delete(DatabaseManager dbManager)
{ {
int deletedCount = dbManager.GetCurrentDbConnection().Delete<SidekickColorRow>(ID); int deletedCount = dbManager.GetCurrentDbConnection().Delete<SidekickColorRow>(ID);
if (deletedCount == 0) if (deletedCount == 0)
{ {
throw new Exception($"Could not delete color set with ID '{ID}'"); throw new Exception($"Could not delete color set with ID '{ID}'");
} }
} }
/// <summary> /// <summary>
/// Inserts, or updates the values in the database, depending on this object has been saved before or not. /// Inserts, or updates the values in the database, depending on this object has been saved before or not.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
public void Save(DatabaseManager dbManager) public void Save(DatabaseManager dbManager)
{ {
if (ID < 0) if (ID < 0)
{ {
SaveToDB(dbManager); SaveToDB(dbManager);
} }
else else
{ {
UpdateDB(dbManager); UpdateDB(dbManager);
} }
} }
/// <summary> /// <summary>
/// Saves this Color Set to the database with the current values. /// Saves this Color Set to the database with the current values.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
private void SaveToDB(DatabaseManager dbManager) private void SaveToDB(DatabaseManager dbManager)
{ {
SQLiteConnection connection = dbManager.GetCurrentDbConnection(); SQLiteConnection connection = dbManager.GetCurrentDbConnection();
int insertCount = connection.Insert(this); int insertCount = connection.Insert(this);
if (insertCount == 0) if (insertCount == 0)
{ {
throw new Exception("Unable to save current color row"); throw new Exception("Unable to save current color row");
} }
// in theory this could return a different ID, but in practice it's highly unlikely // in theory this could return a different ID, but in practice it's highly unlikely
ID = (int) SQLite3.LastInsertRowid(connection.Handle); ID = (int) SQLite3.LastInsertRowid(connection.Handle);
} }
/// <summary> /// <summary>
/// Updates this Color Set in the database with the current values. /// Updates this Color Set in the database with the current values.
/// </summary> /// </summary>
/// <param name="dbManager">The Database Manager to use.</param> /// <param name="dbManager">The Database Manager to use.</param>
private void UpdateDB(DatabaseManager dbManager) private void UpdateDB(DatabaseManager dbManager)
{ {
int updatedCount = dbManager.GetCurrentDbConnection().Update(this); int updatedCount = dbManager.GetCurrentDbConnection().Update(this);
if (updatedCount == 0) if (updatedCount == 0)
{ {
throw new Exception($"Could not update color row with ID '{ID}'"); throw new Exception($"Could not update color row with ID '{ID}'");
} }
} }
} }
} }

View File

@@ -154,18 +154,6 @@ namespace Synty.SidekickCharacters.Database.DTO
/// <returns>A color set with all DTO class properties set</returns> /// <returns>A color set with all DTO class properties set</returns>
private static void Decorate(DatabaseManager dbManager, SidekickColorSet set) private static void Decorate(DatabaseManager dbManager, SidekickColorSet set)
{ {
if (set == null)
{
return;
}
set.SourceColorPath = DatabaseManager.NormalizeLegacyAssetPath(set.SourceColorPath);
set.SourceMetallicPath = DatabaseManager.NormalizeLegacyAssetPath(set.SourceMetallicPath);
set.SourceSmoothnessPath = DatabaseManager.NormalizeLegacyAssetPath(set.SourceSmoothnessPath);
set.SourceReflectionPath = DatabaseManager.NormalizeLegacyAssetPath(set.SourceReflectionPath);
set.SourceEmissionPath = DatabaseManager.NormalizeLegacyAssetPath(set.SourceEmissionPath);
set.SourceOpacityPath = DatabaseManager.NormalizeLegacyAssetPath(set.SourceOpacityPath);
if (set.Species == null && set.PtrSpecies >= 0) if (set.Species == null && set.PtrSpecies >= 0)
{ {
set.Species = SidekickSpecies.GetByID(dbManager, set.PtrSpecies); set.Species = SidekickSpecies.GetByID(dbManager, set.PtrSpecies);

Some files were not shown because too many files have changed in this diff Show More