• Advertisement
Sign in to follow this  

Do we need to create a new context for doing a callback?

This topic is 445 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

According to this article: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_callbacks.html

If we need to callback a script function from the native app when the script is running, we must create a new context (I know I can reuse them by maintain a context pool) to do the callback?

Can I launch the callback just within the current context?


For example:

1.Native App create a context named "ctx".

2.Native App then Prepare() and Execute() a script function "void script_main(void)" on "ctx".

3.The script in "script_main" make a call to a native function "native_api(my_callback)".

4.The native function "native_api" want to callback the script funcation "my_callback" also on "ctx" (not on another context). Is it possible?

Edited by ASBai

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement