diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionAudioExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionAudioExtensions.cs index e28f8b5f..61296bab 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionAudioExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionAudioExtensions.cs @@ -24,7 +24,6 @@ public static MotionHandle BindToVolume(this MotionBuilder { - if (target == null) return; target.volume = x; }); } @@ -44,7 +43,6 @@ public static MotionHandle BindToPitch(this MotionBuilder { - if (target == null) return; target.pitch = x; }); } @@ -64,7 +62,6 @@ public static MotionHandle BindToAudioMixerFloat(this Motion Error.IsNull(audioMixer); return builder.BindWithState(audioMixer, (x, target) => { - if (target == null) return; target.SetFloat(name, x); }); } diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionMaterialExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionMaterialExtensions.cs index 609613a6..b6605277 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionMaterialExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionMaterialExtensions.cs @@ -22,7 +22,6 @@ public static MotionHandle BindToMaterialFloat(this MotionBu Error.IsNull(material); return builder.BindWithState(material, (x, m) => { - if (m == null) return; m.SetFloat(name, x); }); } @@ -42,7 +41,6 @@ public static MotionHandle BindToMaterialFloat(this MotionBu Error.IsNull(material); return builder.BindWithState(material, (x, m) => { - if (m == null) return; m.SetFloat(nameID, x); }); } @@ -62,7 +60,6 @@ public static MotionHandle BindToMaterialInt(this MotionBuil Error.IsNull(material); return builder.BindWithState(material, (x, m) => { - if (m == null) return; m.SetInteger(name, x); }); } @@ -82,7 +79,6 @@ public static MotionHandle BindToMaterialInt(this MotionBuil Error.IsNull(material); return builder.BindWithState(material, (x, m) => { - if (m == null) return; m.SetInteger(nameID, x); }); } @@ -102,7 +98,6 @@ public static MotionHandle BindToMaterialColor(this MotionBu Error.IsNull(material); return builder.BindWithState(material, (x, m) => { - if (m == null) return; m.SetColor(name, x); }); } @@ -122,7 +117,6 @@ public static MotionHandle BindToMaterialColor(this MotionBu Error.IsNull(material); return builder.BindWithState(material, (x, m) => { - if (m == null) return; m.SetColor(nameID, x); }); } diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionSpriteRendererExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionSpriteRendererExtensions.cs index e2bbbe5c..6bb07ffe 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionSpriteRendererExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionSpriteRendererExtensions.cs @@ -22,7 +22,6 @@ public static MotionHandle BindToColor(this MotionBuilder { - if (m == null) return; m.color = x; }); } @@ -42,7 +41,6 @@ public static MotionHandle BindToColorR(this MotionBuilder { - if (m == null) return; var c = m.color; c.r = x; m.color = c; @@ -64,7 +62,6 @@ public static MotionHandle BindToColorG(this MotionBuilder { - if (m == null) return; var c = m.color; c.g = x; m.color = c; @@ -86,7 +83,6 @@ public static MotionHandle BindToColorB(this MotionBuilder { - if (m == null) return; var c = m.color; c.b = x; m.color = c; @@ -108,7 +104,6 @@ public static MotionHandle BindToColorA(this MotionBuilder { - if (m == null) return; var c = m.color; c.a = x; m.color = c; diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionTransformExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionTransformExtensions.cs index 52a6d1e1..c4e621c6 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionTransformExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/General/LitMotionTransformExtensions.cs @@ -22,7 +22,6 @@ public static MotionHandle BindToPosition(this MotionBuilder Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.position = x; }); } @@ -42,7 +41,6 @@ public static MotionHandle BindToPositionX(this MotionBuilde Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.position; p.x = x; t.position = p; @@ -64,7 +62,6 @@ public static MotionHandle BindToPositionY(this MotionBuilde Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.position; p.y = x; t.position = p; @@ -86,7 +83,6 @@ public static MotionHandle BindToPositionZ(this MotionBuilde Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.position; p.z = x; t.position = p; @@ -108,7 +104,6 @@ public static MotionHandle BindToLocalPosition(this MotionBu Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.localPosition = x; }); } @@ -128,7 +123,6 @@ public static MotionHandle BindToLocalPositionX(this MotionB Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localPosition; p.x = x; t.localPosition = p; @@ -151,7 +145,6 @@ public static MotionHandle BindToLocalPositionY(this MotionB Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localPosition; p.y = x; t.localPosition = p; @@ -173,7 +166,6 @@ public static MotionHandle BindToLocalPositionZ(this MotionB Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localPosition; p.z = x; t.localPosition = p; @@ -195,7 +187,6 @@ public static MotionHandle BindToRotation(this MotionBuilder Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.rotation = x; }); } @@ -215,7 +206,6 @@ public static MotionHandle BindToLocalRotation(this MotionBu Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.localRotation = x; }); } @@ -235,7 +225,6 @@ public static MotionHandle BindToEulerAngles(this MotionBuil Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.eulerAngles = x; }); } @@ -255,7 +244,6 @@ public static MotionHandle BindToEulerAnglesX(this MotionBui Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.eulerAngles; p.x = x; t.eulerAngles = p; @@ -277,7 +265,6 @@ public static MotionHandle BindToEulerAnglesY(this MotionBui Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.eulerAngles; p.y = x; t.eulerAngles = p; @@ -299,7 +286,6 @@ public static MotionHandle BindToEulerAnglesZ(this MotionBui Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.eulerAngles; p.z = x; t.eulerAngles = p; @@ -321,7 +307,6 @@ public static MotionHandle BindToLocalEulerAngles(this Motio Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.localEulerAngles = x; }); } @@ -341,7 +326,6 @@ public static MotionHandle BindToLocalEulerAnglesX(this Moti Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localEulerAngles; p.x = x; t.localEulerAngles = p; @@ -363,7 +347,6 @@ public static MotionHandle BindToLocalEulerAnglesY(this Moti Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localEulerAngles; p.y = x; t.localEulerAngles = p; @@ -385,7 +368,6 @@ public static MotionHandle BindToLocalEulerAnglesZ(this Moti Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localEulerAngles; p.z = x; t.localEulerAngles = p; @@ -407,7 +389,6 @@ public static MotionHandle BindToLocalScale(this MotionBuild Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; t.localScale = x; }); } @@ -427,7 +408,6 @@ public static MotionHandle BindToLocalScaleX(this MotionBuil Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localScale; p.x = x; t.localScale = p; @@ -449,7 +429,6 @@ public static MotionHandle BindToLocalScaleY(this MotionBuil Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localScale; p.y = x; t.localScale = p; @@ -471,7 +450,6 @@ public static MotionHandle BindToLocalScaleZ(this MotionBuil Error.IsNull(transform); return builder.BindWithState(transform, (x, t) => { - if (t == null) return; var p = t.localScale; p.z = x; t.localScale = p; diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/TextMeshPro/LitMotionTextMeshProExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/TextMeshPro/LitMotionTextMeshProExtensions.cs index 7d17eaa0..775782ef 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/TextMeshPro/LitMotionTextMeshProExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/TextMeshPro/LitMotionTextMeshProExtensions.cs @@ -29,7 +29,6 @@ public static MotionHandle BindToFontSize(this MotionBuilder Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; target.fontSize = x; }); } @@ -49,7 +48,6 @@ public static MotionHandle BindToMaxVisibleCharacters(this M Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; target.maxVisibleCharacters = x; }); } @@ -69,7 +67,6 @@ public static MotionHandle BindToMaxVisibleLines(this Motion Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; target.maxVisibleLines = x; }); } @@ -89,7 +86,6 @@ public static MotionHandle BindToMaxVisibleWords(this Motion Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; target.maxVisibleWords = x; }); } @@ -109,7 +105,6 @@ public static MotionHandle BindToColor(this MotionBuilder { - if (target == null) return; target.color = x; }); } @@ -129,7 +124,6 @@ public static MotionHandle BindToColorR(this MotionBuilder { - if (target == null) return; var c = target.color; c.r = x; target.color = c; @@ -151,7 +145,6 @@ public static MotionHandle BindToColorG(this MotionBuilder { - if (target == null) return; var c = target.color; c.g = x; target.color = c; @@ -173,7 +166,6 @@ public static MotionHandle BindToColorB(this MotionBuilder { - if (target == null) return; var c = target.color; c.b = x; target.color = c; @@ -195,7 +187,6 @@ public static MotionHandle BindToColorA(this MotionBuilder { - if (target == null) return; var c = target.color; c.a = x; target.color = c; @@ -220,7 +211,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var enumerator = x.GetEnumerator(); var length = 0; var buffer = ArrayPool.Shared.Rent(64); @@ -251,7 +241,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var enumerator = x.GetEnumerator(); var length = 0; var buffer = ArrayPool.Shared.Rent(128); @@ -282,7 +271,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var enumerator = x.GetEnumerator(); var length = 0; var buffer = ArrayPool.Shared.Rent(256); @@ -313,7 +301,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var enumerator = x.GetEnumerator(); var length = 0; var buffer = ArrayPool.Shared.Rent(1024); @@ -344,7 +331,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var enumerator = x.GetEnumerator(); var length = 0; var buffer = ArrayPool.Shared.Rent(8192); @@ -374,7 +360,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var buffer = ArrayPool.Shared.Rent(128); var bufferOffset = 0; @@ -400,7 +385,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, format, (x, target, format) => { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.SetTextFormat(format, x); #else @@ -426,7 +410,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; var buffer = ArrayPool.Shared.Rent(128); var bufferOffset = 0; @@ -452,7 +435,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, format, (x, target, format) => { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.SetTextFormat(format, x); #else @@ -479,7 +461,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.SetTextFormat(format, x); #else @@ -504,7 +485,6 @@ public unsafe static MotionHandle BindToText(this MotionBuil Error.IsNull(text); return builder.BindWithState(text, format, (x, target, format) => { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.SetTextFormat(format, x); #else diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/UIToolkit/LitMotionUIToolkitExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/UIToolkit/LitMotionUIToolkitExtensions.cs index ba779351..37c7b557 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/UIToolkit/LitMotionUIToolkitExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/UIToolkit/LitMotionUIToolkitExtensions.cs @@ -30,7 +30,6 @@ public static MotionHandle BindToStyleLeft(this MotionBuilde Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.left = x; }); } @@ -50,7 +49,6 @@ public static MotionHandle BindToStyleRight(this MotionBuild Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.right = x; }); } @@ -70,7 +68,6 @@ public static MotionHandle BindToStyleTop(this MotionBuilder Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.top = x; }); } @@ -90,7 +87,6 @@ public static MotionHandle BindToStyleBottom(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.bottom = x; }); } @@ -110,7 +106,6 @@ public static MotionHandle BindToStyleWidth(this MotionBuild Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.width = x; }); } @@ -130,7 +125,6 @@ public static MotionHandle BindToStyleHeight(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.height = x; }); } @@ -150,7 +144,6 @@ public static MotionHandle BindToStyleColor(this MotionBuild Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.color = x; }); } @@ -170,7 +163,6 @@ public static MotionHandle BindToStyleColorR(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.color.value; c.r = x; target.style.color = c; @@ -192,7 +184,6 @@ public static MotionHandle BindToStyleColorG(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.color.value; c.g = x; target.style.color = c; @@ -214,7 +205,6 @@ public static MotionHandle BindToStyleColorB(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.color.value; c.b = x; target.style.color = c; @@ -236,7 +226,6 @@ public static MotionHandle BindToStyleColorA(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.color.value; c.a = x; target.style.color = c; @@ -258,7 +247,6 @@ public static MotionHandle BindToStyleBackgroundColor(this M Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.backgroundColor = x; }); } @@ -278,7 +266,6 @@ public static MotionHandle BindToStyleBackgroundColorR(this Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.backgroundColor.value; c.r = x; target.style.backgroundColor = c; @@ -300,7 +287,6 @@ public static MotionHandle BindToStyleBackgroundColorG(this Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.backgroundColor.value; c.g = x; target.style.backgroundColor = c; @@ -322,7 +308,6 @@ public static MotionHandle BindToStyleBackgroundColorB(this Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.backgroundColor.value; c.b = x; target.style.backgroundColor = c; @@ -344,7 +329,6 @@ public static MotionHandle BindToStyleBackgroundColorA(this Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; var c = target.style.backgroundColor.value; c.a = x; target.style.backgroundColor = c; @@ -366,7 +350,6 @@ public static MotionHandle BindToStyleOpacity(this MotionBui Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.opacity = x; }); } @@ -386,7 +369,6 @@ public static MotionHandle BindToStyleFontSize(this MotionBu Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.fontSize = x; }); } @@ -406,7 +388,6 @@ public static MotionHandle BindToStyleWordSpacing(this Motio Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.wordSpacing = x; }); } @@ -426,7 +407,6 @@ public static MotionHandle BindToStyleTranslate(this MotionB Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.translate = new Translate(x.x, x.y, x.z); }); } @@ -446,7 +426,6 @@ public static MotionHandle BindToStyleTranslate(this MotionB Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.translate = new Translate(x.x, x.y); }); } @@ -466,7 +445,6 @@ public static MotionHandle BindToStyleRotate(this MotionBuil Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.rotate = new Rotate(new Angle(x, angleUnit)); }); } @@ -486,7 +464,6 @@ public static MotionHandle BindToStyleScale(this MotionBuild Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.scale = new Scale(x); }); } @@ -506,7 +483,6 @@ public static MotionHandle BindToStyleTransformOrigin(this M Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.transformOrigin = new TransformOrigin(x.x, x.y, x.z); }); } @@ -526,7 +502,6 @@ public static MotionHandle BindToStyleTransformOrigin(this M Error.IsNull(visualElement); return builder.BindWithState(visualElement, (x, target) => { - if (target == null) return; target.style.transformOrigin = new TransformOrigin(x.x, x.y); }); } @@ -550,7 +525,6 @@ public static MotionHandle BindToProgressBar(this MotionBuil Error.IsNull(progressBar); return builder.BindWithState(progressBar, (x, target) => { - if (target == null) return; target.value = x; }); } @@ -574,7 +548,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -594,7 +567,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -614,7 +586,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -634,7 +605,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -654,7 +624,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -674,7 +643,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ToString(); }); } @@ -695,7 +663,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.text = ZString.Format(format, x); #else @@ -719,7 +686,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ToString(); }); } @@ -740,7 +706,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.text = ZString.Format(format, x); #else @@ -764,7 +729,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ToString(); }); } @@ -785,7 +749,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.text = ZString.Format(format, x); #else diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/VisualEffectGragh/LitMotionVisualEffectExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/VisualEffectGragh/LitMotionVisualEffectExtensions.cs index cfe48ec2..d86d7b47 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/VisualEffectGragh/LitMotionVisualEffectExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/VisualEffectGragh/LitMotionVisualEffectExtensions.cs @@ -24,7 +24,6 @@ public static MotionHandle BindToVisualEffectFloat(this Moti Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetFloat(name, x); }); } @@ -44,7 +43,6 @@ public static MotionHandle BindToVisualEffectFloat(this Moti Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetFloat(nameID, x); }); } @@ -64,7 +62,6 @@ public static MotionHandle BindToVisualEffectInt(this Motion Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetInt(name, x); }); } @@ -84,7 +81,6 @@ public static MotionHandle BindToVisualEffectInt(this Motion Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetFloat(nameID, x); }); } @@ -104,7 +100,6 @@ public static MotionHandle BindToVisualEffectVector2(this Mo Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetVector2(name, x); }); } @@ -124,7 +119,6 @@ public static MotionHandle BindToVisualEffectVector2(this Mo Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetVector2(nameID, x); }); } @@ -144,7 +138,6 @@ public static MotionHandle BindToVisualEffectVector3(this Mo Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetVector3(name, x); }); } @@ -164,7 +157,6 @@ public static MotionHandle BindToVisualEffectVector3(this Mo Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetVector3(nameID, x); }); } @@ -184,7 +176,6 @@ public static MotionHandle BindToVisualEffectVector4(this Mo Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetVector4(name, x); }); } @@ -204,7 +195,6 @@ public static MotionHandle BindToVisualEffectVector4(this Mo Error.IsNull(visualEffect); return builder.BindWithState(visualEffect, (x, target) => { - if (target == null) return; target.SetVector4(nameID, x); }); } diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionRectTransformExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionRectTransformExtensions.cs index e1612408..3a0142bf 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionRectTransformExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionRectTransformExtensions.cs @@ -22,7 +22,6 @@ public static MotionHandle BindToAnchoredPosition(this Motio Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; target.anchoredPosition = x; }); } @@ -42,7 +41,6 @@ public static MotionHandle BindToAnchoredPositionX(this Moti Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var p = target.anchoredPosition; p.x = x; target.anchoredPosition = p; @@ -64,7 +62,6 @@ public static MotionHandle BindToAnchoredPositionY(this Moti Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var p = target.anchoredPosition; p.y = x; target.anchoredPosition = p; @@ -86,7 +83,6 @@ public static MotionHandle BindToAnchoredPosition3D(this Mot Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; target.anchoredPosition3D = x; }); } @@ -106,7 +102,6 @@ public static MotionHandle BindToAnchoredPosition3DX(this Mo Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var p = target.anchoredPosition3D; p.x = x; target.anchoredPosition3D = p; @@ -128,7 +123,6 @@ public static MotionHandle BindToAnchoredPosition3DY(this Mo Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var p = target.anchoredPosition3D; p.y = x; target.anchoredPosition3D = p; @@ -150,7 +144,6 @@ public static MotionHandle BindToAnchoredPosition3DZ(this Mo Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var p = target.anchoredPosition3D; p.z = x; target.anchoredPosition3D = p; @@ -172,7 +165,6 @@ public static MotionHandle BindToAnchorMin(this MotionBuilde Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; target.anchorMin = x; }); } @@ -192,7 +184,6 @@ public static MotionHandle BindToAnchorMax(this MotionBuilde Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; target.anchorMax = x; }); } @@ -213,7 +204,6 @@ public static MotionHandle BindToSizeDelta(this MotionBuilde Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; target.sizeDelta = x; }); } @@ -233,7 +223,6 @@ public static MotionHandle BindToSizeDeltaX(this MotionBuild Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var s = target.sizeDelta; s.x = x; target.sizeDelta = s; @@ -255,7 +244,6 @@ public static MotionHandle BindToSizeDeltaY(this MotionBuild Error.IsNull(rectTransform); return builder.BindWithState(rectTransform, (x, target) => { - if (target == null) return; var s = target.sizeDelta; s.y = x; target.sizeDelta = s; @@ -277,7 +265,6 @@ public static MotionHandle BindToPivot(this MotionBuilder { - if (target == null) return; target.pivot = x; }); } @@ -297,7 +284,6 @@ public static MotionHandle BindToPivotX(this MotionBuilder { - if (target == null) return; var s = target.pivot; s.x = x; target.pivot = s; @@ -319,7 +305,6 @@ public static MotionHandle BindToPivotY(this MotionBuilder { - if (target == null) return; var s = target.pivot; s.y = x; target.pivot = s; diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionUGUIExtensions.cs b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionUGUIExtensions.cs index 3f14898f..0ed865c6 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionUGUIExtensions.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Extensions/uGUI/LitMotionUGUIExtensions.cs @@ -28,7 +28,6 @@ public static MotionHandle BindToColor(this MotionBuilder { - if (target == null) return; target.color = x; }); } @@ -48,7 +47,6 @@ public static MotionHandle BindToColorR(this MotionBuilder { - if (target == null) return; var c = target.color; c.r = x; target.color = c; @@ -70,7 +68,6 @@ public static MotionHandle BindToColorG(this MotionBuilder { - if (target == null) return; var c = target.color; c.g = x; target.color = c; @@ -92,7 +89,6 @@ public static MotionHandle BindToColorB(this MotionBuilder { - if (target == null) return; var c = target.color; c.b = x; target.color = c; @@ -114,7 +110,6 @@ public static MotionHandle BindToColorA(this MotionBuilder { - if (target == null) return; var c = target.color; c.a = x; target.color = c; @@ -136,7 +131,6 @@ public static MotionHandle BindToFillAmount(this MotionBuild Error.IsNull(image); return builder.BindWithState(image, (x, target) => { - if (target == null) return; target.fillAmount = x; }); } @@ -156,7 +150,6 @@ public static MotionHandle BindToFontSize(this MotionBuilder Error.IsNull(text); return builder.BindWithState(text, (x, target) => { - if (target == null) return; target.fontSize = x; }); } @@ -176,7 +169,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -196,7 +188,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -216,7 +207,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -236,7 +226,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -256,7 +245,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ConvertToString(); }); } @@ -276,7 +264,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ToString(); }); } @@ -297,7 +284,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.text = ZString.Format(format, x); #else @@ -321,7 +307,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ToString(); }); } @@ -342,7 +327,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.text = ZString.Format(format, x); #else @@ -366,7 +350,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; target.text = x.ToString(); }); } @@ -387,7 +370,6 @@ public static MotionHandle BindToText(this MotionBuilder { - if (target == null) return; #if LITMOTION_SUPPORT_ZSTRING target.text = ZString.Format(format, x); #else