Reputation: 600
I'm trying to display a GADBannerView in a SCNPlane. Code looks more or less like this:
let banner = GADBannerView(adSize: kGADAdSizeSmartBannerPortrait)
banner.rootViewController = self
banner.load(GADRequest())
let viewMaterial = SCNMaterial()
viewMaterial.diffuse.contents = bannerView
let plane = SCNPlane(width: 320, height: 50)
plane.materials = [viewMaterial]
let planeNode = SCNNode(geometry: plane)
planeNode.position = SCNVector3(0, 5, -10)
sceneView.scene.rootNode.addChildNode(planeNode)
This kind of works but the banner is displayed like this, i guess the GADBannerView has some transparent stuff going on which is not handled correctly:
Is this even possibly? If yes how, if not why not. ;)
Upvotes: 0
Views: 50
Reputation: 13462
Displaying UIView
hierarchies as the contents
of a SCMaterialProperty
is not documented and not supported.
Upvotes: 0