diff --git a/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/FaceUpdate.cs b/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/FaceUpdate.cs index e0aa76f06..2eaf79af4 100644 --- a/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/FaceUpdate.cs +++ b/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/FaceUpdate.cs @@ -39,10 +39,10 @@ void OnGUI () void Update () { - + /* if (Input.GetMouseButton (0)) { current = 1; - } else if (!isKeepFace) { + } else */ if (!isKeepFace) { current = Mathf.Lerp (current, 0, delayWeight); } anim.SetLayerWeight (1, current); diff --git a/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/IdleChanger.cs b/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/IdleChanger.cs index c55e2f627..6cd2dee94 100644 --- a/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/IdleChanger.cs +++ b/HDRP-DefaultVolumeProject-2020.3/Assets/Samples/UTS3/Runtime/Scripts/IdleChanger.cs @@ -40,7 +40,8 @@ void Start () // Update is called once per frame void Update () - { + { + /* // ↑キー/スペースが押されたら、ステートを次に送る処理 if (Input.GetKeyDown ("up") || Input.GetButton ("Jump")) { // ブーリアンNextをtrueにする @@ -52,8 +53,9 @@ void Update () // ブーリアンBackをtrueにする anim.SetBool ("Back", true); } - - // "Next"フラグがtrueの時の処理 + */ + + // "Next"フラグがtrueの時の処理 if (anim.GetBool ("Next")) { // 現在のステートをチェックし、ステート名が違っていたらブーリアンをfalseに戻す currentState = anim.GetCurrentAnimatorStateInfo (0); diff --git a/HDRP-DefaultVolumeProject-2020.3/Assets/Scenes/SampleScene.unity b/HDRP-DefaultVolumeProject-2020.3/Assets/Scenes/SampleScene.unity index 8fd483b2b..b4559f8d2 100644 --- a/HDRP-DefaultVolumeProject-2020.3/Assets/Scenes/SampleScene.unity +++ b/HDRP-DefaultVolumeProject-2020.3/Assets/Scenes/SampleScene.unity @@ -132,7 +132,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1377783} - - component: {fileID: 1377784} m_Layer: 0 m_Name: Lighting m_TagString: Untagged @@ -160,177 +159,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1377784 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1377782} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: db8edd5c572b6e648974dac4815d5619, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ToonLightHiCutFilter: 0 - m_ExposureAdjustmnt: 0 - m_HighCutFilter: 1000000 - m_AnimationCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: -10 - value: -10 - inSlope: 0 - outSlope: 1 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: -1.32 - value: -1.32 - inSlope: 1 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - m_ExposureArray: - - -10 - - -9.931654 - - -9.863307 - - -9.794961 - - -9.726614 - - -9.658268 - - -9.589921 - - -9.521575 - - -9.453228 - - -9.384882 - - -9.316535 - - -9.248189 - - -9.179843 - - -9.111496 - - -9.04315 - - -8.974803 - - -8.906457 - - -8.83811 - - -8.769764 - - -8.701417 - - -8.633071 - - -8.564724 - - -8.496378 - - -8.428032 - - -8.359685 - - -8.291339 - - -8.222992 - - -8.154646 - - -8.086299 - - -8.017953 - - -7.9496064 - - -7.88126 - - -7.8129134 - - -7.744567 - - -7.6762204 - - -7.607874 - - -7.5395274 - - -7.471181 - - -7.402835 - - -7.3344884 - - -7.266142 - - -7.1977954 - - -7.129449 - - -7.0611024 - - -6.992756 - - -6.9244094 - - -6.856063 - - -6.7877164 - - -6.71937 - - -6.651024 - - -6.5826774 - - -6.514331 - - -6.4459844 - - -6.377638 - - -6.3092914 - - -6.240945 - - -6.1725984 - - -6.104252 - - -6.0359054 - - -5.9675593 - - -5.899213 - - -5.8308663 - - -5.76252 - - -5.6941733 - - -5.625827 - - -5.5574803 - - -5.489134 - - -5.4207873 - - -5.352441 - - -5.2840943 - - -5.2157483 - - -5.147402 - - -5.0790553 - - -5.010709 - - -4.9423623 - - -4.874016 - - -4.8056693 - - -4.737323 - - -4.6689763 - - -4.60063 - - -4.532284 - - -4.4639373 - - -4.395591 - - -4.3272443 - - -4.258898 - - -4.1905513 - - -4.122205 - - -4.0538583 - - -3.9855118 - - -3.9171658 - - -3.8488188 - - -3.7804728 - - -3.7121258 - - -3.6437798 - - -3.5754333 - - -3.5070868 - - -3.4387403 - - -3.3703938 - - -3.3020473 - - -3.2337008 - - -3.1653547 - - -3.0970078 - - -3.0286617 - - -2.9603148 - - -2.8919687 - - -2.8236222 - - -2.7552757 - - -2.6869292 - - -2.6185827 - - -2.5502362 - - -2.4818897 - - -2.4135437 - - -2.3451967 - - -2.2768507 - - -2.2085037 - - -2.1401577 - - -2.0718112 - - -2.0034647 - - -1.9351177 - - -1.8667717 - - -1.7984257 - - -1.7300787 - - -1.6617327 - - -1.5933857 - - -1.5250397 - - -1.4566927 - - -1.3883467 - - -1.3199997 - m_Max: -1.32 - m_Min: -10 - m_DebugUI: 0 --- !u!1 &23481561 GameObject: m_ObjectHideFlags: 0 @@ -4788,6 +4616,208 @@ Transform: m_CorrespondingSourceObject: {fileID: 3163352547752738580, guid: 045bfee370fc8c84ca955348ca9f3fd9, type: 3} m_PrefabInstance: {fileID: 409468208} m_PrefabAsset: {fileID: 0} +--- !u!1 &413353050 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 413353052} + - component: {fileID: 413353051} + m_Layer: 0 + m_Name: Toon Ev Adjustment Curve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &413353051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 413353050} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: db8edd5c572b6e648974dac4815d5619, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ToonLightHiCutFilter: 1 + m_ExposureAdjustmnt: 1 + m_HighCutFilter: 1000000 + m_AnimationCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -10 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: -2.3278127 + value: -1.8682407 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_ExposureArray: + - -10 + - -9.998967 + - -9.995886 + - -9.990782 + - -9.983679 + - -9.974604 + - -9.96358 + - -9.950634 + - -9.93579 + - -9.919074 + - -9.900511 + - -9.880126 + - -9.857944 + - -9.83399 + - -9.80829 + - -9.780868 + - -9.75175 + - -9.720961 + - -9.688526 + - -9.654471 + - -9.61882 + - -9.581599 + - -9.542832 + - -9.502546 + - -9.460764 + - -9.417513 + - -9.372817 + - -9.326703 + - -9.279194 + - -9.230315 + - -9.180094 + - -9.128552 + - -9.075718 + - -9.021615 + - -8.9662695 + - -8.909705 + - -8.851948 + - -8.793023 + - -8.732956 + - -8.671772 + - -8.609495 + - -8.54615 + - -8.481766 + - -8.416363 + - -8.349969 + - -8.282608 + - -8.214307 + - -8.145088 + - -8.07498 + - -8.004005 + - -7.9321904 + - -7.8595605 + - -7.78614 + - -7.711954 + - -7.6370287 + - -7.561388 + - -7.485058 + - -7.408064 + - -7.33043 + - -7.252182 + - -7.1733465 + - -7.0939455 + - -7.0140066 + - -6.9335546 + - -6.8526134 + - -6.7712097 + - -6.6893682 + - -6.607114 + - -6.5244713 + - -6.441468 + - -6.3581257 + - -6.274472 + - -6.1905313 + - -6.1063285 + - -6.021889 + - -5.937238 + - -5.8524017 + - -5.7674036 + - -5.6822705 + - -5.5970254 + - -5.5116954 + - -5.4263043 + - -5.3408785 + - -5.255442 + - -5.1700206 + - -5.0846395 + - -4.9993243 + - -4.9140997 + - -4.8289905 + - -4.744022 + - -4.6592193 + - -4.5746083 + - -4.4902134 + - -4.4060597 + - -4.322173 + - -4.238579 + - -4.155301 + - -4.0723658 + - -3.9897976 + - -3.9076223 + - -3.8258643 + - -3.7445488 + - -3.6637015 + - -3.5833478 + - -3.5035133 + - -3.42422 + - -3.3454971 + - -3.267367 + - -3.189857 + - -3.1129909 + - -3.0367937 + - -2.9612918 + - -2.886508 + - -2.8124704 + - -2.739203 + - -2.6667304 + - -2.595077 + - -2.5242705 + - -2.4543343 + - -2.385294 + - -2.317175 + - -2.250001 + - -2.1837997 + - -2.1185937 + - -2.0544105 + - -1.9912729 + - -1.9292078 + - -1.8682407 + m_Max: -2.3278127 + m_Min: -10 + m_DebugUI: 0 +--- !u!4 &413353052 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 413353050} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 20 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &424002116 PrefabInstance: m_ObjectHideFlags: 0 @@ -6819,208 +6849,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 8110425016416769263, guid: dd7bc729052fb0349850831c3c596d60, type: 3} m_PrefabInstance: {fileID: 553938282} m_PrefabAsset: {fileID: 0} ---- !u!1 &561912584 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 561912586} - - component: {fileID: 561912585} - m_Layer: 0 - m_Name: Toon Ev Adjustment Curve - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &561912585 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 561912584} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: db8edd5c572b6e648974dac4815d5619, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ToonLightHiCutFilter: 0 - m_ExposureAdjustmnt: 1 - m_HighCutFilter: 1000000 - m_AnimationCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: -10 - value: -10 - inSlope: 0 - outSlope: 1 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: -1.32 - value: -1.32 - inSlope: 1 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - m_ExposureArray: - - -10 - - -9.931654 - - -9.863307 - - -9.794961 - - -9.726614 - - -9.658268 - - -9.589921 - - -9.521575 - - -9.453228 - - -9.384882 - - -9.316535 - - -9.248189 - - -9.179843 - - -9.111496 - - -9.04315 - - -8.974803 - - -8.906457 - - -8.83811 - - -8.769764 - - -8.701417 - - -8.633071 - - -8.564724 - - -8.496378 - - -8.428032 - - -8.359685 - - -8.291339 - - -8.222992 - - -8.154646 - - -8.086299 - - -8.017953 - - -7.9496064 - - -7.88126 - - -7.8129134 - - -7.744567 - - -7.6762204 - - -7.607874 - - -7.5395274 - - -7.471181 - - -7.402835 - - -7.3344884 - - -7.266142 - - -7.1977954 - - -7.129449 - - -7.0611024 - - -6.992756 - - -6.9244094 - - -6.856063 - - -6.7877164 - - -6.71937 - - -6.651024 - - -6.5826774 - - -6.514331 - - -6.4459844 - - -6.377638 - - -6.3092914 - - -6.240945 - - -6.1725984 - - -6.104252 - - -6.0359054 - - -5.9675593 - - -5.899213 - - -5.8308663 - - -5.76252 - - -5.6941733 - - -5.625827 - - -5.5574803 - - -5.489134 - - -5.4207873 - - -5.352441 - - -5.2840943 - - -5.2157483 - - -5.147402 - - -5.0790553 - - -5.010709 - - -4.9423623 - - -4.874016 - - -4.8056693 - - -4.737323 - - -4.6689763 - - -4.60063 - - -4.532284 - - -4.4639373 - - -4.395591 - - -4.3272443 - - -4.258898 - - -4.1905513 - - -4.122205 - - -4.0538583 - - -3.9855118 - - -3.9171658 - - -3.8488188 - - -3.7804728 - - -3.7121258 - - -3.6437798 - - -3.5754333 - - -3.5070868 - - -3.4387403 - - -3.3703938 - - -3.3020473 - - -3.2337008 - - -3.1653547 - - -3.0970078 - - -3.0286617 - - -2.9603148 - - -2.8919687 - - -2.8236222 - - -2.7552757 - - -2.6869292 - - -2.6185827 - - -2.5502362 - - -2.4818897 - - -2.4135437 - - -2.3451967 - - -2.2768507 - - -2.2085037 - - -2.1401577 - - -2.0718112 - - -2.0034647 - - -1.9351177 - - -1.8667717 - - -1.7984257 - - -1.7300787 - - -1.6617327 - - -1.5933857 - - -1.5250397 - - -1.4566927 - - -1.3883467 - - -1.3199997 - m_Max: -1.32 - m_Min: -10 - m_DebugUI: 0 ---- !u!4 &561912586 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 561912584} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 20 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &566695218 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/com.unity.toonshader/CHANGELOG.md b/com.unity.toonshader/CHANGELOG.md index f6a841693..09d328217 100644 --- a/com.unity.toonshader/CHANGELOG.md +++ b/com.unity.toonshader/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## [0.2.1-preview] - 2021-08-18 +* HDRP: Fixed: Multiple instances of Toon EV adjustment cureve can exist in one scene. + ## [0.2.0-preview] - 2021-08-17 * HDRP: Toon EV adjutment curve as a Mono-behavior. * Legacy, Universal and HDRP: Some texture samplers,such as _MainTex, _NormalMap, _1st_ShadeMap and _2nd_ShadeMap, are shared by 1 sampler, sampler_MainTex, in order to avoid sampler number exceeding errors. diff --git a/com.unity.toonshader/Documentation~/index.md b/com.unity.toonshader/Documentation~/index.md index e4c975a3c..db74f43ba 100644 --- a/com.unity.toonshader/Documentation~/index.md +++ b/com.unity.toonshader/Documentation~/index.md @@ -1,4 +1,4 @@ -# Unity Toon Shader 0.2.0-preview Manual +# Unity Toon Shader 0.2.1-preview Manual ***Read this document in [日本語版](ja/index_ja.md)*** [![](images/SDUnitychan_URP.png)](https://www.youtube.com/watch?v=TfZ8B409uqM) @@ -49,7 +49,7 @@ Several techniques have been implemented to beautifully display characters in a See for yourself by coloring your best character model with Unity Toon Shader. You may be surprised to see your character looking better than ever before. -This manual focuses on the latest version of Unity Toon Shader: **Unity Toon Shader v.0.2.0-preview**. +This manual focuses on the latest version of Unity Toon Shader: **Unity Toon Shader v.0.2.1-preview**. In this manual, the screen of Unity Toon Shader for Universal Render Pipeline is used as an example, but the ones for the Legacy (Built-in) and HDRP versions are alomost the same with URP, so please read it accordingly. ## 【Start using Unity Toon Shader】 @@ -226,7 +226,7 @@ The Color Space must be set to `Linear`. -The following sample scenes can be found by opening the sample project and opening the `Assets\Samples\Unity Toon Shader\0.2.0-preview\Universal RP\Sample Scenes(Universal)` folder. +The following sample scenes can be found by opening the sample project and opening the `Assets\Samples\Unity Toon Shader\0.2.1-preview\Universal RP\Sample Scenes(Universal)` folder. * ToonShader.unity :Settings for an illustration-style shader. * ToonShader_CelLook.unity :Settings for a cel-style shader. @@ -249,8 +249,8 @@ They should come in handy as an example when creating your own scenes. 【**NOTE**】 Sample scenes for other render pipeline can be found in the following folder. -* for Legacy (Built-in):`Assets\Samples\Unity Toon Shader\0.2.0-preview\Legacy (built-in)\Runtime` folder -* for HDRP:`Assets\Samples\Unity Toon Shader\0.2.0-preview\High definition render pipeline\Runtime` folder +* for Legacy (Built-in):`Assets\Samples\Unity Toon Shader\0.2.1-preview\Legacy (built-in)\Runtime` folder +* for HDRP:`Assets\Samples\Unity Toon Shader\0.2.1-preview\High definition render pipeline\Runtime` folder # Unity Toon Shader Setting Menu:Unity Toon Shader Custom Inspector diff --git a/com.unity.toonshader/Documentation~/ja/index_ja.md b/com.unity.toonshader/Documentation~/ja/index_ja.md index 98c6c7a92..fcce39c7d 100644 --- a/com.unity.toonshader/Documentation~/ja/index_ja.md +++ b/com.unity.toonshader/Documentation~/ja/index_ja.md @@ -1,4 +1,4 @@ -# Unity Toon Shader 0.2.0-preview マニュアル +# Unity Toon Shader 0.2.1-preview マニュアル ***Read this document in [English](../index.md)*** [![](../images/SDUnitychan_URP.png)](https://www.youtube.com/watch?v=TfZ8B409uqM) @@ -49,7 +49,7 @@ Unity Toon Shader は、セルルック3DCGアニメーションの制作現場 是非、貴方のご自慢のキャラクターモデルをUnity Toon Shaderで彩ってみてください。 今まで以上に、キャラクターが美しく表現されるものと思います。 -本マニュアルは、Unity Toon Shader の最新版 **Unity Toon Shader v.0.2.0-preview** 向けに書かれています。 +本マニュアルは、Unity Toon Shader の最新版 **Unity Toon Shader v.0.2.1-preview** 向けに書かれています。 またマニュアル中では、Universal Render Pipeline版のUnity Toon Shaderの画面を例として使用しますが、Legacy(Built-in)およびHDRP版に関しましても、ほぼ同様の画面となっていますので、適宜読み替えてください。 ## 【Unity Toon Shaderを使い始める】 @@ -223,7 +223,7 @@ Universal RP 用サンプルは`Project Setting`ダイアログで `UTS2URPPipel -サンプルプロジェクトを開くと、`Assets\Samples\Unity Toon Shader\0.2.0-preview\Universal RP\Sample Scenes(Universal)`フォルダ以下に、次のようなサンプルシーンがあります。 +サンプルプロジェクトを開くと、`Assets\Samples\Unity Toon Shader\0.2.1-preview\Universal RP\Sample Scenes(Universal)`フォルダ以下に、次のようなサンプルシーンがあります。 * ToonShader.unity :イラストルックのシェーダー設定 * ToonShader_CelLook.unity :セルルックのシェーダー設定 @@ -246,8 +246,8 @@ Universal RP 用サンプルは`Project Setting`ダイアログで `UTS2URPPipel 【**NOTE**】 その他のレンダーパイプライン向けのサンプルシーンは以下のフォルダに入っています。 -* Legacy(Built-in)の場合:`Assets\Samples\Unity Toon Shader\0.2.0-preview\Legacy (built-in)\Runtime`フォルダ -* HDRPの場合:`Assets\Samples\Unity Toon Shader\0.2.0-preview\High definition render pipeline\Runtime`フォルダ  +* Legacy(Built-in)の場合:`Assets\Samples\Unity Toon Shader\0.2.1-preview\Legacy (built-in)\Runtime`フォルダ +* HDRPの場合:`Assets\Samples\Unity Toon Shader\0.2.1-preview\High definition render pipeline\Runtime`フォルダ  # Unity Toon Shader 設定メニュー:Unity Toon Shaderカスタムインスペクター diff --git a/com.unity.toonshader/Editor/ToonEvAdjustmentCurveInspector.cs b/com.unity.toonshader/Editor/ToonEvAdjustmentCurveInspector.cs index dc25c1376..7fc8b3249 100644 --- a/com.unity.toonshader/Editor/ToonEvAdjustmentCurveInspector.cs +++ b/com.unity.toonshader/Editor/ToonEvAdjustmentCurveInspector.cs @@ -17,7 +17,7 @@ public override void OnInspectorGUI() { const string labelLightAdjustment = "Toon EV Adjustment"; const string labelLightAdjustmentCurve = "Curve"; - const string labelLightHighCutFilter = "Light High-Cult Filter"; + const string labelLightHighCutFilter = "Light High-Cut Filter"; #if ADJUSTMENT_CURVE_DEBUG_UI const string labelExposureMin = "Min:"; const string labelExposureMax = "Max:"; @@ -103,10 +103,19 @@ float ConvertToEV100(float val) [MenuItem("GameObject/Toon Shader/Create Toon Ev Adjustment Curve", false, 9999)] static void CreateToonEvAdjustmentCurveGameObject() { - var go = new GameObject(); - go.name = "Toon Ev Adjustment Curve"; - go.AddComponent(); - Undo.RegisterCreatedObjectUndo(go, "Create Toon Ev Adjustment Curve"); + var obj = FindObjectOfType(); + if (obj == null) + { + var go = new GameObject(); + go.name = "Toon Ev Adjustment Curve"; + go.AddComponent(); + Undo.RegisterCreatedObjectUndo(go, "Create Toon Ev Adjustment Curve"); + Selection.activeGameObject = go; + } + else + { + Selection.activeGameObject = obj.gameObject; + } } } } \ No newline at end of file diff --git a/com.unity.toonshader/Editor/UTS_GUIBase.cs b/com.unity.toonshader/Editor/UTS_GUIBase.cs index 5da8601f3..d651621a8 100644 --- a/com.unity.toonshader/Editor/UTS_GUIBase.cs +++ b/com.unity.toonshader/Editor/UTS_GUIBase.cs @@ -29,7 +29,7 @@ public class UTS_GUIBase : UnityEditor.ShaderGUI { protected const float kVersionX = 0.0f; protected const float kVersionY = 2.0f; - protected const float kVersionZ = 0.0f; + protected const float kVersionZ = 1.0f; internal virtual string srpDefaultLightModeName { get; } internal virtual void TessellationSetting(Material materal) { } diff --git a/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToon.shader b/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToon.shader index cb45520b3..a76c42f10 100644 --- a/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToon.shader +++ b/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToon.shader @@ -13,7 +13,7 @@ Shader "HDRP/Toon" [HideInInspector] [Enum(OFF, 0, ON, 1)] _isUnityToonshader("Material is touched by Unity Toon Shader", Int) = 1 [HideInInspector] _utsVersionX("VersionX", Float) = 0 [HideInInspector] _utsVersionY("VersionY", Float) = 2 - [HideInInspector] _utsVersionZ("VersionZ", Float) = 0 + [HideInInspector] _utsVersionZ("VersionZ", Float) = 1 diff --git a/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToonTessellation.shader b/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToonTessellation.shader index 513622081..e109e97ca 100644 --- a/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToonTessellation.shader +++ b/com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToonTessellation.shader @@ -12,7 +12,7 @@ Shader "HDRP/ToonTessellation" [HideInInspector] _simpleUI("SimpleUI", Int) = 0 [HideInInspector] _utsVersionX("VersionX", Float) = 0 [HideInInspector] _utsVersionY("VersionY", Float) = 2 - [HideInInspector] _utsVersionZ("VersionZ", Float) = 0 + [HideInInspector] _utsVersionZ("VersionZ", Float) = 1 // Reminder. Color here are in linear but the UI (color picker) do the conversion sRGB to linear diff --git a/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToon.shader b/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToon.shader index 003356f32..3d8ec28f0 100644 --- a/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToon.shader +++ b/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToon.shader @@ -8,7 +8,7 @@ Shader "Toon (Built-in)" { [HideInInspector][Enum(OFF, 0, ON, 1)] _isUnityToonshader("Material is touched by Unity Toon Shader", Int) = 1 [HideInInspector] _utsVersionX("VersionX", Float) = 0 [HideInInspector] _utsVersionY("VersionY", Float) = 2 - [HideInInspector] _utsVersionZ("VersionZ", Float) = 0 + [HideInInspector] _utsVersionZ("VersionZ", Float) = 1 [HideInInspector] _utsTechnique ("Technique", int ) = 0 //DWF [HideInInspector] _AutoRenderQueue("Automatic Render Queue ", int) = 1 diff --git a/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToonTessellation.shader b/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToonTessellation.shader index ad8b41c89..e402a6a50 100644 --- a/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToonTessellation.shader +++ b/com.unity.toonshader/Runtime/Legacy/Shaders/LegacyToonTessellation.shader @@ -8,7 +8,7 @@ Shader "ToonTessellation (Built-in)" { [HideInInspector][Enum(OFF, 0, ON, 1)] _isUnityToonshader("Material is touched by Unity Toon Shader", Int) = 1 [HideInInspector] _utsVersionX("VersionX", Float) = 0 [HideInInspector] _utsVersionY("VersionY", Float) = 2 - [HideInInspector] _utsVersionZ("VersionZ", Float) = 0 + [HideInInspector] _utsVersionZ("VersionZ", Float) = 1 [HideInInspector] _utsTechnique ("Technique", int ) = 0 //DWF [HideInInspector] _AutoRenderQueue("Automatic Render Queue ", int) = 1 diff --git a/com.unity.toonshader/Runtime/ToonEvAdjustmentCurve.cs b/com.unity.toonshader/Runtime/ToonEvAdjustmentCurve.cs index b7d6314ac..320c8f271 100644 --- a/com.unity.toonshader/Runtime/ToonEvAdjustmentCurve.cs +++ b/com.unity.toonshader/Runtime/ToonEvAdjustmentCurve.cs @@ -42,11 +42,33 @@ public class ToonEvAdjustmentCurve : MonoBehaviour [SerializeField] internal bool m_DebugUI; + private static ToonEvAdjustmentCurve instance; #if UNITY_EDITOR #pragma warning restore CS0414 bool m_isCompiling = false; #endif + + void Awake() + { + if (instance == null) + { + instance = this as ToonEvAdjustmentCurve; + return; + } + else if (instance == this) + { + return ; + } + Debug.LogError("There is ToonEvAdjustmentCurve instance in hierarchy."); +#if UNITY_EDITOR + DestroyImmediate(this); + Selection.activeGameObject = instance.gameObject; +#else + Destroy(this); +#endif + } + void Reset() { OnDisable(); @@ -94,7 +116,8 @@ void Update() { // on compile begin m_isCompiling = true; - Release(); + // Release(); no need + return; // } else if (!EditorApplication.isCompiling && m_isCompiling) { @@ -176,22 +199,7 @@ void Release() m_initialized = false; } -/* - public static void DestroyUnityObject(UnityObject obj) - { - if (obj != null) - { -#if UNITY_EDITOR - if (Application.isPlaying) - UnityObject.Destroy(obj); - else - UnityObject.DestroyImmediate(obj); -#else - UnityObject.Destroy(obj); -#endif - } - } -*/ + } diff --git a/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToon.shader b/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToon.shader index e7229c654..8b2764fa8 100644 --- a/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToon.shader +++ b/com.unity.toonshader/Runtime/UniversalRP/Shaders/UniversalToon.shader @@ -9,7 +9,7 @@ Shader "Universal Render Pipeline/Toon" { [HideInInspector] [Enum(OFF, 0, ON, 1)] _isUnityToonshader("Material is touched by Unity Toon Shader", Int) = 1 [HideInInspector] _utsVersionX("VersionX", Float) = 0 [HideInInspector] _utsVersionY("VersionY", Float) = 2 - [HideInInspector] _utsVersionZ("VersionZ", Float) = 0 + [HideInInspector] _utsVersionZ("VersionZ", Float) = 1 [HideInInspector] _utsTechnique("Technique", int) = 0 //DWF [HideInInspector] _AutoRenderQueue("Automatic Render Queue ", int) = 1 diff --git a/com.unity.toonshader/package.json b/com.unity.toonshader/package.json index bb269bb06..952fa575b 100644 --- a/com.unity.toonshader/package.json +++ b/com.unity.toonshader/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.toonshader", "displayName":"Unity Toon Shader", - "version": "0.2.0-preview", + "version": "0.2.1-preview", "unity": "2019.4", "description": "Unity Toon Shader (Unity-Chan Toon Shader 3) is a toon shader for images and video that is designed to meet the needs of creators working on cel-shaded 3DCG animations.\nUnlike other pre-render toon shaders, all features can be adjusted in real time on Unity, which is the greatest feature of UTS.\n\nUTS has great power and makes a wide variety of character designs possible, from cel-shaded to light novel illustration styles.\n\nUTS has the 3 basic layers of Base Color, 1st Shade Color, and 2nd Shade Color, colors and textures can also accept a wide variety of customization options, such as High Color, Rim Light, MatCap (sphere mapping), and Emissive (light emission).The level of gradation (feather) between colors can also be adjusted in Unity in real-time.\n\nMore precisely, View documentation above.", "samples": [