Skip to content

Commit

Permalink
🐛 Fix for Udon
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Jan 20, 2021
1 parent 36f679f commit c018796
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine;
using UnityEngine.Experimental.UIElements;

#if VRC_SDK_VRCSDK3
#if VRC_SDK_VRCSDK3 && !UDON
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
#endif
Expand All @@ -21,7 +21,7 @@ public class SimpleToggleLayerGenerator : LayerGenerator.Generator
public Motion falseMotion;
public float duration = 0.25f;

#if VRC_SDK_VRCSDK3
#if VRC_SDK_VRCSDK3 && !UDON
public VRCAvatarDescriptor avatarDescriptor;
public bool installExpressionsMenu;
public string menuName;
Expand Down Expand Up @@ -77,7 +77,7 @@ static AnimatorStateTransition MakeAnimatorStateTransition(AnimatorState animato

return animatorStateTransition;
}
#if VRC_SDK_VRCSDK3
#if VRC_SDK_VRCSDK3 && !UDON
static VRCExpressionParameters MakeExpressionParameters(VRCAvatarDescriptor avatarDescriptor, ref List<Object> objects)
{
EditorUtility.SetDirty(avatarDescriptor);
Expand Down Expand Up @@ -150,7 +150,7 @@ public override IEnumerable<Object> Generate(AnimatorController animatorControll
ExAnimatorUtility.ClearStateMachine(stateMachine);

var objects = new List<Object>();
#if VRC_SDK_VRCSDK3
#if VRC_SDK_VRCSDK3 && !UDON
if (installExpressionsMenu) {
var expressionParameters = MakeExpressionParameters(avatarDescriptor, ref objects);
var expressionParameter = MakeExpressionParameter(expressionParameters, parameter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
using UnityEditor.Animations;
using UnityEngine;

#if VRC_SDK_VRCSDK3
#if VRC_SDK_VRCSDK3 && !UDON
using VRC.SDK3.Avatars.Components;
#endif

namespace EsnyaFactory
{
public class ExAnimatorUtility
{
#if VRC_SDK_VRCSDK3
#if VRC_SDK_VRCSDK3 && !UDON
public static RuntimeAnimatorController GetOrCreatePlayableLayer(VRCAvatarDescriptor avatarDescriptor, VRCAvatarDescriptor.AnimLayerType type, RuntimeAnimatorController template)
{
avatarDescriptor.customizeAnimationLayers = true;
Expand Down

0 comments on commit c018796

Please sign in to comment.