Request for IntList / SharedIntList

chaneynow

New member
I am wondering why you don't have IntList / SharedIntList as a variable type? I have a need for SharedIntLists in my own custom tasks.

I convert the string names of animator states into HashIDs using Animator.StringToHash(). The HashIDs are stored as Ints. I group them in Lists but there is no easy way to reference the IntLists across Tasks because there is no SharedIntList variable Type.

It would make things much easier if you had IntList / SharedIntList as a variable Type.

Thanks
Allan
 
I am wondering why you don't have IntList / SharedIntList as a variable type? I have a need for SharedIntLists in my own custom tasks.
You can create shared variable of any type you need, just compile this script

C#:
using System.Collections.Generic;

namespace BehaviorDesigner.Runtime
{   
    [System.Serializable]
    public class SharedListInt : SharedVariable<List<int>>
    {
        public static implicit operator SharedListInt(List<int> value) { return new SharedListInt { Value = value }; }
    }
}
 
Top