Read-only (const) handle as member of a class
gamedev.net
Hello fellow Angelscripters,I recently got a use case for not allowing a @handle member of a script class to be changed. So I want it to be assigned upon initialization and never re-assigned. I tried doing this:class Foo{ Bar@ const my_prop = Bar()}and got a compile error: Class properties cannot be declared as const I went to the docs and read the section on const handles again (
0 Comentários ·0 Compartilhamentos ·39 Visualizações