From af5ce1576b94da419ca45c97632328d9c7edb4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AF=7E?= Date: Sun, 3 Sep 2023 15:40:10 +0200 Subject: [PATCH] (MIGRATION) Fix all compilation issues --- Examples/AacExample.cs | 6 +- Examples/GenExample0_ToggleGo.cs | 1 + Examples/GenExample1_ToggleSmr.cs | 1 + Examples/GenExample2_Animate.cs | 1 + Examples/GenExample3_Gesturing.cs | 5 +- Examples/GenExampleManual_PlacingStates.cs | 1 + Framework/Editor/V1/Aac.cs | 95 +++++++------------ Framework/Editor/V1/AacFlConditions.cs | 14 +-- Framework/Editor/V1VRC/TrackingElement.cs | 3 +- Framework/Editor/V1VRC/VRChatExtensions.cs | 4 +- .../Editor/V1VRCDestructiveWorkflow.meta | 3 + .../AacV1VRCDestructiveWorkflowExtensions.cs | 88 +++++++++++++++++ ...V1VRCDestructiveWorkflowExtensions.cs.meta | 3 + ...eFramework.V1VRCDestructiveWorkflow.asmdef | 20 ++++ ...ework.V1VRCDestructiveWorkflow.asmdef.meta | 3 + ...ractSimpleSingleLayerAnimatorInternalAC.cs | 5 +- Tests/V1VRC/PlayMode/AIACAnimatorWideTest.cs | 2 +- .../V1VRC/PlayMode/AIACBoolTransitionTest.cs | 2 +- Tests/V1VRC/PlayMode/AIACStateTest.cs | 2 +- .../V1VRC/PlayMode/AIACSubStateMachineTest.cs | 2 +- .../PlayMode/AIACTransitionFunctionsTest.cs | 4 +- .../PlayMode/AbstractSimpleSingleLayerAIAC.cs | 7 +- .../AIACVRCExtensionsDriverGenerationTest.cs | 4 +- .../AIACVRCExtensionsMiscGenerationTest.cs | 4 +- 24 files changed, 185 insertions(+), 95 deletions(-) create mode 100644 Framework/Editor/V1VRCDestructiveWorkflow.meta create mode 100644 Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs create mode 100644 Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs.meta create mode 100644 Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef create mode 100644 Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef.meta diff --git a/Examples/AacExample.cs b/Examples/AacExample.cs index 06b8e49..f4b0cca 100644 --- a/Examples/AacExample.cs +++ b/Examples/AacExample.cs @@ -1,6 +1,7 @@ #if UNITY_EDITOR using System; -using AnimatorAsCode.V0; +using AnimatorAsCode.V1; +using AnimatorAsCode.V1.VRCDestructiveWorkflow; using UnityEditor; using UnityEngine; using VRC.SDK3.Avatars.Components; @@ -90,7 +91,6 @@ namespace AnimatorAsCodeFramework.Examples { SystemName = systemName, // In the examples, we consider the avatar to be also the animator root. - AvatarDescriptor = avatar, // You can set the animator root to be different than the avatar descriptor, // if you want to apply an animator to a different avatar without redefining // all of the game object references which were relative to the original avatar. @@ -105,7 +105,7 @@ namespace AnimatorAsCodeFramework.Examples AssetContainer = assetContainer, AssetKey = assetKey, DefaultsProvider = new AacDefaultsProvider(writeDefaults: options.WriteDefaults) - }); + }.WithAvatarDescriptor(avatar)); aac.ClearPreviousAssets(); return aac; } diff --git a/Examples/GenExample0_ToggleGo.cs b/Examples/GenExample0_ToggleGo.cs index 157374e..2df34e2 100644 --- a/Examples/GenExample0_ToggleGo.cs +++ b/Examples/GenExample0_ToggleGo.cs @@ -1,4 +1,5 @@ #if UNITY_EDITOR +using AnimatorAsCode.V1.VRCDestructiveWorkflow; using UnityEngine; using VRC.SDK3.Avatars.Components; using UnityEditor; diff --git a/Examples/GenExample1_ToggleSmr.cs b/Examples/GenExample1_ToggleSmr.cs index c4228b2..09e4e31 100644 --- a/Examples/GenExample1_ToggleSmr.cs +++ b/Examples/GenExample1_ToggleSmr.cs @@ -1,4 +1,5 @@ #if UNITY_EDITOR +using AnimatorAsCode.V1.VRCDestructiveWorkflow; using UnityEngine; using VRC.SDK3.Avatars.Components; using UnityEditor; diff --git a/Examples/GenExample2_Animate.cs b/Examples/GenExample2_Animate.cs index ba3b470..81f767c 100644 --- a/Examples/GenExample2_Animate.cs +++ b/Examples/GenExample2_Animate.cs @@ -1,4 +1,5 @@ #if UNITY_EDITOR +using AnimatorAsCode.V1.VRCDestructiveWorkflow; using UnityEngine; using VRC.SDK3.Avatars.Components; using UnityEditor; diff --git a/Examples/GenExample3_Gesturing.cs b/Examples/GenExample3_Gesturing.cs index 89f2d12..c7ccddd 100644 --- a/Examples/GenExample3_Gesturing.cs +++ b/Examples/GenExample3_Gesturing.cs @@ -1,11 +1,12 @@ #if UNITY_EDITOR using System.Linq; -using AnimatorAsCode.V0; -using AnimatorAsCode.V0.Extensions.VRChat; +using AnimatorAsCode.V1; using UnityEngine; using VRC.SDK3.Avatars.Components; using UnityEditor; using UnityEditor.Animations; +using AnimatorAsCode.V1.VRCDestructiveWorkflow; +using AnimatorAsCode.V1VRC; namespace AnimatorAsCodeFramework.Examples { diff --git a/Examples/GenExampleManual_PlacingStates.cs b/Examples/GenExampleManual_PlacingStates.cs index e566f08..d07d687 100644 --- a/Examples/GenExampleManual_PlacingStates.cs +++ b/Examples/GenExampleManual_PlacingStates.cs @@ -1,4 +1,5 @@ #if UNITY_EDITOR +using AnimatorAsCode.V1.VRCDestructiveWorkflow; using UnityEngine; using VRC.SDK3.Avatars.Components; using UnityEditor; diff --git a/Framework/Editor/V1/Aac.cs b/Framework/Editor/V1/Aac.cs index cda283b..cdaec37 100644 --- a/Framework/Editor/V1/Aac.cs +++ b/Framework/Editor/V1/Aac.cs @@ -1,9 +1,9 @@ using System; +using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.Animations; using UnityEngine; -using VRC.SDK3.Avatars.Components; using Random = UnityEngine.Random; // ReSharper disable once CheckNamespace @@ -16,16 +16,11 @@ namespace AnimatorAsCode.V1 return new AacFlBase(configuration); } - internal static AnimatorController AnimatorOf(VRCAvatarDescriptor ad, VRCAvatarDescriptor.AnimLayerType animLayerType) - { - return (AnimatorController) ad.baseAnimationLayers.First(it => it.type == animLayerType).animatorController; - } - internal static AnimationClip NewClip(AacConfiguration component, string suffix) { return RegisterClip(component, suffix, new AnimationClip()); } - + internal static AnimationClip RegisterClip(AacConfiguration component, string suffix, AnimationClip clip) { clip.name = "zAutogenerated__" + component.AssetKey + "__" + suffix + "_" + Random.Range(0, Int32.MaxValue); // FIXME animation name conflict @@ -82,12 +77,32 @@ namespace AnimatorAsCode.V1 public struct AacConfiguration { public string SystemName; - public VRCAvatarDescriptor AvatarDescriptor; public Transform AnimatorRoot; public Transform DefaultValueRoot; public AnimatorController AssetContainer; public string AssetKey; public IAacDefaultsProvider DefaultsProvider; + public Dictionary AdditionalData; // Nullable + + public AacConfiguration WithAdditonalData(Type key, object value) + { + var conf = this; + if (AdditionalData == null) conf.AdditionalData = new Dictionary(); + conf.AdditionalData[key] = value; + return conf; + } + + public bool TryGetAdditionalData(Type key, out object value) + { + if (AdditionalData != null && AdditionalData.TryGetValue(key, out var result)) + { + value = result; + return true; + } + + value = null; + return false; + } } public struct AacFlLayer @@ -276,6 +291,11 @@ namespace AnimatorAsCode.V1 { private readonly AacConfiguration _configuration; + public AacConfiguration InternalConfiguration() + { + return _configuration; + } + internal AacFlBase(AacConfiguration configuration) { _configuration = configuration; @@ -333,62 +353,11 @@ namespace AnimatorAsCode.V1 .WithUnit(unit, keyframes => keyframes.Constant(0, 0f).Constant(duration, 0f))); } - public void RemoveAllMainLayers() - { - var layerName = _configuration.SystemName; - RemoveLayerOnAllControllers(_configuration.DefaultsProvider.ConvertLayerName(layerName)); - } + public AacFlLayer CreateMainArbitraryControllerLayer(AnimatorController controller) => InternalDoCreateLayer(controller, _configuration.DefaultsProvider.ConvertLayerName(_configuration.SystemName)); + public AacFlLayer CreateSupportingArbitraryControllerLayer(AnimatorController controller, string suffix) => InternalDoCreateLayer(controller, _configuration.DefaultsProvider.ConvertLayerNameWithSuffix(_configuration.SystemName, suffix)); + public AacFlLayer CreateFirstArbitraryControllerLayer(AnimatorController controller) => InternalDoCreateLayer(controller, controller.layers[0].name); - public void RemoveAllSupportingLayers(string suffix) - { - var layerName = _configuration.SystemName; - RemoveLayerOnAllControllers(_configuration.DefaultsProvider.ConvertLayerNameWithSuffix(layerName, suffix)); - } - - private void RemoveLayerOnAllControllers(string layerName) - { - var layers = _configuration.AvatarDescriptor.baseAnimationLayers.Select(layer => layer.animatorController).Where(layer => layer != null).Distinct().ToList(); - foreach (var customAnimLayer in layers) - { - new AacAnimatorRemoval((AnimatorController) customAnimLayer).RemoveLayer(_configuration.DefaultsProvider.ConvertLayerName(layerName)); - } - } - - public AacFlLayer CreateMainFxLayer() => DoCreateMainLayerOnController(VRCAvatarDescriptor.AnimLayerType.FX); - public AacFlLayer CreateMainGestureLayer() => DoCreateMainLayerOnController(VRCAvatarDescriptor.AnimLayerType.Gesture); - public AacFlLayer CreateMainActionLayer() => DoCreateMainLayerOnController(VRCAvatarDescriptor.AnimLayerType.Action); - public AacFlLayer CreateMainIdleLayer() => DoCreateMainLayerOnController(VRCAvatarDescriptor.AnimLayerType.Additive); - public AacFlLayer CreateMainLocomotionLayer() => DoCreateMainLayerOnController(VRCAvatarDescriptor.AnimLayerType.Base); - public AacFlLayer CreateMainAv3Layer(VRCAvatarDescriptor.AnimLayerType animLayerType) => DoCreateMainLayerOnController(animLayerType); - - public AacFlLayer CreateSupportingFxLayer(string suffix) => DoCreateSupportingLayerOnController(VRCAvatarDescriptor.AnimLayerType.FX, suffix); - public AacFlLayer CreateSupportingGestureLayer(string suffix) => DoCreateSupportingLayerOnController(VRCAvatarDescriptor.AnimLayerType.Gesture, suffix); - public AacFlLayer CreateSupportingActionLayer(string suffix) => DoCreateSupportingLayerOnController(VRCAvatarDescriptor.AnimLayerType.Action, suffix); - public AacFlLayer CreateSupportingIdleLayer(string suffix) => DoCreateSupportingLayerOnController(VRCAvatarDescriptor.AnimLayerType.Additive, suffix); - public AacFlLayer CreateSupportingLocomotionLayer(string suffix) => DoCreateSupportingLayerOnController(VRCAvatarDescriptor.AnimLayerType.Base, suffix); - public AacFlLayer CreateSupportingAv3Layer(VRCAvatarDescriptor.AnimLayerType animLayerType, string suffix) => DoCreateSupportingLayerOnController(animLayerType, suffix); - - public AacFlLayer CreateMainArbitraryControllerLayer(AnimatorController controller) => DoCreateLayer(controller, _configuration.DefaultsProvider.ConvertLayerName(_configuration.SystemName)); - public AacFlLayer CreateSupportingArbitraryControllerLayer(AnimatorController controller, string suffix) => DoCreateLayer(controller, _configuration.DefaultsProvider.ConvertLayerNameWithSuffix(_configuration.SystemName, suffix)); - public AacFlLayer CreateFirstArbitraryControllerLayer(AnimatorController controller) => DoCreateLayer(controller, controller.layers[0].name); - - private AacFlLayer DoCreateMainLayerOnController(VRCAvatarDescriptor.AnimLayerType animType) - { - var animator = AacV0.AnimatorOf(_configuration.AvatarDescriptor, animType); - var layerName = _configuration.DefaultsProvider.ConvertLayerName(_configuration.SystemName); - - return DoCreateLayer(animator, layerName); - } - - private AacFlLayer DoCreateSupportingLayerOnController(VRCAvatarDescriptor.AnimLayerType animType, string suffix) - { - var animator = AacV0.AnimatorOf(_configuration.AvatarDescriptor, animType); - var layerName = _configuration.DefaultsProvider.ConvertLayerNameWithSuffix(_configuration.SystemName, suffix); - - return DoCreateLayer(animator, layerName); - } - - private AacFlLayer DoCreateLayer(AnimatorController animator, string layerName) + public AacFlLayer InternalDoCreateLayer(AnimatorController animator, string layerName) { var ag = new AacAnimatorGenerator(animator, CreateEmptyClip().Clip, _configuration.DefaultsProvider); var machine = ag.CreateOrClearLayerAtSameIndex(layerName, 1f); diff --git a/Framework/Editor/V1/AacFlConditions.cs b/Framework/Editor/V1/AacFlConditions.cs index c09b1f4..5108f92 100644 --- a/Framework/Editor/V1/AacFlConditions.cs +++ b/Framework/Editor/V1/AacFlConditions.cs @@ -55,7 +55,7 @@ namespace AnimatorAsCode.V1 { } - protected internal abstract float ValueToFloat(TParam value); + public abstract float ValueToFloat(TParam value); } public abstract class AacFlNumericParameter : AacFlParameter @@ -71,8 +71,8 @@ namespace AnimatorAsCode.V1 protected AacFlFloatParameter(string name) : base(name) { } public IAacFlCondition IsGreaterThan(float other) => Just(condition => condition.Add(Name, Greater, other)); public IAacFlCondition IsLessThan(float other) => Just(condition => condition.Add(Name, Less, other)); - - protected internal override float ValueToFloat(float value) + + public override float ValueToFloat(float value) { return value; } @@ -86,8 +86,8 @@ namespace AnimatorAsCode.V1 public IAacFlCondition IsLessThan(int other) => Just(condition => condition.Add(Name, Less, other)); public IAacFlCondition IsEqualTo(int other) => Just(condition => condition.Add(Name, AnimatorConditionMode.Equals, other)); public IAacFlCondition IsNotEqualTo(int other) => Just(condition => condition.Add(Name, NotEqual, other)); - - protected internal override float ValueToFloat(int value) + + public override float ValueToFloat(int value) { return value; } @@ -112,8 +112,8 @@ namespace AnimatorAsCode.V1 public IAacFlCondition IsFalse() => Just(condition => condition.Add(Name, IfNot, 0)); public IAacFlCondition IsEqualTo(bool other) => Just(condition => condition.Add(Name, other ? If : IfNot, 0)); public IAacFlCondition IsNotEqualTo(bool other) => Just(condition => condition.Add(Name, other ? IfNot : If, 0)); - - protected internal override float ValueToFloat(bool value) + + public override float ValueToFloat(bool value) { return value ? 1f : 0f; } diff --git a/Framework/Editor/V1VRC/TrackingElement.cs b/Framework/Editor/V1VRC/TrackingElement.cs index 25bbafb..7a490a8 100644 --- a/Framework/Editor/V1VRC/TrackingElement.cs +++ b/Framework/Editor/V1VRC/TrackingElement.cs @@ -1,4 +1,5 @@ -namespace AnimatorAsCode.V1.Extensions.VRChat +// ReSharper disable once CheckNamespace +namespace AnimatorAsCode.V1VRC { public enum TrackingElement { diff --git a/Framework/Editor/V1VRC/VRChatExtensions.cs b/Framework/Editor/V1VRC/VRChatExtensions.cs index 2dbd795..d5df930 100644 --- a/Framework/Editor/V1VRC/VRChatExtensions.cs +++ b/Framework/Editor/V1VRC/VRChatExtensions.cs @@ -1,8 +1,10 @@ using System; +using AnimatorAsCode.V1; using VRC.SDK3.Avatars.Components; using VRC.SDKBase; -namespace AnimatorAsCode.V1.Extensions.VRChat +// ReSharper disable once CheckNamespace +namespace AnimatorAsCode.V1VRC { public static class VRChatExtensions { diff --git a/Framework/Editor/V1VRCDestructiveWorkflow.meta b/Framework/Editor/V1VRCDestructiveWorkflow.meta new file mode 100644 index 0000000..7ee9bbb --- /dev/null +++ b/Framework/Editor/V1VRCDestructiveWorkflow.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 009c7850b6354567b617f718f1f0ed27 +timeCreated: 1693747359 \ No newline at end of file diff --git a/Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs b/Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs new file mode 100644 index 0000000..c1f487a --- /dev/null +++ b/Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs @@ -0,0 +1,88 @@ +using System; +using System.Linq; +using UnityEditor.Animations; +using VRC.SDK3.Avatars.Components; + +// ReSharper disable once CheckNamespace +namespace AnimatorAsCode.V1.VRCDestructiveWorkflow +{ + // ReSharper disable once InconsistentNaming + public static class AacV1VRCDestructiveWorkflowExtensions + { + private interface IAdditionalDataAvatarDescriptor {} + + public static AacConfiguration WithAvatarDescriptor(this AacConfiguration that, VRCAvatarDescriptor avatarDescriptor) + { + return that.WithAdditonalData(typeof(IAdditionalDataAvatarDescriptor), avatarDescriptor); + } + + public static AacFlLayer CreateMainFxLayer(this AacFlBase that) => DoCreateMainLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.FX); + public static AacFlLayer CreateMainGestureLayer(this AacFlBase that) => DoCreateMainLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Gesture); + public static AacFlLayer CreateMainActionLayer(this AacFlBase that) => DoCreateMainLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Action); + public static AacFlLayer CreateMainIdleLayer(this AacFlBase that) => DoCreateMainLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Additive); + public static AacFlLayer CreateMainLocomotionLayer(this AacFlBase that) => DoCreateMainLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Base); + public static AacFlLayer CreateMainAv3Layer(this AacFlBase that, VRCAvatarDescriptor.AnimLayerType animLayerType) => DoCreateMainLayerOnController(that, animLayerType); + + public static AacFlLayer CreateSupportingFxLayer(this AacFlBase that, string suffix) => DoCreateSupportingLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.FX, suffix); + public static AacFlLayer CreateSupportingGestureLayer(this AacFlBase that, string suffix) => DoCreateSupportingLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Gesture, suffix); + public static AacFlLayer CreateSupportingActionLayer(this AacFlBase that, string suffix) => DoCreateSupportingLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Action, suffix); + public static AacFlLayer CreateSupportingIdleLayer(this AacFlBase that, string suffix) => DoCreateSupportingLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Additive, suffix); + public static AacFlLayer CreateSupportingLocomotionLayer(this AacFlBase that, string suffix) => DoCreateSupportingLayerOnController(that, VRCAvatarDescriptor.AnimLayerType.Base, suffix); + public static AacFlLayer CreateSupportingAv3Layer(this AacFlBase that, VRCAvatarDescriptor.AnimLayerType animLayerType, string suffix) => DoCreateSupportingLayerOnController(that, animLayerType, suffix); + + private static AacFlLayer DoCreateMainLayerOnController(AacFlBase that, VRCAvatarDescriptor.AnimLayerType animType) + { + var animator = AnimatorOf(AvatarDescriptor(that), animType); + var layerName = that.InternalConfiguration().DefaultsProvider.ConvertLayerName(that.InternalConfiguration().SystemName); + + return that.InternalDoCreateLayer(animator, layerName); + } + + private static AacFlLayer DoCreateSupportingLayerOnController(AacFlBase that, VRCAvatarDescriptor.AnimLayerType animType, string suffix) + { + var animator = AnimatorOf(AvatarDescriptor(that), animType); + var layerName = that.InternalConfiguration().DefaultsProvider.ConvertLayerNameWithSuffix(that.InternalConfiguration().SystemName, suffix); + + return that.InternalDoCreateLayer(animator, layerName); + } + + internal static AnimatorController AnimatorOf(VRCAvatarDescriptor ad, VRCAvatarDescriptor.AnimLayerType animLayerType) + { + return (AnimatorController) ad.baseAnimationLayers.First(it => it.type == animLayerType).animatorController; + } + + public static void RemoveAllMainLayers(this AacFlBase that) + { + var layerName = that.InternalConfiguration().SystemName; + RemoveLayerOnAllControllers(that, that.InternalConfiguration().DefaultsProvider.ConvertLayerName(layerName)); + } + + public static void RemoveAllSupportingLayers(this AacFlBase that, string suffix) + { + var layerName = that.InternalConfiguration().SystemName; + RemoveLayerOnAllControllers(that, that.InternalConfiguration().DefaultsProvider.ConvertLayerNameWithSuffix(layerName, suffix)); + } + + private static void RemoveLayerOnAllControllers(AacFlBase that, string layerName) + { + var layers = AvatarDescriptor(that).baseAnimationLayers.Select(layer => layer.animatorController).Where(layer => layer != null).Distinct().ToList(); + foreach (var customAnimLayer in layers) + { + new AacAnimatorRemoval((AnimatorController) customAnimLayer).RemoveLayer(that.InternalConfiguration().DefaultsProvider.ConvertLayerName(layerName)); + } + } + + private static VRCAvatarDescriptor AvatarDescriptor(AacFlBase that) + { + var foundAvatarDescriptor = + that.InternalConfiguration().TryGetAdditionalData(typeof(IAdditionalDataAvatarDescriptor), out var avatarDescriptor); + if (!foundAvatarDescriptor) + { + throw new InvalidOperationException( + "Could not find avatar descriptor in configuration. Invoke .WithAvatarDescriptor(...) on the configuration object"); + } + + return (VRCAvatarDescriptor)avatarDescriptor; + } + } +} \ No newline at end of file diff --git a/Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs.meta b/Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs.meta new file mode 100644 index 0000000..d252ffd --- /dev/null +++ b/Framework/Editor/V1VRCDestructiveWorkflow/AacV1VRCDestructiveWorkflowExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5f4d323b6ed1494ca4034e5d5e992700 +timeCreated: 1693747417 \ No newline at end of file diff --git a/Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef b/Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef new file mode 100644 index 0000000..ae79d57 --- /dev/null +++ b/Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef @@ -0,0 +1,20 @@ +{ + "name": "AnimatorAsCodeFramework.V1VRCDestructiveWorkflow", + "references": [ + "GUID:7b32145194168e0409534fc5052b85ce" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "VRCSDKBase.dll", + "VRCSDK3A.dll" + ], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef.meta b/Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef.meta new file mode 100644 index 0000000..cd2afbe --- /dev/null +++ b/Framework/Editor/V1VRCDestructiveWorkflow/AnimatorAsCodeFramework.V1VRCDestructiveWorkflow.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fab9d4fed7c140bb9801787933ccf7d2 +timeCreated: 1693747371 \ No newline at end of file diff --git a/Tests/V1/EditMode/AbstractSimpleSingleLayerAnimatorInternalAC.cs b/Tests/V1/EditMode/AbstractSimpleSingleLayerAnimatorInternalAC.cs index c1f2bdf..5ca92fa 100644 --- a/Tests/V1/EditMode/AbstractSimpleSingleLayerAnimatorInternalAC.cs +++ b/Tests/V1/EditMode/AbstractSimpleSingleLayerAnimatorInternalAC.cs @@ -1,12 +1,12 @@ using System; -using AnimatorAsCode.V0; +using AnimatorAsCode.V1; using NUnit.Framework; using UnityEditor; using UnityEditor.Animations; using UnityEngine; using Object = UnityEngine.Object; -namespace av3_animator_as_code.Tests.EditMode +namespace av3_animator_as_code.Tests.V1.EditMode { public abstract class AbstractSimpleSingleLayerAnimatorInternalEditModeAC { @@ -40,7 +40,6 @@ namespace av3_animator_as_code.Tests.EditMode AnimatorRoot = _root.transform, AssetContainer = _container, AssetKey = "None", - AvatarDescriptor = null, DefaultsProvider = new AacDefaultsProvider(), SystemName = "Test", DefaultValueRoot = _root.transform diff --git a/Tests/V1VRC/PlayMode/AIACAnimatorWideTest.cs b/Tests/V1VRC/PlayMode/AIACAnimatorWideTest.cs index a53b248..8e9d182 100644 --- a/Tests/V1VRC/PlayMode/AIACAnimatorWideTest.cs +++ b/Tests/V1VRC/PlayMode/AIACAnimatorWideTest.cs @@ -3,7 +3,7 @@ using UnityEditor.Animations; using UnityEngine; using Assert = UnityEngine.Assertions.Assert; -namespace av3_animator_as_code.Tests.PlayMode +namespace av3_animator_as_code.Tests.V1VRC.PlayMode { public class AIACAnimatorWideTest : AbstractSimpleSingleLayerAIAC { diff --git a/Tests/V1VRC/PlayMode/AIACBoolTransitionTest.cs b/Tests/V1VRC/PlayMode/AIACBoolTransitionTest.cs index be4d041..4c3c2d6 100644 --- a/Tests/V1VRC/PlayMode/AIACBoolTransitionTest.cs +++ b/Tests/V1VRC/PlayMode/AIACBoolTransitionTest.cs @@ -3,7 +3,7 @@ using UnityEditor.Animations; using UnityEngine; using Assert = UnityEngine.Assertions.Assert; -namespace av3_animator_as_code.Tests.PlayMode +namespace av3_animator_as_code.Tests.V1VRC.PlayMode { public class AIACBoolTransitionTest : AbstractSimpleSingleLayerAIAC { diff --git a/Tests/V1VRC/PlayMode/AIACStateTest.cs b/Tests/V1VRC/PlayMode/AIACStateTest.cs index 3e7fac1..72d2b9c 100644 --- a/Tests/V1VRC/PlayMode/AIACStateTest.cs +++ b/Tests/V1VRC/PlayMode/AIACStateTest.cs @@ -3,7 +3,7 @@ using UnityEditor.Animations; using UnityEngine; using Assert = UnityEngine.Assertions.Assert; -namespace av3_animator_as_code.Tests.PlayMode +namespace av3_animator_as_code.Tests.V1VRC.PlayMode { public class AIACStateTest : AbstractSimpleSingleLayerAIAC { diff --git a/Tests/V1VRC/PlayMode/AIACSubStateMachineTest.cs b/Tests/V1VRC/PlayMode/AIACSubStateMachineTest.cs index dd3ae78..5726364 100644 --- a/Tests/V1VRC/PlayMode/AIACSubStateMachineTest.cs +++ b/Tests/V1VRC/PlayMode/AIACSubStateMachineTest.cs @@ -3,7 +3,7 @@ using UnityEditor.Animations; using UnityEngine; using Assert = UnityEngine.Assertions.Assert; -namespace av3_animator_as_code.Tests.PlayMode +namespace av3_animator_as_code.Tests.V1VRC.PlayMode { public class AIACSubStateMachineTest : AbstractSimpleSingleLayerAIAC { diff --git a/Tests/V1VRC/PlayMode/AIACTransitionFunctionsTest.cs b/Tests/V1VRC/PlayMode/AIACTransitionFunctionsTest.cs index 4192099..7483412 100644 --- a/Tests/V1VRC/PlayMode/AIACTransitionFunctionsTest.cs +++ b/Tests/V1VRC/PlayMode/AIACTransitionFunctionsTest.cs @@ -1,10 +1,10 @@ -using AnimatorAsCode.V0; +using AnimatorAsCode.V1; using NUnit.Framework; using UnityEditor.Animations; using UnityEngine; using Assert = UnityEngine.Assertions.Assert; -namespace av3_animator_as_code.Tests.PlayMode +namespace av3_animator_as_code.Tests.V1VRC.PlayMode { public class AIACTransitionFunctionsTest : AbstractSimpleSingleLayerAIAC { diff --git a/Tests/V1VRC/PlayMode/AbstractSimpleSingleLayerAIAC.cs b/Tests/V1VRC/PlayMode/AbstractSimpleSingleLayerAIAC.cs index d8d44b2..d94556d 100644 --- a/Tests/V1VRC/PlayMode/AbstractSimpleSingleLayerAIAC.cs +++ b/Tests/V1VRC/PlayMode/AbstractSimpleSingleLayerAIAC.cs @@ -1,14 +1,12 @@ using System; -using System.Collections; -using AnimatorAsCode.V0; +using AnimatorAsCode.V1; using NUnit.Framework; using UnityEditor; using UnityEditor.Animations; using UnityEngine; -using UnityEngine.TestTools; using Object = UnityEngine.Object; -namespace av3_animator_as_code.Tests.PlayMode +namespace av3_animator_as_code.Tests.V1VRC.PlayMode { public abstract class AbstractSimpleSingleLayerAIAC { @@ -55,7 +53,6 @@ namespace av3_animator_as_code.Tests.PlayMode AnimatorRoot = _root.transform, AssetContainer = _container, AssetKey = "None", - AvatarDescriptor = null, DefaultsProvider = new AacDefaultsProvider(), SystemName = "Test", DefaultValueRoot = _root.transform diff --git a/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsDriverGenerationTest.cs b/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsDriverGenerationTest.cs index 7bc3d68..c63500d 100644 --- a/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsDriverGenerationTest.cs +++ b/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsDriverGenerationTest.cs @@ -1,9 +1,9 @@ -using AnimatorAsCode.V0.Extensions.VRChat; +using AnimatorAsCode.V1VRC; using NUnit.Framework; using VRC.SDK3.Avatars.Components; using VRC.SDKBase; -namespace av3_animator_as_code.Tests.PlayMode.GenerationTests +namespace av3_animator_as_code.Tests.V1VRC.PlayMode.GenerationTests { public class AIACVRCExtensionsDriverGenerationTest : AbstractSimpleSingleLayerAIAC { diff --git a/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsMiscGenerationTest.cs b/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsMiscGenerationTest.cs index 0bd19d0..c2b8895 100644 --- a/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsMiscGenerationTest.cs +++ b/Tests/V1VRC/PlayMode/GenerationTests/AIACVRCExtensionsMiscGenerationTest.cs @@ -1,9 +1,9 @@ -using AnimatorAsCode.V0.Extensions.VRChat; +using AnimatorAsCode.V1VRC; using NUnit.Framework; using VRC.SDK3.Avatars.Components; using VRC.SDKBase; -namespace av3_animator_as_code.Tests.PlayMode.GenerationTests +namespace av3_animator_as_code.Tests.V1VRC.PlayMode.GenerationTests { public class AIACVRCExtensionsMiscGenerationTest : AbstractSimpleSingleLayerAIAC {