Пример #1
0
        private void ReceiveCurrentAnimation(object[] e)
        {
            var clip = GetClip(e);

            if (clip == null)
            {
                return;
            }
            animation.SelectAnimation(clip);
        }
        private JSONStorableStringChooser InitAnimationSelectorUI(Transform configurableScrollablePopupPrefab)
        {
            var jsc = new JSONStorableStringChooser("Animation", new List <string>(), "", "Animation", (string val) =>
            {
                if (_ignoreAnimationChange)
                {
                    return;
                }
                _animation?.SelectAnimation(val);
            });

            var popup = Instantiate(configurableScrollablePopupPrefab);

            popup.SetParent(transform, false);

            var ui = popup.GetComponent <UIDynamicPopup>();

            ui.label            = "Play";
            ui.popupPanelHeight = GetComponent <UIDynamic>()?.height ?? 500;

            jsc.popup = ui.popup;

            return(jsc);
        }