diff --git a/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedButtonEditor.cs b/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedButtonEditor.cs index 0f28303..3d5a312 100644 --- a/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedButtonEditor.cs +++ b/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedButtonEditor.cs @@ -91,8 +91,7 @@ public override void OnInspectorGUI() SetStateValuesAtIndex(1, "End", _lottieAnimation != null ? (int)_lottieAnimation.TotalFramesCount : 0, true); } if (_button.AnimationJson == null || - string.IsNullOrEmpty(_button.AnimationJson.text) || - !_button.AnimationJson.text.StartsWith("{\"v\":")) + string.IsNullOrEmpty(_button.AnimationJson.text)) { EditorGUILayout.HelpBox("You must have a lottie json in order to use the animated button.", MessageType.Error); } @@ -159,8 +158,7 @@ private void CreateAnimationIfNecessaryAndAttachToGraphic() return; } string jsonData = _button.AnimationJson.text; - if (string.IsNullOrEmpty(jsonData) || - !jsonData.StartsWith("{\"v\":")) + if (string.IsNullOrEmpty(jsonData)) { Debug.LogError("Selected file is not a lottie json"); return; diff --git a/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedImageEditor.cs b/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedImageEditor.cs index 131c246..d608683 100644 --- a/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedImageEditor.cs +++ b/unity/RLottieUnity/Assets/LottiePlugin/Editor/src/AnimatedImageEditor.cs @@ -48,8 +48,7 @@ public override void OnInspectorGUI() UpdateTheAnimationInfoBoxText(); } if (_image.AnimationJson == null || - string.IsNullOrEmpty(_image.AnimationJson.text) || - !_image.AnimationJson.text.StartsWith("{\"v\":")) + string.IsNullOrEmpty(_image.AnimationJson.text)) { EditorGUILayout.HelpBox("You must have a lottie json in order to use the animated image.", MessageType.Error); } @@ -103,8 +102,7 @@ private void CreateAnimationIfNecessaryAndAttachToGraphic() return; } string jsonData = _image.AnimationJson.text; - if (string.IsNullOrEmpty(jsonData) || - !jsonData.StartsWith("{\"v\":")) + if (string.IsNullOrEmpty(jsonData)) { Debug.LogError("Selected file is not a lottie json"); return;