sceneview-android
sceneview-android copied to clipboard
Cant add custom instructions
Im trying to add custom instructions with this code:
val customInstructionNode: ViewNode = ViewNode()
fun displayCustomInstructionView(){
customInstructionNode.apply {
position = Float3(x = 0.0f, y = -0.75f, z = -2.0f)
loadView(context, lifecycle, R.layout.custom_instruction_view)
}
customInstructionNode.onViewLoaded = { renderableInstance: RenderableInstance, view: View ->
renderableInstance.apply {
isShadowCaster = false
isShadowReceiver = false
renderPriority = 0
}
}
if (scene.instructions.enabled){
scene.instructions.infoNode = customInstructionNode
}
}
I'm doing this after plane tracking is established and no other instruction is displayed, but the custom instructions are never visible. Through some debugging, I found out that the onArFrame
function in Instructions is setting the infoNode to null
directly after setting it.
Am I missing something, or is this a bug?
Hi! This is probably an intended behavior for default instructions, however, we are open for suggestions and pull request.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.