public void UnPackTo(NInputInfoT _o)
        {
            _o.SettingName = this.SettingName;
            _o.Name        = this.Name;
            _o.ConfigOrder = this.ConfigOrder;
            _o.BitOffset   = this.BitOffset;
            _o.Type        = this.Type;
            _o.Flags       = this.Flags;
            _o.BitSize     = this.BitSize;
            _o.Extra       = new NymaTypes.NInputExtraUnion();
            _o.Extra.Type  = this.ExtraType;
            switch (this.ExtraType)
            {
            default: break;

            case NymaTypes.NInputExtra.Button:
                _o.Extra.Value = this.Extra <NymaTypes.NButtonInfo>().HasValue ? this.Extra <NymaTypes.NButtonInfo>().Value.UnPack() : null;
                break;

            case NymaTypes.NInputExtra.Axis:
                _o.Extra.Value = this.Extra <NymaTypes.NAxisInfo>().HasValue ? this.Extra <NymaTypes.NAxisInfo>().Value.UnPack() : null;
                break;

            case NymaTypes.NInputExtra.Switch:
                _o.Extra.Value = this.Extra <NymaTypes.NSwitchInfo>().HasValue ? this.Extra <NymaTypes.NSwitchInfo>().Value.UnPack() : null;
                break;

            case NymaTypes.NInputExtra.Status:
                _o.Extra.Value = this.Extra <NymaTypes.NStatusInfo>().HasValue ? this.Extra <NymaTypes.NStatusInfo>().Value.UnPack() : null;
                break;
            }
        }
        public NInputInfoT UnPack()
        {
            var _o = new NInputInfoT();

            this.UnPackTo(_o);
            return(_o);
        }
        public static Offset <NymaTypes.NInputInfo> Pack(FlatBufferBuilder builder, NInputInfoT _o)
        {
            if (_o == null)
            {
                return(default(Offset <NymaTypes.NInputInfo>));
            }
            var _SettingName = _o.SettingName == null ? default(StringOffset) : builder.CreateString(_o.SettingName);
            var _Name        = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name);
            var _Extra_type  = _o.Extra == null ? NymaTypes.NInputExtra.NONE : _o.Extra.Type;
            var _Extra       = _o.Extra == null ? 0 : NymaTypes.NInputExtraUnion.Pack(builder, _o.Extra);

            return(CreateNInputInfo(
                       builder,
                       _SettingName,
                       _Name,
                       _o.ConfigOrder,
                       _o.BitOffset,
                       _o.Type,
                       _o.Flags,
                       _o.BitSize,
                       _Extra_type,
                       _Extra));
        }