I have an app for loading glasses. When I press a button it loads a model on the face and when I press another button it loads another one. I’ve tried two ways of doing it:
- Tried switching the models on the
ARFaceManager.faceprefab
when i click a button something like
arObject = (GameObject)bundle.LoadAsset(rootAssetPath) as GameObject; //bundle is a downloaded assetbundle from www request
ARFaceManager fm = ARSession.GetComponent<ARFaceManager>();
fm.facePrefab = arObject;
but the issue is that I need to hide my face in order for the new model to show, otherwise it won’t
- Tried destroying the whole
ARFaceManager
component and Add it on button click with the proper model when needed. Here the problem is that on every new button click the old model stays on the screen and it doesn’t go away like in the photo.
**I should note that the prefab of the glasses contains a facePrefab that is invisible through a shader, so I could hide the unwanted parts.
What could be wrong here? I hope u understand the issues. Thanks!!