# Session & Cameras
Here we cover the Frameplay Session & Registered Camera in Unity.
For more information on Frameplay Sessions, Cameras and best practices see our Developer Guidelines.
# Starting a Session
Follow the Install Guide to use our "StartSession.cs" example script.
StartSession() parameters are as follows:
Frameplay Data Asset (Required): This is a reference to the Frameplay Data Asset. This can be referenced by a Game Object in the Scene (StartSession.cs example), loaded using Resources or Asset Bundles.
Player Data (Optional): If available, the players Age and Sex should be passed as parameters to the
StartSessioncall. These can be sourced from a client API or a custom login. This data allows for targeted advertisements.
Action Delegate (Optional): Action called when the Frameplay session has successfully started. Typically used for registering a camera once the SDK is initialized.
# Registered Cameras
The Frameplay Session requires a reference to a Unity Camera. This should be called each time the active camera changes.
The camera is used for gathering metrics and activating advertisements colliders. Only one Camera Object can be registered at any one time. They can be registered and unregistered when required.
Register a Unity Camera object by calling
Frameplay.RegisterCamera(). The easiest way to do this is to use the StartSession callback parameter.
Frameplay.RegisterCamera() parameters are as follows:
- Camera (Required): The players current Unity Camera Object
More information on the Frameplay API.