Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Distributing Client Triggers

Discussion in 'Unity Version Control' started by KristofMorva, Jun 17, 2023.

  1. KristofMorva

    KristofMorva

    Joined:
    Mar 22, 2023
    Posts:
    4
    Hey there,

    I feel like I'm missing something, and the answer to this might be very obvious but... how do we make client scripts work for all users on a cloud repository (without running a script manually on each machine of course)?

    So i.e. the scripts would be in the repository (so that they are also version controlled), and would be called like "@WKSPACE_PATH/triggers/something.bat".

    Thank you!
     
  2. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi, You can use environment variables. Please check this link: https://docs.plasticscm.com/triggers/plastic-scm-version-control-triggers-guide:

    There are several predefined values that can be used to compose the script field value when creating a client-side trigger:
    • PLASTIC_BIN_PATH - This variable will match the Plastic client installation directory.
    • WKSPACE_PATH - This variable will be the current workspace path when creating the client trigger.
    • GLOBAL_CONFIG_PATH - This variable will point to the global configuration directory of the server you're using.
     
  3. KristofMorva

    KristofMorva

    Joined:
    Mar 22, 2023
    Posts:
    4
    Hey @carlosalba1985, thank you for the response, but my question is about how to install the triggers on all clients centrally (via the Plastic client for example) without users having to run the make-trigger commands on their machine.

    I'm aware of the option to use client-agnostic paths (like mentioned in my original post: "@WKSPACE_PATH/triggers/something.bat").
     
  4. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi,

    You don't need to ask every user to create the client-side trigger. It needs to be created only once. The client-side triggers are stored on the server side (even when the trigger code is run on the client side).

    Does it help?

    Regards,
    Carlos.
     
  5. KristofMorva

    KristofMorva

    Joined:
    Mar 22, 2023
    Posts:
    4
    Thank you @carlosalba1985, yes, that's great if that's how it works! Sorry for the stupid question then :)

    Just to verify, all client triggers work on Cloud right?
     
  6. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    836
    Hi,

    it's not a stupid question! let us know if we can still help.

    Yes, the client-side triggers can be configured with a cloud server.

    Regards,
    Carlos.
     
    KristofMorva likes this.