We’ve already covered how scenes and scripts are different. Scripts define an engine class extension with imperative code, scenes with declarative code.
Each system’s capabilities are different as a result. Scenes can define how an extended class initializes, but not what its behavior actually is. Scenes are often used in conjunction with a script, the scene declaring a composition of nodes, and the script adding behaviour with imperative code.
Tutorial Contents:
- When to use scenes versus scripts
- Anonymous types
- Named types
- Performance of Script vs PackedScene
- Conclusion