기술 자료

​
​

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
    • Version Control workflow
    • Version Control tools
      • Enable dynamic workspaces (Windows)
      • Create a label
      • Create an attribute
      • Create a mergebot
      • Use Smart Locks
      • Use Xlinks
      • Use Unity Samples
      • Use triggers
        • Create your first trigger
        • Trigger checkin samples
        • Verify label creation
        • Update files before checkout
        • Example triggers
        • Create a Slack web trigger
        • Create a Discord web trigger
      • Transfer project to a different organization
  • On-Prem
  • Gluon
  • CLI and shortcut references
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

Create your first trigger

Follow this workflow to create your first trigger for automation.
읽는 시간 2분
최근 업데이트: 10달 전

This page shows a workflow for how to create and edit a trigger that validates your label names through the command line:
  1. View available triggers.
  2. Create the trigger.
  3. View a list of your existing triggers.
  4. Edit the trigger.
  5. Delete the trigger.

View trigger types

To associate a user script with a client or server event, you need to create a trigger. To show a list of all supported trigger types in your command line, you can use the
showtypes
command:
cm trigger showtypes

Create a trigger

If your label names are created according to a given naming standard, you can create a trigger that validates label names. To create this trigger on Windows, you can use the following
create
command:
cm trigger create before-mklabel "check label name" "ruby c:\plastic\triggers\validate-label.rb"
This is a sample Ruby script (
validate-label.rb
) that checks that the label name starts with
release
:
if (ENV['PLASTIC_LABEL_NAME'] !~ /^release/) then exit(1) end
The script picks the name of the label from the
PLASTIC_LABEL_NAME
environment variable and checks the contents against the regular expression
^release
, which matches a string that starts with
release
. If the label name doesn't match
release
(
!~
operator), the trigger returns the exit code
1
, which means the trigger fails and doesn't allow the
mklabel
operation to finish.

List triggers

To see any triggers that you create, you can use the list command to show all the triggers of the same type you created:
>cm trigger list before-mklabel1 Validate label c:\tmp\triggers\validate-label.bat dave

Edit triggers

To modify the script that this trigger is pointing to, you can use the trigger
edit
command. You need to indicate the trigger type and the trigger position, which is the first index that the list triggers command returns (1 in this case):
cm trigger edit before-mklabel 1 --script="c:\tmp\other-script.bat"

Delete triggers

To remove a trigger, you can use the trigger
delete
. You need to indicate the trigger type and position:
cm trigger delete before-mklabel 1

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • View trigger types

    • Create a trigger

    • List triggers

    • Edit triggers

    • Delete triggers


이 페이지의 문제 보고