Example #1
0
        public ExpressionClipSelector(VRM10ExpressionAvatar avatar, SerializedObject serializedObject)
        {
            avatar.RemoveNullClip();

            m_avatar = avatar;

            var prop = serializedObject.FindProperty("Clips");

            m_clipList           = new ReorderableExpressionList(serializedObject, prop, avatar);
            m_clipList.Selected += (selected) =>
            {
                SelectedIndex = avatar.Clips.IndexOf(selected);
            };
        }
Example #2
0
        public ExpressionClipSelector(VRM10ObjectExpression avatar, string dir, SerializedObject serializedObject)
        {
            avatar.RemoveNullClip();

            m_avatar = avatar;

            var prop = serializedObject.FindProperty("Clips");

            m_clipList = new ReorderableExpressionList(serializedObject, prop, dir);

            m_clipList.Selected += (selected) =>
            {
                var clips = avatar.Clips.ToArray();
                SelectedIndex = Array.IndexOf(clips, selected);
            };
        }