コード例 #1
0
 List <Type> GetDataTypeOrAllowed(BackEnd.Input inp)
 {
     if (inp.GetDataType() == null)//several data type; we don't know which data type this input is taking
     {
         return(inp.GetAllowedDataTypes());
     }
     else//only one data type
     {
         return(new List <Type>(new Type[] { inp.GetDataType() }));
     }
 }
コード例 #2
0
        InputVisual CreateInputVisual(BackEnd.Input input, string label)
        {
            GameObject go = new GameObject();

            go.AddComponent <RectTransform>();
            go.transform.SetParent(rectTransform, false);
            InputVisual inp = go.AddComponent <InputVisual>();

            inp.inputAttachedTo = input;
            inp.host            = this;
            inp.SetLabel(label);
            return(inp);
        }