文档

​
​

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
    • Migrate from Git
    • Migrate from Perforce
    • Version Control settings
    • Configure the client
      • Client configuration files
      • Use filter pattern files
      • Use value matching pattern files
      • Globally configure the branch explorer
      • Configure EOL conversion
      • Configure external tools
      • Configure syntax language
      • Configure the Open with menu
    • Version Control workflow
    • Version Control tools
  • On-Prem
  • Gluon
  • CLI and shortcut references
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

Use value matching pattern files

Find how to use value matching filter pattern rules in configuration files.
阅读时间3 分钟
最后更新于 10 个月前

Use value matching filter pattern rules to set up specific client configuration files.
A value matching pattern file assigns a value to items that match specified patterns. These files contain one pattern per line. Unity Version Control (UVCS) uses the path of each item to check whether it matches any of the rules and then returns the assigned value.

Value filter pattern files in UVCS

UVCS has the following value matching pattern files:
  • Compression type (
    compression.conf
    )
  • EOL sequence conversion (
    eolconversion.conf
    )
  • File type (
    filetypes.conf
    )
Each line in these files contains rule/value pairs. The
filetypes.conf
file uses the
:
character as a separator, but the files
compression.conf
and
eolconversion.conf
use whitespaces as the rule/value separator.
To comment a line, start the line with a
#
character.

Rule types

There are four types of patterns you can use with value matching pattern files.
For more information on which rule types take precedence when you use multiple, refer to pattern hierarchy.

Extension rules

Extension rules define the exact extension of the files to match. These apply to the characters after the last
.
character in the file name. This means that values such as
.in.html
or
.en.rex
don’t match any files.

compression.conf example

In the following example, a file such as
/theme/images/background.png
doesn’t use compression, but a file such as
/src/client/main.cpp
uses gzip compression.
.png none.c zip.cpp zip

Path rules

Path rules compare the full path of an item and if they match, apply the rule value to that item.

eolconversion.conf example

In the following example, you use automatic EOL conversion for
/src/main.c
uses, and for
/lib/core/Calculator.cs
, you convert all of its EOL sequences to
CR
+
LF
:
/src/main.c auto/lib/core/Calculator.cs CRLF

Name rules

Name rules exactly match the item name.

filetypes.conf example

In the following example, you set a file such as
/my-app/wwwroot/img/header.png
as binary, but set files such as
/README.md or /src/doc/README.md
as text:
header.png:binREADME.md:txt

Wildcard rules

You can enhance path rules with wildcard sequences:
  • *
    matches any number of consecutive characters except the directory separator
    /
    .
  • **
    matches any number of consecutive characters, including the directory separator
    /
    .
  • ?
    matches a single character, excluding the directory separator
    /
    .

compression.conf example

/**/images/**/*.* none/src/client/core/lib_01.? zip
If you apply this compression filter, files such as the following don’t use compression:
  • /wwwroot/dist/images/mandatory-intermediate-directory/img.png
  • /doc/images/builder/readme.txt
Files such as the following use gzip compression:
  • /src/client/core/lib_01.c
  • /src/client/core/lib_01.h
  • /src/client/core/lib_01.o

Pattern hierarchy

UVCS uses the patterns in a file to match the path of an item. Some pattern formats take precedence over others. The following shows the hierarchy of pattern formats:
  1. Path rules
  2. Name rules
  3. Extension rules
  4. Wildcard rules

filetypes.conf example

In the following example,
/src/main/bootstrap/compile.exe
is binary because path rules take precedence. Any other
compile.exe
file, such as
/build/release/compile.exe
because of the name rule.
compile.exe:txt/src/main/bootstrap/compile.exe:bin

eolconversion.conf example

In the following example, you convert the EOL sequences to
LF
for any file under
/src/java/<subdir>/
, such as
/src/java/<subdir>/
. But because an extension rule takes precedence over a wildcard rule, you use automatic EOL conversion for any
.java
files inside
/src/java/<subdir>/
, such as
/src/java/test/complex/ExtremelyRareScenarioTest.java
.
/src/java/**/*.* LF.java:auto

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

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

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

  • 在本页上
    • Value filter pattern files in UVCS

    • Rule types

      • Extension rules

        • compression.conf example

      • Path rules

        • eolconversion.conf example

      • Name rules

        • filetypes.conf example

      • Wildcard rules

        • compression.conf example

    • Pattern hierarchy

      • filetypes.conf example

      • eolconversion.conf example


报告此页面的问题