From 8a7fd63044282a46c3e1c33c155c5c1d9bc92d3b Mon Sep 17 00:00:00 2001 From: Ashy <50887858+arranash@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:24:35 +0000 Subject: [PATCH 01/14] Added Bakery light types --- EQS_Types/Bakery/Type_BakeryDirectLight.cs | 52 +++++++++++++++++++ EQS_Types/Bakery/Type_BakeryLightMesh.cs | 49 ++++++++++++++++++ EQS_Types/Bakery/Type_BakeryPointLight.cs | 58 ++++++++++++++++++++++ EQS_Types/Bakery/Type_BakerySkyLight.cs | 45 +++++++++++++++++ 4 files changed, 204 insertions(+) create mode 100644 EQS_Types/Bakery/Type_BakeryDirectLight.cs create mode 100644 EQS_Types/Bakery/Type_BakeryLightMesh.cs create mode 100644 EQS_Types/Bakery/Type_BakeryPointLight.cs create mode 100644 EQS_Types/Bakery/Type_BakerySkyLight.cs diff --git a/EQS_Types/Bakery/Type_BakeryDirectLight.cs b/EQS_Types/Bakery/Type_BakeryDirectLight.cs new file mode 100644 index 0000000..9b41aa4 --- /dev/null +++ b/EQS_Types/Bakery/Type_BakeryDirectLight.cs @@ -0,0 +1,52 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakeryDirectLight : Type_Base + { + [System.NonSerialized] + private BakeryPointLight type; + + + public SharedColor color = new SharedColor(); + public SharedFloat intensity = new SharedFloat(); + public SharedFloat shadowSpread = new SharedFloat(); + public SharedInt shadowSamples = new SharedInt(); + public SharedFloat indirectIntensity = new SharedFloat(); + public SharedBool antiAlias = new SharedBool(); + + + public override void Setup(Object type) + { + + // base.Setup(type); + BakeryDirectLight component = (BakeryDirectLight)type; + color.Setup(component.color); + intensity.Setup(component.intensity); + shadowSpread.Setup(component.shadowSpread); + shadowSamples.Setup(component.samples); + indirectIntensity.Setup(component.indirectIntensity); + antiAlias.Setup(component.supersample); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakeryDirectLight component = (BakeryDirectLight)type; + component.color = color.Get(buildTarget); + component.intensity = intensity.Get(buildTarget); + component.shadowSpread = shadowSpread.Get(buildTarget); + component.samples = shadowSamples.Get(buildTarget); + component.indirectIntensity = indirectIntensity.Get(buildTarget); + component.supersample = antiAlias.Get(buildTarget); + + + } + } +} +#endif diff --git a/EQS_Types/Bakery/Type_BakeryLightMesh.cs b/EQS_Types/Bakery/Type_BakeryLightMesh.cs new file mode 100644 index 0000000..367701e --- /dev/null +++ b/EQS_Types/Bakery/Type_BakeryLightMesh.cs @@ -0,0 +1,49 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakeryLightMesh : Type_Base + { + [System.NonSerialized] + private BakeryLightMesh type; + + public SharedFloat intensity = new SharedFloat(); + public SharedColor color = new SharedColor(); + public SharedInt samplesNear = new SharedInt(); + public SharedInt samplesFar = new SharedInt(); + public SharedBool selfShadow = new SharedBool(); + public SharedFloat indirectIntensity = new SharedFloat(); + + public override void Setup(Object type) + { + + // base.Setup(type); + BakeryLightMesh component = (BakeryLightMesh)type; + intensity.Setup(component.intensity); + color.Setup(component.color); + samplesNear.Setup(component.samples); + samplesFar.Setup(component.samples2); + selfShadow.Setup(component.selfShadow); + indirectIntensity.Setup(component.indirectIntensity); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakeryLightMesh component = (BakeryLightMesh)type; + component.intensity = intensity.Get(buildTarget); + component.color = color.Get(buildTarget); + component.samples = samplesNear.Get(buildTarget); + component.samples2 = samplesFar.Get(buildTarget); + component.selfShadow = selfShadow.Get(buildTarget); + component.indirectIntensity = indirectIntensity.Get(buildTarget); + + } + } +} +#endif diff --git a/EQS_Types/Bakery/Type_BakeryPointLight.cs b/EQS_Types/Bakery/Type_BakeryPointLight.cs new file mode 100644 index 0000000..eda62ee --- /dev/null +++ b/EQS_Types/Bakery/Type_BakeryPointLight.cs @@ -0,0 +1,58 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakeryPointLight : Type_Base + { + [System.NonSerialized] + private BakeryPointLight type; + + + public SharedColor color = new SharedColor(); + public SharedFloat intensity = new SharedFloat(); + public SharedFloat shadowSpread = new SharedFloat(); + public SharedBool physicalFalloff = new SharedBool(); + public SharedFloat range = new SharedFloat(); + public SharedInt samples = new SharedInt(); + public SharedBool legacySampling = new SharedBool(); + public SharedFloat indirectIntensity = new SharedFloat(); + + + public override void Setup(Object type) + { + + // base.Setup(type); + BakeryPointLight component = (BakeryPointLight)type; + color.Setup(component.color); + intensity.Setup(component.intensity); + shadowSpread.Setup(component.shadowSpread); + physicalFalloff.Setup(component.realisticFalloff); + range.Setup(component.cutoff); + samples.Setup(component.samples); + legacySampling.Setup(component.legacySampling); + indirectIntensity.Setup(component.indirectIntensity); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakeryPointLight component = (BakeryPointLight)type; + component.color = color.Get(buildTarget); + component.intensity = intensity.Get(buildTarget); + component.shadowSpread = shadowSpread.Get(buildTarget); + component.realisticFalloff = physicalFalloff.Get(buildTarget); + component.cutoff = range.Get(buildTarget); + component.samples = samples.Get(buildTarget); + component.legacySampling = legacySampling.Get(buildTarget); + component.indirectIntensity = indirectIntensity.Get(buildTarget); + + + } + } +} +#endif diff --git a/EQS_Types/Bakery/Type_BakerySkyLight.cs b/EQS_Types/Bakery/Type_BakerySkyLight.cs new file mode 100644 index 0000000..913e928 --- /dev/null +++ b/EQS_Types/Bakery/Type_BakerySkyLight.cs @@ -0,0 +1,45 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakerySkyLight : Type_Base + { + [System.NonSerialized] + private BakerySkyLight type; + + + public SharedColor color = new SharedColor(); + public SharedFloat intensity = new SharedFloat(); + public SharedInt samples = new SharedInt(); + public SharedBool hemispherical = new SharedBool(); + + + public override void Setup(Object type) + { + + // base.Setup(type); + BakerySkyLight component = (BakerySkyLight)type; + color.Setup(component.color); + intensity.Setup(component.intensity); + samples.Setup(component.samples); + hemispherical.Setup(component.hemispherical); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakerySkyLight component = (BakerySkyLight)type; + component.color = color.Get(buildTarget); + component.intensity = intensity.Get(buildTarget); + component.samples = samples.Get(buildTarget); + component.hemispherical = hemispherical.Get(buildTarget); + + } + } +} +#endif From 011d4fbfb96ca6e3eda014f8815e0c0aa671b8ea Mon Sep 17 00:00:00 2001 From: Ashy <50887858+arranash@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:33:11 +0000 Subject: [PATCH 02/14] Minor fixes, check desc Types now check for bakery in project, prevents errors if bakery not in project Added bakery to assembly definition or else cannot be seen Renamed types to better fit format --- EQS_Types/Bakery.meta | 8 ++++++++ ...DirectLight.cs => Type_Bakery_DirectLight.cs} | 15 +++++++-------- EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta | 11 +++++++++++ ...keryLightMesh.cs => Type_Bakery_LightMesh.cs} | 4 ++-- EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta | 11 +++++++++++ ...ryPointLight.cs => Type_Bakery_PointLight.cs} | 5 ++--- EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta | 11 +++++++++++ ...BakerySkyLight.cs => Type_Bakery_SkyLight.cs} | 5 ++--- EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta | 11 +++++++++++ EQS_Types/Type_Base.cs | 4 ++++ EQS_Types/Type_Light.cs | 11 +++++++++++ EQS_Types/Type_Material.cs | 10 ++++++++++ vrchat.jordo.easyquestswitch.asmdef | 16 ++++++++++++++++ vrchat.jordo.easyquestswitch.asmdef.meta | 7 +++++++ 14 files changed, 113 insertions(+), 16 deletions(-) create mode 100644 EQS_Types/Bakery.meta rename EQS_Types/Bakery/{Type_BakeryDirectLight.cs => Type_Bakery_DirectLight.cs} (87%) create mode 100644 EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta rename EQS_Types/Bakery/{Type_BakeryLightMesh.cs => Type_Bakery_LightMesh.cs} (94%) create mode 100644 EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta rename EQS_Types/Bakery/{Type_BakeryPointLight.cs => Type_Bakery_PointLight.cs} (95%) create mode 100644 EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta rename EQS_Types/Bakery/{Type_BakerySkyLight.cs => Type_Bakery_SkyLight.cs} (93%) create mode 100644 EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta create mode 100644 vrchat.jordo.easyquestswitch.asmdef create mode 100644 vrchat.jordo.easyquestswitch.asmdef.meta diff --git a/EQS_Types/Bakery.meta b/EQS_Types/Bakery.meta new file mode 100644 index 0000000..1422d37 --- /dev/null +++ b/EQS_Types/Bakery.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9adf41d51a7a0204b8e346434b81d35f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_BakeryDirectLight.cs b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs similarity index 87% rename from EQS_Types/Bakery/Type_BakeryDirectLight.cs rename to EQS_Types/Bakery/Type_Bakery_DirectLight.cs index 9b41aa4..f9a794a 100644 --- a/EQS_Types/Bakery/Type_BakeryDirectLight.cs +++ b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,11 +6,10 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakeryDirectLight : Type_Base + public class Type_Bakery_DirectLight : Type_Base { [System.NonSerialized] - private BakeryPointLight type; - + private BakeryDirectLight type; public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); @@ -22,8 +21,8 @@ public class Type_BakeryDirectLight : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + + // base.Setup(type); BakeryDirectLight component = (BakeryDirectLight)type; color.Setup(component.color); intensity.Setup(component.intensity); @@ -36,7 +35,7 @@ public override void Setup(Object type) public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + // base.Process(type, buildTarget); BakeryDirectLight component = (BakeryDirectLight)type; component.color = color.Get(buildTarget); component.intensity = intensity.Get(buildTarget); @@ -49,4 +48,4 @@ public override void Process(Object type, BuildTarget buildTarget) } } } -#endif +#endif \ No newline at end of file diff --git a/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta new file mode 100644 index 0000000..6147116 --- /dev/null +++ b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e8012b2d70506674fbd804b790ea107d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_BakeryLightMesh.cs b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs similarity index 94% rename from EQS_Types/Bakery/Type_BakeryLightMesh.cs rename to EQS_Types/Bakery/Type_Bakery_LightMesh.cs index 367701e..2baa05e 100644 --- a/EQS_Types/Bakery/Type_BakeryLightMesh.cs +++ b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakeryLightMesh : Type_Base + public class Type_Bakery_LightMesh : Type_Base { [System.NonSerialized] private BakeryLightMesh type; diff --git a/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta new file mode 100644 index 0000000..7fae7bf --- /dev/null +++ b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4926681700fda043ba1c62b78f8cc70 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_BakeryPointLight.cs b/EQS_Types/Bakery/Type_Bakery_PointLight.cs similarity index 95% rename from EQS_Types/Bakery/Type_BakeryPointLight.cs rename to EQS_Types/Bakery/Type_Bakery_PointLight.cs index eda62ee..e13e850 100644 --- a/EQS_Types/Bakery/Type_BakeryPointLight.cs +++ b/EQS_Types/Bakery/Type_Bakery_PointLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,12 +6,11 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakeryPointLight : Type_Base + public class Type_Bakery_PointLight : Type_Base { [System.NonSerialized] private BakeryPointLight type; - public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); public SharedFloat shadowSpread = new SharedFloat(); diff --git a/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta b/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta new file mode 100644 index 0000000..95b7faf --- /dev/null +++ b/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3768b2a53b6c29940837fd2632794868 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_BakerySkyLight.cs b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs similarity index 93% rename from EQS_Types/Bakery/Type_BakerySkyLight.cs rename to EQS_Types/Bakery/Type_Bakery_SkyLight.cs index 913e928..e5c3ae5 100644 --- a/EQS_Types/Bakery/Type_BakerySkyLight.cs +++ b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,12 +6,11 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakerySkyLight : Type_Base + public class Type_Bakery_SkyLight : Type_Base { [System.NonSerialized] private BakerySkyLight type; - public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); public SharedInt samples = new SharedInt(); diff --git a/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta new file mode 100644 index 0000000..0d5efe3 --- /dev/null +++ b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c38a5407f5c88f479ae605e5ef906ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Type_Base.cs b/EQS_Types/Type_Base.cs index fe3805c..59f2fc5 100644 --- a/EQS_Types/Type_Base.cs +++ b/EQS_Types/Type_Base.cs @@ -8,6 +8,10 @@ namespace EasyQuestSwitch.Types public abstract class Type_Base : MonoBehaviour { public abstract void Setup(Object type); + + // Override without calling base to setup custom migration + public virtual void Setup(Object type, int currentVersion) => Setup(type); + public abstract void Process(Object type, BuildTarget buildTarget); } } diff --git a/EQS_Types/Type_Light.cs b/EQS_Types/Type_Light.cs index c570bb6..c14abe7 100644 --- a/EQS_Types/Type_Light.cs +++ b/EQS_Types/Type_Light.cs @@ -34,6 +34,17 @@ public override void Setup(Object type) RenderMode.Setup(component.renderMode); } + public override void Setup(Object type, int currentVersion) + { + Light component = (Light)type; + if (currentVersion == 0) // 0 -> 131 upgrade + { + LightType.Setup(component.type); + Range.Setup(component.range); + RenderMode.Setup(component.renderMode); + } + } + public override void Process(Object type, BuildTarget buildTarget) { base.Process(type, buildTarget); diff --git a/EQS_Types/Type_Material.cs b/EQS_Types/Type_Material.cs index 45de15f..1b584cf 100644 --- a/EQS_Types/Type_Material.cs +++ b/EQS_Types/Type_Material.cs @@ -26,6 +26,16 @@ public override void Setup(Object type) GPUInstancing.Setup(material.enableInstancing); } + public override void Setup(Object type, int currentVersion) + { + Material material = (Material)type; + if (currentVersion == 0) // 0 -> 131 upgrade + { + MainColor.Setup(material.color); + GPUInstancing.Setup(material.enableInstancing); + } + } + public override void Process(Object type, BuildTarget buildTarget) { Material material = (Material)type; diff --git a/vrchat.jordo.easyquestswitch.asmdef b/vrchat.jordo.easyquestswitch.asmdef new file mode 100644 index 0000000..1679e99 --- /dev/null +++ b/vrchat.jordo.easyquestswitch.asmdef @@ -0,0 +1,16 @@ +{ + "name": "vrchat.jordo.easyquestswitch", + "rootNamespace": "", + "references": [ + "GUID:a1653399f63795746b1857281d1e400d" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/vrchat.jordo.easyquestswitch.asmdef.meta b/vrchat.jordo.easyquestswitch.asmdef.meta new file mode 100644 index 0000000..751e382 --- /dev/null +++ b/vrchat.jordo.easyquestswitch.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d072839ead224a342acd9b4b74e9fb90 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 0d9c67b54d11e1b3031ce74a63e9ea35e27cd2d2 Mon Sep 17 00:00:00 2001 From: Ashy <50887858+arranash@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:43:51 +0000 Subject: [PATCH 03/14] Revert "Minor fixes, check desc" This reverts commit 011d4fbfb96ca6e3eda014f8815e0c0aa671b8ea. --- EQS_Types/Bakery.meta | 8 -------- ..._DirectLight.cs => Type_BakeryDirectLight.cs} | 15 ++++++++------- ...kery_LightMesh.cs => Type_BakeryLightMesh.cs} | 4 ++-- ...ry_PointLight.cs => Type_BakeryPointLight.cs} | 5 +++-- ...Bakery_SkyLight.cs => Type_BakerySkyLight.cs} | 5 +++-- EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta | 11 ----------- EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta | 11 ----------- EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta | 11 ----------- EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta | 11 ----------- EQS_Types/Type_Base.cs | 4 ---- EQS_Types/Type_Light.cs | 11 ----------- EQS_Types/Type_Material.cs | 10 ---------- vrchat.jordo.easyquestswitch.asmdef | 16 ---------------- vrchat.jordo.easyquestswitch.asmdef.meta | 7 ------- 14 files changed, 16 insertions(+), 113 deletions(-) delete mode 100644 EQS_Types/Bakery.meta rename EQS_Types/Bakery/{Type_Bakery_DirectLight.cs => Type_BakeryDirectLight.cs} (87%) rename EQS_Types/Bakery/{Type_Bakery_LightMesh.cs => Type_BakeryLightMesh.cs} (94%) rename EQS_Types/Bakery/{Type_Bakery_PointLight.cs => Type_BakeryPointLight.cs} (95%) rename EQS_Types/Bakery/{Type_Bakery_SkyLight.cs => Type_BakerySkyLight.cs} (93%) delete mode 100644 EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta delete mode 100644 EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta delete mode 100644 EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta delete mode 100644 EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta delete mode 100644 vrchat.jordo.easyquestswitch.asmdef delete mode 100644 vrchat.jordo.easyquestswitch.asmdef.meta diff --git a/EQS_Types/Bakery.meta b/EQS_Types/Bakery.meta deleted file mode 100644 index 1422d37..0000000 --- a/EQS_Types/Bakery.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9adf41d51a7a0204b8e346434b81d35f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_DirectLight.cs b/EQS_Types/Bakery/Type_BakeryDirectLight.cs similarity index 87% rename from EQS_Types/Bakery/Type_Bakery_DirectLight.cs rename to EQS_Types/Bakery/Type_BakeryDirectLight.cs index f9a794a..9b41aa4 100644 --- a/EQS_Types/Bakery/Type_Bakery_DirectLight.cs +++ b/EQS_Types/Bakery/Type_BakeryDirectLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR && BAKERY_INCLUDED +#if UNITY_EDITOR using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,10 +6,11 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_DirectLight : Type_Base + public class Type_BakeryDirectLight : Type_Base { [System.NonSerialized] - private BakeryDirectLight type; + private BakeryPointLight type; + public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); @@ -21,8 +22,8 @@ public class Type_Bakery_DirectLight : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + + // base.Setup(type); BakeryDirectLight component = (BakeryDirectLight)type; color.Setup(component.color); intensity.Setup(component.intensity); @@ -35,7 +36,7 @@ public override void Setup(Object type) public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + // base.Process(type, buildTarget); BakeryDirectLight component = (BakeryDirectLight)type; component.color = color.Get(buildTarget); component.intensity = intensity.Get(buildTarget); @@ -48,4 +49,4 @@ public override void Process(Object type, BuildTarget buildTarget) } } } -#endif \ No newline at end of file +#endif diff --git a/EQS_Types/Bakery/Type_Bakery_LightMesh.cs b/EQS_Types/Bakery/Type_BakeryLightMesh.cs similarity index 94% rename from EQS_Types/Bakery/Type_Bakery_LightMesh.cs rename to EQS_Types/Bakery/Type_BakeryLightMesh.cs index 2baa05e..367701e 100644 --- a/EQS_Types/Bakery/Type_Bakery_LightMesh.cs +++ b/EQS_Types/Bakery/Type_BakeryLightMesh.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR && BAKERY_INCLUDED +#if UNITY_EDITOR using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_LightMesh : Type_Base + public class Type_BakeryLightMesh : Type_Base { [System.NonSerialized] private BakeryLightMesh type; diff --git a/EQS_Types/Bakery/Type_Bakery_PointLight.cs b/EQS_Types/Bakery/Type_BakeryPointLight.cs similarity index 95% rename from EQS_Types/Bakery/Type_Bakery_PointLight.cs rename to EQS_Types/Bakery/Type_BakeryPointLight.cs index e13e850..eda62ee 100644 --- a/EQS_Types/Bakery/Type_Bakery_PointLight.cs +++ b/EQS_Types/Bakery/Type_BakeryPointLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR && BAKERY_INCLUDED +#if UNITY_EDITOR using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,11 +6,12 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_PointLight : Type_Base + public class Type_BakeryPointLight : Type_Base { [System.NonSerialized] private BakeryPointLight type; + public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); public SharedFloat shadowSpread = new SharedFloat(); diff --git a/EQS_Types/Bakery/Type_Bakery_SkyLight.cs b/EQS_Types/Bakery/Type_BakerySkyLight.cs similarity index 93% rename from EQS_Types/Bakery/Type_Bakery_SkyLight.cs rename to EQS_Types/Bakery/Type_BakerySkyLight.cs index e5c3ae5..913e928 100644 --- a/EQS_Types/Bakery/Type_Bakery_SkyLight.cs +++ b/EQS_Types/Bakery/Type_BakerySkyLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR && BAKERY_INCLUDED +#if UNITY_EDITOR using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,11 +6,12 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_SkyLight : Type_Base + public class Type_BakerySkyLight : Type_Base { [System.NonSerialized] private BakerySkyLight type; + public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); public SharedInt samples = new SharedInt(); diff --git a/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta deleted file mode 100644 index 6147116..0000000 --- a/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e8012b2d70506674fbd804b790ea107d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta deleted file mode 100644 index 7fae7bf..0000000 --- a/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c4926681700fda043ba1c62b78f8cc70 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta b/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta deleted file mode 100644 index 95b7faf..0000000 --- a/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3768b2a53b6c29940837fd2632794868 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta deleted file mode 100644 index 0d5efe3..0000000 --- a/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c38a5407f5c88f479ae605e5ef906ae -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/EQS_Types/Type_Base.cs b/EQS_Types/Type_Base.cs index 59f2fc5..fe3805c 100644 --- a/EQS_Types/Type_Base.cs +++ b/EQS_Types/Type_Base.cs @@ -8,10 +8,6 @@ namespace EasyQuestSwitch.Types public abstract class Type_Base : MonoBehaviour { public abstract void Setup(Object type); - - // Override without calling base to setup custom migration - public virtual void Setup(Object type, int currentVersion) => Setup(type); - public abstract void Process(Object type, BuildTarget buildTarget); } } diff --git a/EQS_Types/Type_Light.cs b/EQS_Types/Type_Light.cs index c14abe7..c570bb6 100644 --- a/EQS_Types/Type_Light.cs +++ b/EQS_Types/Type_Light.cs @@ -34,17 +34,6 @@ public override void Setup(Object type) RenderMode.Setup(component.renderMode); } - public override void Setup(Object type, int currentVersion) - { - Light component = (Light)type; - if (currentVersion == 0) // 0 -> 131 upgrade - { - LightType.Setup(component.type); - Range.Setup(component.range); - RenderMode.Setup(component.renderMode); - } - } - public override void Process(Object type, BuildTarget buildTarget) { base.Process(type, buildTarget); diff --git a/EQS_Types/Type_Material.cs b/EQS_Types/Type_Material.cs index 1b584cf..45de15f 100644 --- a/EQS_Types/Type_Material.cs +++ b/EQS_Types/Type_Material.cs @@ -26,16 +26,6 @@ public override void Setup(Object type) GPUInstancing.Setup(material.enableInstancing); } - public override void Setup(Object type, int currentVersion) - { - Material material = (Material)type; - if (currentVersion == 0) // 0 -> 131 upgrade - { - MainColor.Setup(material.color); - GPUInstancing.Setup(material.enableInstancing); - } - } - public override void Process(Object type, BuildTarget buildTarget) { Material material = (Material)type; diff --git a/vrchat.jordo.easyquestswitch.asmdef b/vrchat.jordo.easyquestswitch.asmdef deleted file mode 100644 index 1679e99..0000000 --- a/vrchat.jordo.easyquestswitch.asmdef +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "vrchat.jordo.easyquestswitch", - "rootNamespace": "", - "references": [ - "GUID:a1653399f63795746b1857281d1e400d" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/vrchat.jordo.easyquestswitch.asmdef.meta b/vrchat.jordo.easyquestswitch.asmdef.meta deleted file mode 100644 index 751e382..0000000 --- a/vrchat.jordo.easyquestswitch.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d072839ead224a342acd9b4b74e9fb90 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 9ed04394a69e93a7715e851caa6a4e1b97395f0a Mon Sep 17 00:00:00 2001 From: Ashy <50887858+arranash@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:46:07 +0000 Subject: [PATCH 04/14] Updated Bakery Light types --- ...DirectLight.cs => Type_Bakery_DirectLight.cs} | 15 +++++++-------- ...keryLightMesh.cs => Type_Bakery_LightMesh.cs} | 4 ++-- ...ryPointLight.cs => Type_Bakery_PointLight.cs} | 5 ++--- ...BakerySkyLight.cs => Type_Bakery_SkyLight.cs} | 5 ++--- vrchat.jordo.easyquestswitch.asmdef | 16 ++++++++++++++++ 5 files changed, 29 insertions(+), 16 deletions(-) rename EQS_Types/Bakery/{Type_BakeryDirectLight.cs => Type_Bakery_DirectLight.cs} (87%) rename EQS_Types/Bakery/{Type_BakeryLightMesh.cs => Type_Bakery_LightMesh.cs} (94%) rename EQS_Types/Bakery/{Type_BakeryPointLight.cs => Type_Bakery_PointLight.cs} (95%) rename EQS_Types/Bakery/{Type_BakerySkyLight.cs => Type_Bakery_SkyLight.cs} (93%) create mode 100644 vrchat.jordo.easyquestswitch.asmdef diff --git a/EQS_Types/Bakery/Type_BakeryDirectLight.cs b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs similarity index 87% rename from EQS_Types/Bakery/Type_BakeryDirectLight.cs rename to EQS_Types/Bakery/Type_Bakery_DirectLight.cs index 9b41aa4..f9a794a 100644 --- a/EQS_Types/Bakery/Type_BakeryDirectLight.cs +++ b/EQS_Types/Bakery/Type_Bakery_DirectLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,11 +6,10 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakeryDirectLight : Type_Base + public class Type_Bakery_DirectLight : Type_Base { [System.NonSerialized] - private BakeryPointLight type; - + private BakeryDirectLight type; public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); @@ -22,8 +21,8 @@ public class Type_BakeryDirectLight : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + + // base.Setup(type); BakeryDirectLight component = (BakeryDirectLight)type; color.Setup(component.color); intensity.Setup(component.intensity); @@ -36,7 +35,7 @@ public override void Setup(Object type) public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + // base.Process(type, buildTarget); BakeryDirectLight component = (BakeryDirectLight)type; component.color = color.Get(buildTarget); component.intensity = intensity.Get(buildTarget); @@ -49,4 +48,4 @@ public override void Process(Object type, BuildTarget buildTarget) } } } -#endif +#endif \ No newline at end of file diff --git a/EQS_Types/Bakery/Type_BakeryLightMesh.cs b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs similarity index 94% rename from EQS_Types/Bakery/Type_BakeryLightMesh.cs rename to EQS_Types/Bakery/Type_Bakery_LightMesh.cs index 367701e..2baa05e 100644 --- a/EQS_Types/Bakery/Type_BakeryLightMesh.cs +++ b/EQS_Types/Bakery/Type_Bakery_LightMesh.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakeryLightMesh : Type_Base + public class Type_Bakery_LightMesh : Type_Base { [System.NonSerialized] private BakeryLightMesh type; diff --git a/EQS_Types/Bakery/Type_BakeryPointLight.cs b/EQS_Types/Bakery/Type_Bakery_PointLight.cs similarity index 95% rename from EQS_Types/Bakery/Type_BakeryPointLight.cs rename to EQS_Types/Bakery/Type_Bakery_PointLight.cs index eda62ee..e13e850 100644 --- a/EQS_Types/Bakery/Type_BakeryPointLight.cs +++ b/EQS_Types/Bakery/Type_Bakery_PointLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,12 +6,11 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakeryPointLight : Type_Base + public class Type_Bakery_PointLight : Type_Base { [System.NonSerialized] private BakeryPointLight type; - public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); public SharedFloat shadowSpread = new SharedFloat(); diff --git a/EQS_Types/Bakery/Type_BakerySkyLight.cs b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs similarity index 93% rename from EQS_Types/Bakery/Type_BakerySkyLight.cs rename to EQS_Types/Bakery/Type_Bakery_SkyLight.cs index 913e928..e5c3ae5 100644 --- a/EQS_Types/Bakery/Type_BakerySkyLight.cs +++ b/EQS_Types/Bakery/Type_Bakery_SkyLight.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR +#if UNITY_EDITOR && BAKERY_INCLUDED using UnityEditor; using UnityEngine; using EasyQuestSwitch.Fields; @@ -6,12 +6,11 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_BakerySkyLight : Type_Base + public class Type_Bakery_SkyLight : Type_Base { [System.NonSerialized] private BakerySkyLight type; - public SharedColor color = new SharedColor(); public SharedFloat intensity = new SharedFloat(); public SharedInt samples = new SharedInt(); diff --git a/vrchat.jordo.easyquestswitch.asmdef b/vrchat.jordo.easyquestswitch.asmdef new file mode 100644 index 0000000..1679e99 --- /dev/null +++ b/vrchat.jordo.easyquestswitch.asmdef @@ -0,0 +1,16 @@ +{ + "name": "vrchat.jordo.easyquestswitch", + "rootNamespace": "", + "references": [ + "GUID:a1653399f63795746b1857281d1e400d" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file From c5200353dd91f78b7a66aff42443857675d5513e Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 5 Mar 2024 05:26:54 +0100 Subject: [PATCH 05/14] Fixed Bakery hanging because of EQS when baking Added a setting to disable the prompt that asks if you want to apply scene changes --- .../Editor/EQS_Window.cs | 42 +++++++++++++++++-- .../Runtime/EQS_Data.cs | 18 ++++---- .../Runtime/EQS_Localization.cs | 1 + .../Resources/EQS_Localizations/cn.json | 1 + .../Resources/EQS_Localizations/en.json | 1 + .../Resources/EQS_Localizations/es.json | 1 + .../Resources/EQS_Localizations/fr.json | 1 + .../Resources/EQS_Localizations/jp.json | 1 + 8 files changed, 55 insertions(+), 11 deletions(-) diff --git a/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs b/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs index f09f874..8799f69 100644 --- a/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs +++ b/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs @@ -1,11 +1,11 @@ -using UnityEngine; +using System; +using UnityEngine; using UnityEditor; using UnityEditorInternal; using UnityEditor.SceneManagement; using UnityEngine.SceneManagement; using EasyQuestSwitch.Fields; using System.IO; -using UnityEditor.Build; namespace EasyQuestSwitch { @@ -47,6 +47,10 @@ private EQS_Data data { private bool revealEQSdata = false; private float sideOffset = 0f; private bool showHierarchyIcon = true; + private bool promptForPlatformChange = true; + + [NonSerialized] + private bool subscribedToEvents = false; private void CreatePlatformDependantHeader(BuildTarget buildTarget) { @@ -69,8 +73,12 @@ private void CreatePlatformDependantHeader(BuildTarget buildTarget) private void OnEnable() { serializedObject = null; - EditorSceneManager.activeSceneChangedInEditMode += OnSceneChanged; - Undo.undoRedoPerformed += OnUndoRedo; + if (!subscribedToEvents) + { + EditorSceneManager.activeSceneChangedInEditMode += OnSceneChanged; + Undo.undoRedoPerformed += OnUndoRedo; + subscribedToEvents = true; + } minSize = new Vector2(512, 400); CreatePlatformDependantHeader(EditorUserBuildSettings.activeBuildTarget); @@ -95,6 +103,7 @@ private void OnEnable() chosenListFormat = EditorPrefs.GetInt("EQS_ListFormat", 0); // 0 - Simple, 1 - Reorderable sideOffset = EditorPrefs.GetFloat("EQS_HierarchySideOffset", 0f); showHierarchyIcon = EditorPrefs.GetBool("EQS_ShowHierarchyIcon", true); + promptForPlatformChange = EditorPrefs.GetBool("EQS_PromptForPlatformChange", true); if (data != null) { @@ -103,6 +112,16 @@ private void OnEnable() } } + private void OnDestroy() + { + if (subscribedToEvents) + { + EditorSceneManager.activeSceneChangedInEditMode -= OnSceneChanged; + Undo.undoRedoPerformed -= OnUndoRedo; + subscribedToEvents = false; + } + } + private void CreateEQS() { GameObject sceneRefGO = new GameObject("EQS_DATA"); @@ -429,6 +448,21 @@ private void OnGUI() DestroyEQS(); } } + EditorGUILayout.Space(10); + using (var changeOtherSettings = new EditorGUI.ChangeCheckScope()) + { + using (new EditorGUILayout.HorizontalScope()) + { + EditorGUILayout.LabelField(EQS_Localization.Current.SettingsPromptForPlatformChange, EditorStyles.wordWrappedLabel); + promptForPlatformChange = EditorGUILayout.Toggle(GUIContent.none, promptForPlatformChange); + } + + if (changeOtherSettings.changed) + { + EditorPrefs.SetBool("EQS_PromptForPlatformChange", promptForPlatformChange); + } + } + EditorGUILayout.Space(10); using (var changeHierarchySettings = new EditorGUI.ChangeCheckScope()) { EditorGUILayout.LabelField(EQS_Localization.Current.SettingsHierarchy, EditorStyles.boldLabel); diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs index 9d87ec5..1c47219 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs @@ -133,16 +133,19 @@ public void Awake() public void OnSceneOpened() { - /*buildInfo.NewBuildTarget = EditorUserBuildSettings.activeBuildTarget; - if (buildInfo.CachedBuildTarget != buildInfo.NewBuildTarget && Objects != null) + buildInfo.NewBuildTarget = EditorUserBuildSettings.activeBuildTarget; + if (EditorPrefs.GetBool("EQS_PromptForPlatformChange", true)) { - string displayDialog = string.Format(EQS_Localization.Current.PopupTargetChanged, buildInfo.NewBuildTarget.ToString()); - if (EditorUtility.DisplayDialog("", displayDialog, EQS_Localization.Current.PopupAccept, EQS_Localization.Current.PopupDecline)) + if (buildInfo.CachedBuildTarget != buildInfo.NewBuildTarget && Objects != null) { - ApplyTarget(buildInfo.NewBuildTarget); - buildInfo.CachedBuildTarget = buildInfo.NewBuildTarget; + string displayDialog = string.Format(EQS_Localization.Current.PopupTargetChanged, buildInfo.NewBuildTarget.ToString()); + if (EditorUtility.DisplayDialog("", displayDialog, EQS_Localization.Current.PopupAccept, EQS_Localization.Current.PopupDecline)) + { + ApplyTarget(buildInfo.NewBuildTarget); + buildInfo.CachedBuildTarget = buildInfo.NewBuildTarget; + } } - }*/ + } } public void ApplyTarget(BuildTarget newTarget) @@ -169,6 +172,7 @@ public void ApplyTarget(BuildTarget newTarget) } } } + buildInfo.CachedBuildTarget = newTarget; Debug.LogFormat(EQS_Localization.Current.LogPrefix + EQS_Localization.Current.LogSwitchSuccess, newTarget); UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene()); } diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Localization.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Localization.cs index f25ed2d..22304b6 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Localization.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Localization.cs @@ -54,6 +54,7 @@ public class EQS_LocalizedLanguage public string SettingsHierarchy; public string SettingsHierarchyIconShow; public string SettingsHierarchyIconOffset; + public string SettingsPromptForPlatformChange; public string PopupDeleteWarning; public string PopupTargetChanged; diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json index e214c38..6c5066a 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json @@ -21,6 +21,7 @@ "SettingsHierarchy": "层次结构选项", "SettingsHierarchyIconShow": "显示图标", "SettingsHierarchyIconOffset": "隐藏图标", + "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", "PopupDeleteWarning": "这将从场景及其所有数据中删除EasyQuestSwitch,您确定吗?", "PopupTargetChanged": "自上次打开此场景以来,生成目标已更改,是否为{0}应用EQS变更?\n这可以在设置菜单中手动完成。", diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/en.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/en.json index bc2ef38..07c70d6 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/en.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/en.json @@ -21,6 +21,7 @@ "SettingsHierarchy": "Hierarchy options", "SettingsHierarchyIconShow": "Show hierarchy icon", "SettingsHierarchyIconOffset": "Icon offset", + "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", "PopupDeleteWarning": "This will delete EasyQuestSwitch from the scene and all its data, are you sure?", "PopupTargetChanged": "Your build target has changed since the last time you've opened this scene, apply EQS changes for {0}?\nThis can be done manually in the settings menu.", diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json index 0e47f31..b0b4b7a 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json @@ -21,6 +21,7 @@ "SettingsHierarchy": "Ajustes de jerarquía", "SettingsHierarchyIconShow": "Mostrar icono en la jerarquía", "SettingsHierarchyIconOffset": "Ajuste de posición del icono", + "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", "PopupDeleteWarning": "Esto borrara EasyQuestSwitch de la escena y todos sus datos, ¿Estas seguro?", "PopupTargetChanged": "Tu plataforma de compilacion ha cambiado desde la última vez que abriste esta escena, aplicar cambios para {0}?\nEsto puede ser hecho manualmente en el menú de ajustes.", diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/fr.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/fr.json index d5cf21f..f7792b4 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/fr.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/fr.json @@ -21,6 +21,7 @@ "SettingsHierarchy": "Options de hiérarchie", "SettingsHierarchyIconShow": "Montrer les icones", "SettingsHierarchyIconOffset": "Décalage des icones", + "SettingsPromptForPlatformChange": "Montrer une fenêtre de dialogue pour appliquer les changements d'EQS si une scène chargée à l'instant utilise encore des paramètres de la platforme opposée (Peut causer des problèmes avec Bakery).", "PopupDeleteWarning": "Ceci va supprimer Easy Quest Switch de la scène ainsi que toutes ses données, êtes-vous sûr?", "PopupTargetChanged": "Votre platforme cible a changée depuis la dernière fois que vous avez ouvert la scène, appliquer les changements EQS pour {0}?\nCela peut-être effectué manuellement dans le menu paramètres.", diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json index a6416a8..9f2cf37 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json @@ -21,6 +21,7 @@ "SettingsHierarchy": "ヒエラルキーの設定", "SettingsHierarchyIconShow": "アイコンの表示", "SettingsHierarchyIconOffset": "アイコンのオフセット", + "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", "PopupDeleteWarning": "シーンから「EasyQuestSwitch」が削除され、データもすべて削除されます。続行しますか?", "PopupTargetChanged": "前回のBuild実行時と違うPlatformへ変更されました。EQSを{0}用で適用してください。\nマニュアルで適用する場合は設定メニューから実行可能です。", From bbe92123113f8c4eb78f37eae6c7517711ba4171 Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 5 Mar 2024 05:46:08 +0100 Subject: [PATCH 06/14] Moved new files into proper VPM folder hierarchy --- .../Runtime/EQS_Types/Bakery.meta | 8 ++++++++ .../EQS_Types}/Bakery/Type_Bakery_DirectLight.cs | 0 .../EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta | 11 +++++++++++ .../EQS_Types}/Bakery/Type_Bakery_LightMesh.cs | 0 .../EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta | 11 +++++++++++ .../EQS_Types}/Bakery/Type_Bakery_PointLight.cs | 0 .../EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta | 11 +++++++++++ .../Runtime/EQS_Types}/Bakery/Type_Bakery_SkyLight.cs | 0 .../EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta | 11 +++++++++++ 9 files changed, 52 insertions(+) create mode 100644 vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery.meta rename {EQS_Types => vrchat.jordo.easyquestswitch/Runtime/EQS_Types}/Bakery/Type_Bakery_DirectLight.cs (100%) create mode 100644 vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta rename {EQS_Types => vrchat.jordo.easyquestswitch/Runtime/EQS_Types}/Bakery/Type_Bakery_LightMesh.cs (100%) create mode 100644 vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta rename {EQS_Types => vrchat.jordo.easyquestswitch/Runtime/EQS_Types}/Bakery/Type_Bakery_PointLight.cs (100%) create mode 100644 vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta rename {EQS_Types => vrchat.jordo.easyquestswitch/Runtime/EQS_Types}/Bakery/Type_Bakery_SkyLight.cs (100%) create mode 100644 vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery.meta b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery.meta new file mode 100644 index 0000000..567a4af --- /dev/null +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7074053ce75e0d24aa5c3f881e6c0b10 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_DirectLight.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs similarity index 100% rename from EQS_Types/Bakery/Type_Bakery_DirectLight.cs rename to vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta new file mode 100644 index 0000000..316562b --- /dev/null +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 169027ec4efd6804cb1e31c4e35c54bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_LightMesh.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs similarity index 100% rename from EQS_Types/Bakery/Type_Bakery_LightMesh.cs rename to vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta new file mode 100644 index 0000000..d10afbe --- /dev/null +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 539aad6f8a00f3049a0212ddb21e989b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_PointLight.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs similarity index 100% rename from EQS_Types/Bakery/Type_Bakery_PointLight.cs rename to vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta new file mode 100644 index 0000000..980dfd0 --- /dev/null +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d7fa15644fedb147b7db14f099f1128 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/EQS_Types/Bakery/Type_Bakery_SkyLight.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs similarity index 100% rename from EQS_Types/Bakery/Type_Bakery_SkyLight.cs rename to vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta new file mode 100644 index 0000000..dbe3277 --- /dev/null +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f602c3ba15f83c46b4334d8b40b44bd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 76da359a9e67b8703b574e1e619f331a45748ca9 Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 5 Mar 2024 05:49:32 +0100 Subject: [PATCH 07/14] Moved asmdef up so it can be accessed by the Editor --- .../Runtime/vrchat.jordo.easyquestswitch.asmdef | 12 ------------ .../vrchat.jordo.easyquestswitch.asmdef | 0 .../vrchat.jordo.easyquestswitch.asmdef.meta | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef rename vrchat.jordo.easyquestswitch.asmdef => vrchat.jordo.easyquestswitch/vrchat.jordo.easyquestswitch.asmdef (100%) rename vrchat.jordo.easyquestswitch/{Runtime => }/vrchat.jordo.easyquestswitch.asmdef.meta (76%) diff --git a/vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef b/vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef deleted file mode 100644 index 359bb55..0000000 --- a/vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "vrchat.jordo.easyquestswitch", - "references": [], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "autoReferenced": true, - "overrideReferences": false, - "precompiledReferences": [], - "defineConstraints": [], - "optionalUnityReferences": [] -} \ No newline at end of file diff --git a/vrchat.jordo.easyquestswitch.asmdef b/vrchat.jordo.easyquestswitch/vrchat.jordo.easyquestswitch.asmdef similarity index 100% rename from vrchat.jordo.easyquestswitch.asmdef rename to vrchat.jordo.easyquestswitch/vrchat.jordo.easyquestswitch.asmdef diff --git a/vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef.meta b/vrchat.jordo.easyquestswitch/vrchat.jordo.easyquestswitch.asmdef.meta similarity index 76% rename from vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef.meta rename to vrchat.jordo.easyquestswitch/vrchat.jordo.easyquestswitch.asmdef.meta index 751e382..7585723 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/vrchat.jordo.easyquestswitch.asmdef.meta +++ b/vrchat.jordo.easyquestswitch/vrchat.jordo.easyquestswitch.asmdef.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d072839ead224a342acd9b4b74e9fb90 +guid: 8542fd60c7b23104fb2c3959b8c2b4d5 AssemblyDefinitionImporter: externalObjects: {} userData: From ef111418876fa51d10c29eb65f26334f5e16db1a Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 5 Mar 2024 06:32:06 +0100 Subject: [PATCH 08/14] Added correct type to bakery types Fixed some spacing --- .../Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs | 9 +++------ .../Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs | 9 +++------ .../Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs | 9 +++------ .../Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs | 9 +++------ 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs index f9a794a..8183bc4 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_DirectLight.cs @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_DirectLight : Type_Base + public class Type_Bakery_DirectLight : Type_Behaviour { [System.NonSerialized] private BakeryDirectLight type; @@ -21,8 +21,7 @@ public class Type_Bakery_DirectLight : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + base.Setup(type); BakeryDirectLight component = (BakeryDirectLight)type; color.Setup(component.color); intensity.Setup(component.intensity); @@ -35,7 +34,7 @@ public override void Setup(Object type) public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + base.Process(type, buildTarget); BakeryDirectLight component = (BakeryDirectLight)type; component.color = color.Get(buildTarget); component.intensity = intensity.Get(buildTarget); @@ -43,8 +42,6 @@ public override void Process(Object type, BuildTarget buildTarget) component.samples = shadowSamples.Get(buildTarget); component.indirectIntensity = indirectIntensity.Get(buildTarget); component.supersample = antiAlias.Get(buildTarget); - - } } } diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs index 2baa05e..4a051fd 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_LightMesh.cs @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_LightMesh : Type_Base + public class Type_Bakery_LightMesh : Type_Behaviour { [System.NonSerialized] private BakeryLightMesh type; @@ -20,8 +20,7 @@ public class Type_Bakery_LightMesh : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + base.Setup(type); BakeryLightMesh component = (BakeryLightMesh)type; intensity.Setup(component.intensity); color.Setup(component.color); @@ -29,12 +28,11 @@ public override void Setup(Object type) samplesFar.Setup(component.samples2); selfShadow.Setup(component.selfShadow); indirectIntensity.Setup(component.indirectIntensity); - } public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + base.Process(type, buildTarget); BakeryLightMesh component = (BakeryLightMesh)type; component.intensity = intensity.Get(buildTarget); component.color = color.Get(buildTarget); @@ -42,7 +40,6 @@ public override void Process(Object type, BuildTarget buildTarget) component.samples2 = samplesFar.Get(buildTarget); component.selfShadow = selfShadow.Get(buildTarget); component.indirectIntensity = indirectIntensity.Get(buildTarget); - } } } diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs index e13e850..b5ad4c6 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_PointLight.cs @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_PointLight : Type_Base + public class Type_Bakery_PointLight : Type_Behaviour { [System.NonSerialized] private BakeryPointLight type; @@ -23,8 +23,7 @@ public class Type_Bakery_PointLight : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + base.Setup(type); BakeryPointLight component = (BakeryPointLight)type; color.Setup(component.color); intensity.Setup(component.intensity); @@ -39,7 +38,7 @@ public override void Setup(Object type) public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + base.Process(type, buildTarget); BakeryPointLight component = (BakeryPointLight)type; component.color = color.Get(buildTarget); component.intensity = intensity.Get(buildTarget); @@ -49,8 +48,6 @@ public override void Process(Object type, BuildTarget buildTarget) component.samples = samples.Get(buildTarget); component.legacySampling = legacySampling.Get(buildTarget); component.indirectIntensity = indirectIntensity.Get(buildTarget); - - } } } diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs index e5c3ae5..585c328 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Types/Bakery/Type_Bakery_SkyLight.cs @@ -6,7 +6,7 @@ namespace EasyQuestSwitch.Types { [AddComponentMenu("")] - public class Type_Bakery_SkyLight : Type_Base + public class Type_Bakery_SkyLight : Type_Behaviour { [System.NonSerialized] private BakerySkyLight type; @@ -19,25 +19,22 @@ public class Type_Bakery_SkyLight : Type_Base public override void Setup(Object type) { - - // base.Setup(type); + base.Setup(type); BakerySkyLight component = (BakerySkyLight)type; color.Setup(component.color); intensity.Setup(component.intensity); samples.Setup(component.samples); hemispherical.Setup(component.hemispherical); - } public override void Process(Object type, BuildTarget buildTarget) { - // base.Process(type, buildTarget); + base.Process(type, buildTarget); BakerySkyLight component = (BakerySkyLight)type; component.color = color.Get(buildTarget); component.intensity = intensity.Get(buildTarget); component.samples = samples.Get(buildTarget); component.hemispherical = hemispherical.Get(buildTarget); - } } } From 616243128ee60416fb38f276da2dad946e5fa8b6 Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 5 Mar 2024 06:32:51 +0100 Subject: [PATCH 09/14] Incremented version to 1.4.0 Fixed nullref when setting up EQS for the first time --- vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs | 2 +- vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs | 2 +- vrchat.jordo.easyquestswitch/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs b/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs index 8799f69..5807f78 100644 --- a/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs +++ b/vrchat.jordo.easyquestswitch/Editor/EQS_Window.cs @@ -12,7 +12,7 @@ namespace EasyQuestSwitch public class EQS_Window : EditorWindow { - private const string version = "1.3.1"; + private const string version = "1.4.0"; [MenuItem("Window/Easy Quest Switch")] public static void ShowWindow() diff --git a/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs b/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs index 1c47219..73eccba 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs +++ b/vrchat.jordo.easyquestswitch/Runtime/EQS_Data.cs @@ -115,7 +115,7 @@ public void OnChangedBuildTarget(BuildTarget newTarget) public void Awake() { - if (currentVersion > version) + if (Objects != null && currentVersion > version) { foreach (Data d in Objects) { diff --git a/vrchat.jordo.easyquestswitch/package.json b/vrchat.jordo.easyquestswitch/package.json index 47e1fb3..513b804 100644 --- a/vrchat.jordo.easyquestswitch/package.json +++ b/vrchat.jordo.easyquestswitch/package.json @@ -1,7 +1,7 @@ { "name": "vrchat.jordo.easyquestswitch", "displayName": "EasyQuestSwitch", - "version": "1.3.1", + "version": "1.4.0", "unity" : "2019.4", "description": "EasyQuestSwitch is a Unity editor tool developed for VRChat world creators, it can automate changes to components within a scene as soon as the build platform is changed from PC to Android (for Oculus Quest) or vice versa.", "author" : { From 6fea0bd204a321f2c66dc9305007e660cf095cab Mon Sep 17 00:00:00 2001 From: RadAurum Date: Thu, 7 Mar 2024 17:57:12 -0600 Subject: [PATCH 10/14] Added Spanish localization for SettingsPromptForPlatformChange --- .../Runtime/Resources/EQS_Localizations/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json index b0b4b7a..45eedb4 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/es.json @@ -21,7 +21,7 @@ "SettingsHierarchy": "Ajustes de jerarquía", "SettingsHierarchyIconShow": "Mostrar icono en la jerarquía", "SettingsHierarchyIconOffset": "Ajuste de posición del icono", - "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", + "SettingsPromptForPlatformChange": "Mostrar mensaje para aplicar cambios de EQS si una escena recién abierta todavía usa la configuración de la plataforma opuesta (puede causar problemas con Bakery).", "PopupDeleteWarning": "Esto borrara EasyQuestSwitch de la escena y todos sus datos, ¿Estas seguro?", "PopupTargetChanged": "Tu plataforma de compilacion ha cambiado desde la última vez que abriste esta escena, aplicar cambios para {0}?\nEsto puede ser hecho manualmente en el menú de ajustes.", From 08558cdb76d50932e825fc2ae7be1f27cd94331d Mon Sep 17 00:00:00 2001 From: Jordo Date: Fri, 8 Mar 2024 03:03:21 +0100 Subject: [PATCH 11/14] Added JP translation for new 1.4.0 string --- .../Runtime/Resources/EQS_Localizations/jp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json index 9f2cf37..f786654 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/jp.json @@ -21,7 +21,7 @@ "SettingsHierarchy": "ヒエラルキーの設定", "SettingsHierarchyIconShow": "アイコンの表示", "SettingsHierarchyIconOffset": "アイコンのオフセット", - "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", + "SettingsPromptForPlatformChange": "新しく開いたシーンが別プラットフォーム用の設定な際にEQSの設定を適用するか確認画面を表示する (Bakeryで不具合が発生する可能性)。", "PopupDeleteWarning": "シーンから「EasyQuestSwitch」が削除され、データもすべて削除されます。続行しますか?", "PopupTargetChanged": "前回のBuild実行時と違うPlatformへ変更されました。EQSを{0}用で適用してください。\nマニュアルで適用する場合は設定メニューから実行可能です。", From 9f0a1f45fb30b01b3e27ce720ed551fdda1098d9 Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 19 Mar 2024 23:23:47 +0100 Subject: [PATCH 12/14] Fixed errors when deleting an object in hierarchy --- .../Editor/EQS_HierarchyController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs b/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs index 418f2c6..346794c 100644 --- a/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs +++ b/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs @@ -72,8 +72,8 @@ private static void OnHierarchyItemGUI(int id, Rect rect) if (data == null || data.Objects == null) return; var targetIndex = data.Objects.FindIndex(i => - (i.Target as Component)?.gameObject.GetHashCode() == instance.GetHashCode() || - (i.Target as GameObject)?.GetHashCode() == instance.GetHashCode()); + (i.Target as Component)?.gameObject.GetHashCode() == instance?.GetHashCode() || + (i.Target as GameObject)?.GetHashCode() == instance?.GetHashCode()); if (targetIndex == -1) { From 389422673175b92f257378d2da51019e01f79416 Mon Sep 17 00:00:00 2001 From: Jordo Date: Wed, 20 Mar 2024 02:46:54 +0100 Subject: [PATCH 13/14] Really fixed errors when deleting an object in hierarchy --- .../Editor/EQS_HierarchyController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs b/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs index 346794c..491e4c9 100644 --- a/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs +++ b/vrchat.jordo.easyquestswitch/Editor/EQS_HierarchyController.cs @@ -72,8 +72,8 @@ private static void OnHierarchyItemGUI(int id, Rect rect) if (data == null || data.Objects == null) return; var targetIndex = data.Objects.FindIndex(i => - (i.Target as Component)?.gameObject.GetHashCode() == instance?.GetHashCode() || - (i.Target as GameObject)?.GetHashCode() == instance?.GetHashCode()); + i.Target != null && ((i.Target as Component)?.gameObject.GetHashCode() == instance.GetHashCode() || + (i.Target as GameObject)?.GetHashCode() == instance.GetHashCode())); if (targetIndex == -1) { From 21b9b61c9814019f64f5c7ff5485194381c9b956 Mon Sep 17 00:00:00 2001 From: Jordo Date: Tue, 26 Mar 2024 00:33:43 +0100 Subject: [PATCH 14/14] Added Simplified Chinese translation --- .../Runtime/Resources/EQS_Localizations/cn.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json index 6c5066a..49e771e 100644 --- a/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json +++ b/vrchat.jordo.easyquestswitch/Runtime/Resources/EQS_Localizations/cn.json @@ -21,7 +21,7 @@ "SettingsHierarchy": "层次结构选项", "SettingsHierarchyIconShow": "显示图标", "SettingsHierarchyIconOffset": "隐藏图标", - "SettingsPromptForPlatformChange": "Show prompt to apply EQS changes if a newly opened scene still uses setting from the opposite platform (Can cause issues with Bakery).", + "SettingsPromptForPlatformChange": "是否打开场景更改时EQS弹出的应用变更提示 (与Bakery存在兼容性问题).", "PopupDeleteWarning": "这将从场景及其所有数据中删除EasyQuestSwitch,您确定吗?", "PopupTargetChanged": "自上次打开此场景以来,生成目标已更改,是否为{0}应用EQS变更?\n这可以在设置菜单中手动完成。", @@ -39,4 +39,4 @@ "LogSwitchFailure": "入口{0}({1})在切换过程中遇到错误:{2}。", "LogSwitchSuccess": "EasyQuestSwitch应用并生成{0}场景的更改。", "LogSwitchUnsupported": "切换到不受支持的生成目标。" -} \ No newline at end of file +}