Closed DotWith closed 2 years ago
For context, @DotWith was attempting to pass FlxColor into a script's context.
However, FlxColor cannot be passed to the HScript at runtime for a simple reason; FlxColor doesn't exist.
To clarify, FlxColor is not a class; it is an abstract type, which wraps the Int
class. At runtime, all instances of FlxColor are replaced inline with Int
values and FlxColor is basically scrubbed from existance.
One possible workaround could be to define your own static class which includes these values; this would create a constant identifier you could pass to your context.
Error Log:
C:/HaxeToolkit/haxe/lib/polymod/git/polymod/hscript/HScriptMacro.hx:258: characters 44-50 : Cannot use abstract as value