Jump to content

Update Xlink from Unity editor


MerijnAtWonderment

Recommended Posts

Me and my team are working on a framework that we need to maintain independent of the projects that implement it. The most obvious choice to use here was XLink but i'm having some issues setting it up.

So to start with we create a new project and link it to the framework with a partial (non writable) XLink in the cli like this: 

cm xlink Assets/_Framework /Assets/_Framework lb:Release@repo@our_cloud_location@cloud

This works usually. Now we check in the new xlink and update the workspace to load in the assets and scripts from the framework.

Now when the framework gets updated with a check in, i can switch to the newest changeset by editing the xlink and checking it in but as soon as i try to update the workspace it doesn't import any of the changes made.

Now what does work is the following in the terminal: cm xlink -e Assets/_Framework {changeset_number}@_Framework@our_cloud_location@cloud

Is there a way to automate this last step from inside of the editor? I've been trying to add menu in Unity to run a bash script which executes the command but i always get a "/bin/bash: cm: command not found" exception. When i try to run the cmdrunner inside of unity i always get the following exception: Native error= Cannot find the specified file.

How come i can run these commands in my terminal and in shell but not in the Editor with a process/shellrequest? I'm very much out of my depth here so any pointers would be appreciated :)

Link to comment
Share on other sites

  • 3 weeks later...
Quote

Is there a way to automate this last step from inside of the editor? I've been trying to add menu in Unity to run a bash script which executes the command but i always get a "/bin/bash: cm: command not found" exception. When i try to run the cmdrunner inside of unity i always get the following exception: Native error= Cannot find the specified file.

Do you mean somehow to keep the Xlink target updated when you perform changes directly in the Xlink? I'm afraid you will need to manually edit the Xlink to load the new changesets.

If you were using a writable Xlink, when you perform changes in the Xlinked repo via the parent repo, the Xlink target is automatically updated.

Quote

How come i can run these commands in my terminal and in shell but not in the Editor with a process/shellrequest? I'm very much out of my depth here so any pointers would be appreciated :)

"cm" is the CLI Plastic client and it's distributed with every Plastic client installation. If "cm" is saved in the system PATH, you should be able to directly run it on a terminal. otherwise, you can also use the full "cm" path to run the commands.

In Linux:

/opt/plasticscm5/client/cm 

In Windows:

C:\Program Files\PlasticSCM\client\cm

Regards,

Carlos.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...