I have two files :
// BaseClass.as
shared interface BaseInterface : ScriptObject { ... }
uint SOME_GLOBAL_VAR = 0;
shared class BaseClass : BaseInterface {
...
Init(...)
{
SOME_GLOBAL_VAR ++;
}
}
and then in
// Main.as
#include "BaseClass.as"
BaseInterface@ instance;
...
BaseClass@ instanceClass = cast<BaseClass@>(instance);
//Error : Shared code cannot access non-shared global variable 'SOME_GLOBAL_VAR'
So I would like to have BaseClass in Main.as with methods from class, not the interface. Also, the global variable should be possible to use.
Hope I explained the issue well enough.