文档

​
​

Development

User Acquisition

Monetization

工业

Unity Version Control

DevOps

On-prem

Gluon

Editor plug-in

Open Unity Dashboard

Unity Version Control

此页面不支持所选语言。
​
​
Unity Version Control
  • Overview
  • Cloud Repositories organization update
  • Installation
  • Use UVCS with the Unity Editor
  • Unity Version Control plugins
  • Concepts
  • Tutorials
  • On-Prem
    • Server configuration
    • Client configuration
    • Manage On-Prem licenses
    • Stop, start, or restart server
    • Server administration console
    • Configure UVCS
      • Server configuration files
      • Configure lock rules
      • Merge rules
      • Configure file compression
      • Proxy servers
      • Use a proxy server
      • Support alternative connections to a server
      • Configure repository storage
    • Use server read-only mode
    • Back up and restore data
    • Archive revisions
    • Force client upgrades
    • SSL certificates
    • GitServer
    • Use SAML authentication with Microsoft Entra
  • Gluon
  • CLI and shortcut references
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

Configure lock rules

Configure the lock rules for exclusive checkouts.
阅读时间3 分钟
最后更新于 10 个月前

Use one of the following methods to add or edit your Unity Version Control (UVCS) lock rules to configure your file locks:
  • Manage your lock rules from the UVCS On-Prem server administration console.
  • Create or edit your
    lock.conf
    file.

Configure lock rules in the server administration console

  1. Launch the server administration console.
  2. Select Configuration > Lock rules.
  3. Add or edit global rules for all repositories, or repository specific rules to apply to specific repositories.

Add global rules

注意
If you leave the global rules field empty, no global rules apply.
  1. Select Generate common rules.
  2. Either load the common lock rules or edit them to specify your own global rules.
  3. Select Apply.

Add repository specific rules

注意
Repository specific rules apply to a single repository and overwrite any global lock rules for that repository.
  1. Select Add to specify the rules for a repository.
  2. Enter the name fo the repository.
  3. Select Generate common rules and edit to specify your own rules.
  4. Select Delete to remove rules for a repository if you don't need them. Select Apply.

Configure lock rules in the
lock.conf
file

Create or edit the
lock.conf
file on the server directory in the following format:
rep:<repname> [br:[<destination_branch>]] [excluded_branches:<exclusion_pattern>…]

Parameters

Description

repname
The name of the repository where that repository specific lock rules apply to. You can also use
*
to apply global rules to all repositories.
destination_branch
The source of truth when you create a new lock. UVCS considers the revision in this branch as the last revision. Locked files in other branches are not released until you merge them back into the destination branch. The default destination branch is
/main
.
exclusion_pattern
A pattern of files to exclude from lock rules that might represent a full branch name, for example
/main/experiment
, or a pattern with wildcards, for example,
/main/experiments/*
,
/main/experiment-*
, or
*/art-concepts/*
.
To configure the paths that lock on checkout, specify complete paths or patterns, with each rule in a new line:
In the following example, you ensure that all
*.png
pictures and all files under the
/assets/textures
folder that begin with
model
lock on checkout in the
battlegame
repository.
rep:battlegame br:/main*.png/assets/textures/model*.*

Example
lock.conf
file

rep: * br:/main# Audio and video formats*.mkv*.mp3*.mp4*.ogg*.wav*.wave# Image formats*.bmp*.jpg*.jpeg*.png*.gif*.eps*.exif*.icns*.ico*.psd*.ai*.svg*.pcxrep: doom3src br:/main excluded_branches: /main/experiment /main/experiments/* */art-concept */art-concepts/***/sys/*.xlib*.def

Example lock rules for specific cases

You can use lock rules to lock files or a directory in a specific folder. For examples for how to use these types of lock, refer to the following:

Rule

Description

/prj/Assets/Standard Assets/Toon Shading
Lock everything under the
/prj/Assets/Standard Assets/Toon Shading
folder.
/prj/Assets/Standard Assets/Tree Creator/Trees/Big*.meta
Lock everything under the
/prj/Assets/Standard Assets/Tree Creator/Trees
folder that begins with Big and ends with
.meta
.
!/prj/Assets/Standard Assets/Tree Creator/Trees/BigTree_textures.meta
Never lock the
BigTree_textures.meta
file under the
/prj/Assets/Standard Assets/Tree Creator/Trees
folder. This rule overwrites the previous one/
**/Library/*.prefs
Lock every file that ends with
.prefs
and is under any folder called
Library
.

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Configure lock rules in the server administration console

      • Add global rules

      • Add repository specific rules

    • Configure lock rules in the lock.conffile

    • Example lock.conf file

    • Example lock rules for specific cases


报告此页面的问题