-
Notifications
You must be signed in to change notification settings - Fork 531
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
Create new project or use the repo #49
Comments
Hi @Jairolaya12x , You don't have to use the repo example project, you can create your own project. Steps: 1- Add your unity project to "unity" folder
are added to your settings.gradle file 6- If using Unity 2019.2 or older, open build.gradle of UnityExport module and remove these
7- That's it, go back to your flutter project and run |
Great thanks i'll test and let you know, quick question what is the reason of the different icon? |
@Jairolaya12x if you encounter any issues, please mention it here, The examples need to be updated too. As the library has moved a bit fare from it |
I don't found any issue yet, but the importation of libs how say @TarekMedhat works fine, the icon change and works like the guide in the tutorial, maybe add this solution in new tutorial for help other people, i'll make more test with AR and post any issue or problem Thanks! |
I am trying to work with Unity's AR samples repository, but cannot seem to get the libraries linked up. Following @TarekMedhat 's method above, I added the
|
@MichealReed Have you followed the steps described here? You'll need to create other modules for all AR dependencies (similar to how you added the unity_classes.jar). |
Yes followed the outlined steps, but cannot get the libraries to recognize. I also tried tried approach of unpacking the .apk file for the libs, and set them in a lib/architecture/*.so hierarchy inside the unity export folder.
|
Have you setup your modules like this? You'll need to create a module for every .aar dependency that was in the UnityExport/libs folder, and be sure to add them to
|
@thomas-stockx should If I remove the includes from the |
@MichealReed Yes, they should be in the Android project, as we'll compile the whole project and not just the UnityExport module. Do you seen any errors in logcat which could explain the blank screen? |
Hi @Jairolaya12x , I have tried following the instruction from @TarekMedhat, but the game still didn't show up in my own project app. Does something has to do with it? Thanks! |
Hi @leemuljadi, Those hidden folders are unrelated. Can you please state the compile or build error you're having? |
Hi @thomas-stockx, Thanks for the reply. Code for the
|
Any logs to help me figure out what's going wrong? Are you embedding your ShooterGame widget into another widget, or are you pushing a route to the ShooterGame widget? Do you see the widget in the layout inspector and/or does it have a width/height of 0? This looks more like an implementation issue than a bug in the library. |
Hi @thomas-stockx, Unfortunately there no log showing, even when I run in verbose. Basically I just put the ShooterGame widget inside of the onPressed function of a MaterialButton as code below:
|
Hi @leemuljadi,
Either you use a state with a visibility boolean which you change with setState in your onPressed, or you push a new route to the ShooterGame widget. You can find the documentation of pushing a new route here: |
Hi @thomas-stockx, It does work now!!! But I got another problem that the app suddenly closed when exit the game. Error log:
|
Hi @leemuljadi, Sadly that's an issue with the current Android implementation of Unity as a Library, you can track that issue here: #46. |
Alright thanks so much @thomas-stockx. |
Hi @thomas-stockx I created all the modules for AR Foundation in iOS works fine but in android get the same error that @MichealReed
Any idea about this? Thanks! |
This issue have better instruction than at the readme, consider adding some more details to the readme. |
I don't have a settings.gradle file inside the UnityExport.. and having error FAILURE: Build failed with an exception.
might be some misunderstandings, it came back.. the error is still there |
Is there any update on your project ? I am also getting this error. I believe I could not import these jar and aar files as a module. I saw screenshot of @thomas-stockx . When i tried to import these files as a module I am also getting this error. I will be waiting for your answer guys . |
facing same issue. did you found any solution? |
dependencies { |
Simply follow the following steps:
This way you will be able to add all the .aar/.jar files and hence should not receive the below error.
|
I follow all the steps for create my project and setup this, but when need add as library the .jar i don't have the same flow, and don't works the question is: Is necessary use the repo for create the unity plugin or should work with a new project create by me. because for example if open in android studio see different the project first variation
My project, (The icon under Project is a folder and the android folder have [name_android])
The repo (The icon under Project is flutter icon)
Add as library:
This is my project but don't show all the settings.
This is the window of the repo when try to add as library
Hope that anyone can help me with this please,
Thanks!
The text was updated successfully, but these errors were encountered: