• Shuhei Tanuma's avatar
    C# Unity can't cast integer represented enum value. · 37e28d98
    Shuhei Tanuma authored
    ```
    namespace MyGame;
    
    enum CommandType : byte {
    	None = 0,
    }
    
    table Command {
    	id:int;
    	type:CommandType;
    }
    ```
    
    then generate c# files. it'll output compile error like these.
    
    ```
    Assets/MyGame/Command.cs(18,39): error CS1041: Identifier expected
    Assets/MyGame/Command.cs(18,39): error CS1737: Optional parameter cannot precede required parameters
    
    16:   public static Offset<Command> CreateCommand(FlatBufferBuilder builder,
    17:   int id = 0,
    18:   CommandType type = (CommandType)0) {
    ```
    37e28d98
Name
Last commit
Last update
..
flatc.cpp Loading commit data...
flathash.cpp Loading commit data...
idl_gen_cpp.cpp Loading commit data...
idl_gen_fbs.cpp Loading commit data...
idl_gen_general.cpp Loading commit data...
idl_gen_go.cpp Loading commit data...
idl_gen_js.cpp Loading commit data...
idl_gen_python.cpp Loading commit data...
idl_gen_text.cpp Loading commit data...
idl_parser.cpp Loading commit data...
reflection.cpp Loading commit data...