Skip to content

How to ? kotlinx.coroutines on android native. (Godot yield implementation) #1808

@piiertho

Description

@piiertho

Hi there !

This is more a question than an issue, I don't know if there's a better place to ask.

I am currently working with contributors on adapting Kotlin to godot’s GDNative, using kotlin cinterop: https://github.com/utopia-rise/godot-kotlin.


In gdscript (godot’s scripting language), there is a yield method, which is basically a coroutine. So we implement it for godot-kotlin using kotlin’s couroutines (see here).
We managed to get it working on every platforms, except android, as we cannot find a native implementation for android here

What I understand is that on android you have to use a JVM implementation of coroutines, to access Dispatchers.Main, according to the readme.
I’d like to know if we understand well the problem, and if you have any workaround to bring yield on godot-kotlin for android ?

Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions