文档

​
​

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
    • Organizations
    • Repositories
    • Workflows and partial replicas
    • Security
    • Dynamic workspaces (Windows)
    • File explorer
    • Code reviews
    • Branches
    • Merge conflicts
    • Mergebots
    • Xlinks
    • Smart Locks
    • Symlink Support
    • Triggers
      • Types of trigger
      • List of available triggers
      • Detailed trigger reference
      • Input communication
      • Output communication
      • Common environment variables
      • server.conf variables
      • Client side variables
      • Filters
      • Web triggers
  • Tutorials
  • On-Prem
  • Gluon
  • CLI and shortcut references
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

Client side variables

Understand client variables used in Unity Version Control triggers.
阅读时间2 分钟
最后更新于 10 个月前

You can use relative or user-defined paths to customize client-side triggers. You can build the script execution paths in the following ways:
  • Use customized trigger variables defined in the
    client.conf
    file.
  • Use predefined variables.
These approaches allow you to define client-side triggers across platforms.

client.conf
variables

You can define custom variables in the
client.conf
file in your home directory. To use the custom variable when you create a client-side trigger, you need to add a new section with the
TriggerVariables
in the
client.conf
file. The example below defines a variable called
TRIGGERS_PATH
with the
c:\triggers
value:
<?xml version="1.0"?><ClientConfigData> <Language>en</Language> <WorkingMode>UPWorkingMode</WorkingMode> <TriggerVariables> <TriggerVariable name="TRIGGERS_PATH" value="c:\triggers" /> </TriggerVariables></ClientConfigData>
You can use this variable to assign a path when you create a client-side trigger. You can give the path a name that you can use later with your triggers. Refer to the following example:
cm trigger create before-clientcheckin "client code checker" "@TRIGGERS_PATH\addformat.bat"

UVCS predefined variables

There are several predefined values that you can use to compose the script field value when you create a client-side trigger:

Variable

Description

PLASTIC_BIN_PATH
This variable matches the UVCS client installation directory.
WKSPACE_PATH
This variable is the current workspace path when you create the client trigger.
GLOBAL_CONFIG_PATH
This variable points to the global configuration directory of the server you use.

Example trigger

Create a trigger that executes a script in the global configuration directory of the server you're using:
cm trigger create after-update "Delete files after update" "@GLOBAL_CONFIG_PATH/allrepos/triggers/deletefiles.bat"
注意
You can use either the
\
or the
/
separator with these variables in Windows and Linux. For example, if you enter
"@PLASTIC_BIN_PATH/triggers/checkdirectories.pl"
in a Windows platform, the client-side trigger can identify the separator and interpret it as:
"@PLASTIC_BIN_PATH\triggers\checkdirectories.pl"
.
Use @ to refer to these variables.

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

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

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

  • 在本页上
    • client.conf variables

    • UVCS predefined variables

      • Example trigger


报告此页面的问题