Skip to content

Instantly share code, notes, and snippets.

@ThomasGorisse
Last active October 27, 2021 09:20
Show Gist options
  • Save ThomasGorisse/92c5c9bf21c6a3d3679fd4bf9528f561 to your computer and use it in GitHub Desktop.
Save ThomasGorisse/92c5c9bf21c6a3d3679fd4bf9528f561 to your computer and use it in GitHub Desktop.
Sceneform Maintained - Edit your Activity or Fragment
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Load model.glb from assets folder or http url
(supportFragmentManager.findFragmentById(R.id.arFragment) as ArFragment)
.setOnTapPlaneGlbModel("model.glb")
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
// Load model.glb from assets folder or http url
(childFragmentManager.findFragmentById(R.id.arFragment) as ArFragment)
.setOnTapPlaneGlbModel("https://storage.googleapis.com/ar-answers-in-search-models/static/Tiger/model.glb")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment