Group Group Group Group Group Group Group Group Group

Referencing Scene Builder nodes in code

#1

Hi Everyone!

I have been wondering what the actual proper way of connecting to your code nodes that you have added in the SpriteKit scene builder?

I know that you can do with with the following code…

var node = SKSpriteNode()

node = self.childNode(withName : “Whatever you named it in Scenebuilder”) as! SKSpriteNode

This works but it seems like it is not the correct way to reference nodes you have added in the scenebuilder…

Thanks for any input!

#2

@vanlawler Please check out the following tutorial when you get a chance:

Thank you! :]

1 Like
#3

Thanks for the reply @shogunkaramazov!

I will check it out! I’m not really sure how I missed that one :thinking:.

closed #4

This topic was automatically closed after 166 days. New replies are no longer allowed.