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:


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 :slight_smile:

Have a great one!

Update to Unity 4.6.1 and see what happens.

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?