Skip to content

Instantly share code, notes, and snippets.

@pythonpaul
Created September 28, 2019 19:54
Show Gist options
  • Save pythonpaul/2c1c68ef4054eea5d8870d985862e6a4 to your computer and use it in GitHub Desktop.
Save pythonpaul/2c1c68ef4054eea5d8870d985862e6a4 to your computer and use it in GitHub Desktop.
The ModelRenderable method generated the AR model, replace the default R.raw.andy with the previously generated .sfb file
ModelRenderable.builder()
.setSource(this, Uri.parse("taka.sfb")) //(this, R.raw.andy)
.build()
.thenAccept(renderable -> andyRenderable = renderable)
.exceptionally(
throwable -> {
Toast toast =
Toast.makeText(this, "Unable to load andy renderable", Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
return null;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment