[Solved] notifyOnRender2D (kha.graphics2) --> Fatal error in v8

so this:

notifyOnRender2D(function(g:kha.graphics2.Graphics) {
g.begin();
   g.color = Color.Yellow;
   g.drawRect(20,20,20,20,1);
 g.end();
 });

now gives this:
#
# Fatal error in v8::ToLocalChecked
# Empty MaybeLocal.
#

EDIT: g.begin() and g.end() need to be used in a different way here.

3 Likes