functiontest()local id = get('objectId');local app = getApp();local ob = app.getGameObject(id);endobjectId ='';returnfunction()local app = getApp();local myObject = app.createGameObject(); --objects can be used for adding images objectId = myObject.id;async('test');end
This is how you get objects to be shared between sub coroutines.