Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to use a separate activity #10

Open
seantheyahn opened this issue Dec 17, 2017 · 0 comments
Open

A way to use a separate activity #10

seantheyahn opened this issue Dec 17, 2017 · 0 comments

Comments

@seantheyahn
Copy link

Bottom line: you need the Unity player activity initialized in order to call Unity functions from native code. The only way to handle the scenario above would be to have the Unity player activity itself handle the deeplink. Unity will make sure it's initialized prior to the call.

Wrong! You can keep the deeplink call(s) in a queue in the activity, when the engine is loaded you can call an "initialize" method or sth like that from Unity to the activity when the first scene of unity is started, that's when you set a flag indicating that the engine is loaded and is ready to receive messages (so no more need for message queue from this moment), and more importantly, this is where you can send the queued messages to Unity.

I think it is very important not to override the main unity activity, because a lot of plugins are not open source and even if they are, changing their behavior is a hassle and overriding the main unity activity sometimes makes it impossible to use two plugins together. So why not fix it this way and make it portable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant