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

Load unity application on demand #26

Open
ssshake opened this issue Feb 25, 2020 · 4 comments
Open

Load unity application on demand #26

ssshake opened this issue Feb 25, 2020 · 4 comments

Comments

@ssshake
Copy link

ssshake commented Feb 25, 2020

Is there a way to suppress the loading of the unity application when the react native application loads?

We want to be able to dynamically start the unity process as for our application 90% of the work is being done in react native and 10% is being done in unity. The purpose of doing a hybrid approach like this is to be considerate to battery life by not always having the unity program running.

@hanthuyen8
Copy link

Me too, starting Unity at the same time with React Native doesn't make any sense. Once I embed Unity into something, I want it to control when Unity will appear, not let Unity start automatically.

@Jonovono
Copy link

@ssshake @hanthuyen8 did you guys figure out a solution to this?

@hanthuyen8
Copy link

@ssshake yes, i used this fork: https://github.com/asmadsen/react-native-unity-view

@ssshake
Copy link
Author

ssshake commented Mar 24, 2020

Cool thanks for referring me to that fork. @Jonovono the solution I ended up going with was a bit different.

Instead of having a unity application inside of a react native application it was starting to make more sense to keep them as two separate apps and allow each app to call each other, and share data.

So what I used for ios was two things. 1) Universal links, which allows one app to open another and pass some data via get params. 2) Application groups, so that both applications have shared storage between then and share a common sqlite databse.

So my react native app and unity app both have access to the same local database and both application upon a button press can open the other app and pass some data to it so they it knows what the other app was working on .

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

3 participants