---
title: begin()
framework: scenekit
role: symbol
role_heading: Type Method
path: scenekit/scntransaction/begin()
---

# begin()

Begins a new transaction for the current thread.

## Declaration

```swift
class func begin()
```

## Discussion

Discussion The new transaction is nested within the thread’s current transaction, if there is one. The first time you modify the scene graph during a pass through the run loop, SceneKit automatically creates a transaction and makes it the current transaction. (SceneKit commits that transaction when the next iteration of the run loops begins.) If you call this method to create a custom transaction before modifying the scene graph, your custom transaction becomes the current transaction.

## See Also

### Creating and Committing Transactions

- [commit()](scenekit/scntransaction/commit().md)
- [flush()](scenekit/scntransaction/flush().md)
