예제 #1
0
 public static WriteFileJson FromMap(InputActionMap map)
 {
     return(new WriteFileJson
     {
         maps = new[] { MapJson.FromMap(map) }
     });
 }
예제 #2
0
            public static WriteFileJson FromMaps(IEnumerable <InputActionMap> maps)
            {
                var mapCount = Enumerable.Count(maps);

                if (mapCount == 0)
                {
                    return(new WriteFileJson());
                }

                var mapsJson = new MapJson[mapCount];
                var index    = 0;

                foreach (var map in maps)
                {
                    mapsJson[index++] = MapJson.FromMap(map);
                }

                return(new WriteFileJson {
                    maps = mapsJson
                });
            }