Open copper123 opened 2 years ago
Can you fix the formatting?
@robertjcolley How to fix? Not sure the question is.
@copper123 Did you find the solution already?
If not, I think the issue is in your conditional rendering of ARScene navigator.
Return the AR scene navigator once, just change the props regarding the condition...
I also had issues with onClick handler. It was not working properly. What I was doing was un-mounting and re-mounting the AR scene navigator and the related screen, because of some optimisations I wanted to achieve. Unfortunately I was just breaking the viro event handlers...
As soon I let the Viro scene navigator just mount with my screen component and keep it mounted, event handlers have started working properly.
@ViktorVojtek thanks for your suggestion. However, In my case, I need two types, one is Viro and one is normal, it means I need to leave the ARScene and back again. How can I solve this?
@copper123 I am doing something similar.
And what I do is that I have a context (you can use redux or state and passing props to children approach as well) with all the settings for AR Scene and for model/models.
I am reading these settings and data to set up scene and add/remove models to/from the scene. And when I want to leave the screen with AR scene I just reset this context but leave the screen with AR scene in the navigation stack, so its not un-mounting/re-mounting.
You just need to rethink the architecture of your current screen/components I suppose.
@ViktorVojtek I got this. Thanks
@copper123 I figured out that on react-native 0.67.5 and viro-react 2.23.0 all events works for me. Even onPinch and onRotate works really well on every device I've tesed and had issues before. I have to notice that it works good only if I have Bitcode enabled in Xcode for the whole project and every pods, same with proguard on android. Hope this helps.
@ViktorVojtek tried all your solutions but still does not work
Requirements:
Please go through this checklist before opening a new issue
Environment
Please provide the following information about your environment:
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know. I check the issue found in https://github.com/viromedia/viro/issues/785, and use the way they suggest, but it is no help.
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, screen capture, video recording. The more information you provide, the better we can support you.
The AR function in my design is one of the pages, and user can choose which AR they want to play.
if(mainVisible){ return (
}else if(firstARVisible){ return (