Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by tricsuletz · Dec 10, 2014 at 01:10 PM · animationandroiduicrash

Modern UI 4.6 with Animations crashes on Android

Hi all!

I've been lurking through all Unity forums since I began working with it and usually try to find solutions before asking a question. After several days of searching I'm still stuck, hence this question.

Backstory: Relatively new to Unity and definitely noob in programming. Installed the new 4.6 version to tryout the new UI features.

What I want to achieve: Sliding Panel with Buttons from Off-screen to on-screen (and vice-versa).

My Approach:

  • Create Panel with buttons (all in Canvas)

  • Create animation for sliding in the panel

  • Script animation

  • Use Button in Panel to change boolean for animation

Problems:

  • In Editor: None

  • On Nexus 7 2013 Android L: none

  • On Nexus 4 Android L: app crashes after starting animation.

Here is my setup so far:

alt text alt text

I have 2 states in the animator, one animates up, the 2nd one is just reversed (-1). Conditions for the animations:

  • Show > Hide : bool showMenu = true

  • Hide > Show : bool showMenu = false

Here's the script i use:

 using UnityEngine;
 using UnityEngine.UI;
 using UnityEngine.EventSystems;
 using System.Collections;
 
 public class UIScript : MonoBehaviour {
 
     public Animator _menu;
     public GameObject panel;
 
     public bool showMenu
     {
         set{_menu.SetBool("showMenu", value);}
     }
 
     void Start () {
         _menu = panel.GetComponent<Animator>();
     }
 }


So yeah... works fine in the Editor and on the tablet. Crashes on phones.

Couldn't upload more pics. If additional info is required please say something and I'll add whatever is required.

I'm really new to animations in Unity but I did search the Interwebs and watched the Unity tuts, but I feel I'm missing something. Maybe someone here can lighten my path. Please :)

Have a great one!

3.png (89.7 kB)
1.png (14.4 kB)
Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Dec 10, 2014 at 04:15 PM 1
Share

Well, if you can reproduce this crash reliably in a $$anonymous$$imum example scene, it would be great if you could file a bug report including your project and logcat of the crash. $$anonymous$$eep in $$anonymous$$d to be specific in a bugreport since it works on some devices.

avatar image tricsuletz · Dec 10, 2014 at 04:53 PM 0
Share

Yes, 100% repro rate. I would be reasured if someone could have a look at my project. I'm open to skype calls as soon as I get home from work. And before submitting a bug I need to test on more devices...

avatar image Yury-Habets ♦♦ · Dec 10, 2014 at 06:27 PM 0
Share

I'm trying to get your Android build version in every comment here :) After that, please submit a bug report.

avatar image tricsuletz · Dec 10, 2014 at 07:33 PM 0
Share

Hey! I wrote my android version in the lower comments :) LRX21T

Also, I narrowed it down to the Animator part.

I opened a little project I had from a while ago and re-did the canvas setup. Same crashes as before. The difference is that I have (multiple) animations inside the scene, setup on some game objects, and they work just fine. Whenever I put an animation on a GUI element, the crash is back.

Automatic button animations do not crash the app, only custom ones do.

Re-did the whole canvas setup on a new project and no crashes. Re-did it again on a new new project, crash is back.

I'm on a slippery slope to the insane asylum :))

avatar image Yury-Habets ♦♦ · Dec 11, 2014 at 06:20 AM 0
Share

@tricsuletz thanks. Please submit a bug report with your $$anonymous$$imal project, we'll take a look.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by revapps · Dec 10, 2014 at 01:30 PM

Update to Unity 4.6.1 and see what happens.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tricsuletz · Dec 10, 2014 at 02:55 PM 0
Share

updated to 4.6.1. no luck...

[Edit]: Can't post another answer? ok.

Yes, the android version is the official stock one, no root, no nothing. $$anonymous$$aybe I'm missing something code-related..idk. Did I do good what I did there? ^

I would feel so sad if I'd had to go back to 4.5 and tweens...

[Edit2] : Build number LRX21T. Fresh factory reset.

avatar image Yury-Habets ♦♦ · Dec 10, 2014 at 04:06 PM 0
Share

Please share your build number as I mentioned in my answer.

avatar image poochie89 · Oct 12, 2015 at 03:31 PM 0
Share

@Yury Habets @tricsuletz One year later and the bug still seems to exist. I am on Unity 5.2.1 and testing on a Android 4.2.2 device. I also narrowed it down to the animator animating modern GUI elements. Forcing OpenGL ES 2.0 is not available in unity 5.1.2. and adding a 1x1 button did not help either

Is there any solution to this problem?

avatar image
0

Answer by Yury-Habets · Dec 10, 2014 at 03:16 PM

This can be caused by using Lollipop. Is your Nexus 4 using an official L image or developer preview? What is the build number in the "About phone" menu?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Oculus Quest deadlock 0 Answers

Android game crash 2 Answers

Android Crashes on game load 1 Answer

Spritesheet animation shake/jitter/wobble problem on android. 1 Answer

create an AndroidJavaObject within a Thread 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges