Scene Locking Unity

Scene Locking Unity

Table of Contents


Locking and Unlocking

When collaborating on a project in Unity, we often end up in the situation where multiple people make edits to the same scene or prefab. This forces people to revert their work, losing time and energy. To avoid this from happening, Synk allows users to lock scenes and certain prefabs through Ftrack.

To enable asset locking and unlocking, the UseSceneAndSetLocking option needs to be enabled in the ProjectSynkConfig.json file. Ask your supervisor.

The Synk toolbelt can lock and unlock scenes and prefabs from within Unity. Locking a scene or prefab assigns the current Ftrack user to that asset. Only one user can be assigned to a specific scene or prefab at any time. A user can only edit a scene or prefab if that asset is locked by the current user.

To lock or unlock a scene or prefab:

  1. Right-click the asset (in hierarchy window or project window)

image-20260115-093339.png
image-20260115-093554.png
  1. Click (Un)Lock

image-20260115-093751.png

Lock State

The current lock state can be seen in Unity by the lock icon displayed next to the asset. Hovering over an icon will give extra info.

ICON

ICON MEANING

RECOMMENDED ACTION

CAN SAVE ASSET

NO ICON

Asset is not changed and/or is not tracked through Ftrack.

/

You are not logged in to Ftrack.

Log in to ftrack (using Ftrack task window).

Asset is locked by you.

/

Asset is changed, but not locked by anyone.

Lock the asset or discard changes.

Asset is not changed, and is locked by someone else.

/

Asset is changed, and is locked by someone else.

Discard your changes, or request the other person to unlock the asset, then update your project through git and lock it yourself.

Multiple people are assigned to this asset.

Unlock the asset (if you locked it), or manually remove the assigned people in Ftrack.


GAMES: Environments, Scenes and Sets

To use this locking feature in games, synk uses a hierarchy of environments, scenes, and sets.

Environments are collections of scenes. When all scenes of an environment are loaded in Unity, you should see a complete environment. Environments might be split up into scenes for different reasons, such as a scene containing all the lights, a scene containing all static objects, one containing all animated objects, …

Sets are prefabs which make up sections of a scene. In the same way that environments can be split up into scenes for different purposes, scenes can be split up into set prefabs, such as a set containing all enemies of a scene, or a set containing all puzzle elements, …

This hierarchy is presented slightly different for Ftrack and for Unity, and looks as follows:

Ftrack

Unity hierarchy window

Unity project window

Each Environment contains its scenes and sets. Each Scene and Set contains a task where people get assigned to.

Set prefabs are instantiated in the scenes.

NOTE: You should only instantiate Set prefabs once. Instantiating them multiple times can cause unexpected behavior.

NOTE: Set prefabs from different environments can have the same name, e.g. Indoor_env/Logs_Set and Outdoor_env/Logs_Set

Environments are represented by folders. These contain all scenes that are part of that environment.

The environment folder contains a Sets folder, where all Set prefabs of that environment are stored.

NOTE: You can have subfolders inside the Sets folder.

  • Environment 1

    • Scene A

    • Scene B

    • Scene C

    • Set 1

    • Set 2

    • Set 3

  • Environment 2

    • Scene D

    • Set 4

    • Set 5

…

  • Scene A

    • Set 1

    • Set 2

  • Scene B

    • Set 3

  • Scene C

  • Scene D

    • Set 4

    • Set 5

…

  • Environment 1

    • Scene A

    • Scene B

    • Scene C

    • Sets

      • Set 1

      • Set 2

      • Set 3

  • Environment 2

    • Scene D

    • Sets

      • Set 4

      • Set 5

…


Troubleshooting and FAQ

Lock icons are not showing

  • Did you enable the UseSceneAndSetLocking in the ProjectSynkConfig.json file?

  • Did you add the scene or prefab to Ftrack, using the correct hierarchy, both in Ftrack and in Unity?

  • Did you make any changes to the scene or prefab? Lock icons don’t show if you didn’t make any changes to the asset, except if the asset is locked by someone.

Incorrect lock icon is showing

  • Did you reload the ftrack data? (In the Ftrack tasks window)