ARCore 是否具有 ARKit 的 "guard let planeAnchor" 语义等价物?

Does ARCore have a semantic equivalent of ARKit's "guard let planeAnchor"?

我想知道ARCore/Kotlin中是否有类似ARKit/Swift中的guard let语句的语义结构?

let anchor: ARAnchor?

guard let planeAnchor = anchor as? ARPlaneAnchor else { 
    print("condition not met")
    return 
}

我想我已经找到了 ARCore 的 planeAnchorElvis 运算符safe cast 运算符 所需的语义:

public class CenterPosePlaneAnchor { ... }

val anchor: Anchor?
val info = "condition not met"

val planeAnchor = anchor as? CenterPosePlaneAnchor ?: return println(info)