diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | Scripts/YOTSNDMFGenerator.cs | 12 |
2 files changed, 12 insertions, 2 deletions
@@ -25,7 +25,7 @@ Open your text editor of choice and paste this in: "toggles": [ { "name": "Shirt", - "meshToggles": ["Shirt"], + "meshToggles": ["Shirt"] } ] } 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) {
|
