Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Cannot create object that requires a file or use Cocossharp related functions outside thread that Cocossharp is running on. #425

@ghost

Description

I'm using Xamarin Android with Cocossharp, Visual Studio 2017(15.9.12), Windows 10.

Object (derived from CCNode) that requires a file, ex. CCSprite(spriteFilename), cannot be created and Cocossharp related functions cannot be used outside thread that Cocossharp is running on.

For example, in CCGameview.viewCreated and layer's scheduled update function, objects can be created and Cocossharp related functions can be used without any problem.
But if I create an object that requires a file like CCSprite(spriteFilename) on some other thread like in UIThread(Main thread), when the code hits CCSprite(spriteFilename) instruction, the application just stops, not crash but does not continue executing.

I'm guessing Cocossharp runs on its own thread and this is a threading context issue and might be intended behavior.

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