我用sceneform表示arcore。在arcore项目中,需要随时切换不同的模型。我该怎么办
ModelRenderable.builder()
.setSource(
this,
Uri.parse("file:///android_asset/pTorus04.glb"))
.setIsFilamentGltf(true)
.build()
.thenAccept(
modelRenderable -> {
VideoRoomActivity activity = weakActivity.get();
if(activity != null) {
activity.renderable2 = modelRenderable;
}
})
.exceptionally(
throwable -> {
Toast toast =
Toast.makeText(this, "Unable to load Tiger renderable", Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
return null;
});
暂无答案!
目前还没有任何答案,快来回答吧!