diff options
| author | yum <yum.food.vr@gmail.com> | 2025-02-19 16:25:07 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-02-19 16:25:07 -0800 |
| commit | 4cb2a2be4b5181b524ac284b77f3c8f04fed2c7e (patch) | |
| tree | 9f526ea733fdac529569d102e790605fd9a0deda /Scripts | |
| parent | 0d50a7e8483d97e03cae8050732df83eba33f31f (diff) | |
Skip YOTS if no config is on avatarv1.0.0
Diffstat (limited to 'Scripts')
| -rw-r--r-- | Scripts/YOTSNDMFGenerator.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Scripts/YOTSNDMFGenerator.cs b/Scripts/YOTSNDMFGenerator.cs index 602c247..c3b7783 100644 --- a/Scripts/YOTSNDMFGenerator.cs +++ b/Scripts/YOTSNDMFGenerator.cs @@ -29,7 +29,13 @@ namespace YOTS InPhase(BuildPhase.Resolving)
.Run("Cache YOTS Config", ctx => {
var config = ctx.AvatarRootObject.GetComponentInChildren<YOTSNDMFConfig>();
- if (config == null || config.jsonConfig == null) {
+ if (config == null) {
+ ctx.GetState<YOTSBuildState>().skipGeneration = true;
+ Debug.Log("No YOTS config found - skipping.");
+ return;
+ }
+ if (config.jsonConfig == null) {
+ ctx.GetState<YOTSBuildState>().skipGeneration = true;
ErrorReport.WithContextObject(ctx.AvatarRootObject, () => {
ErrorReport.ReportException(
new Exception("No YOTS config found"),
@@ -47,6 +53,9 @@ namespace YOTS InPhase(BuildPhase.Transforming)
.Run("Generate YOTS Animator", ctx => {
var config = ctx.GetState<YOTSBuildState>();
+ if (config.skipGeneration) {
+ return;
+ }
if (config == null) {
ErrorReport.WithContextObject(ctx.AvatarRootObject, () => {
ErrorReport.ReportException(
@@ -165,6 +174,7 @@ namespace YOTS private class YOTSBuildState {
public string jsonConfig;
+ public bool skipGeneration;
}
private static VRCExpressionsMenu DeepCopyMenu(VRCExpressionsMenu sourceMenu) {
|
