Issue when forward to new activity
Hi at all!
I'm trying to start another activity with a different panel. From starter template I take the button and prepare the intent.
I want to re-use the original environment and register a new panel for the new activity, but if I try I have this:
java.lang.Exception: Native Assert. FILE=Utils/AndroidUtils.cpp:102 MSG=Global asset manager can only be set once
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3724)
This is my target activity:
import com.meta.spatial.castinputforward.CastInputForwardFeature
import com.meta.spatial.core.SpatialFeature
import com.meta.spatial.debugtools.HotReloadFeature
import com.meta.spatial.runtime.LayerConfig
import com.meta.spatial.toolkit.AppSystemActivity
import com.meta.spatial.toolkit.PanelRegistration
import com.meta.spatial.vr.VRFeature
class TestActivity : AppSystemActivity() {
override fun registerFeatures(): List<SpatialFeature> {
val features = mutableListOf<SpatialFeature>(VRFeature(this), HotReloadFeature(this))
if (BuildConfig.DEBUG) {
features.add(CastInputForwardFeature(this))
}
return features
}
override fun registerPanels(): List<PanelRegistration> {
return listOf(
PanelRegistration(R.layout.ui_new_panel) {
config {
themeResourceId = R.style.PanelAppThemeTransparent
includeGlass = false
width = 2.0f
height = 1.5f
layerConfig = LayerConfig()
enableTransparent = true
}
})
}
}
Thanks!
