Jump to content

[Unity3D] Unity3D plugin questions and concerns


Recommended Posts

Sorry for the non-descriptive topic, but I had a series of questions I wanted to ask and wasn't sure if I should post them all in separate threads, or gather them all up in a single one.

 

We're currently evaluating using Plastic SCM as our new version control system for our game development projects. We're positive on the big whole, but are wondering about some details here and there, mostly in regard to the Unity plugin.

 

1. We notice that when you, in the Project view, choose to create a new item, it is automatically marked as add to source control, which is to be expected. However, say you change your mind, and choose to revert the change in the Version Control view in Unity. It's removed from source control, but the file remains in the project as a local file. I assume this is intentional?

 

2. I noticed that the icons on files in the project view doesn't seem to update completely. Sub-folders and files update seem to update after a version control operation, but top folders still have the add/check-out icon even though they're not in that state anymore. Is this a known issue, or have I just missed how to properly update the view?

 

3. One annoyance we're experiencing, mostly due to being used to Asset Server, is that you can't edit assets in the inspector without explicitly checking them out first. It's not a huge bother once we get used to it, by just e.g. checking the "Materials" folder out, doing the changes, reverting unchanged and then checking in the changes. Luckily the operations are quick. I'm just not a fan of the editor telling me what I can and can not do. Is there any setting or mode available where the files aren't locked in Unity, but changes are detected as soon as you make changes?

 

4. I had an big issue with a move operation. I added an package, which created a folder in the root of the Asset folder along with it's entire tree, and checked it into source control. Later, I wanted to move the fodler into a separate folder, where I place all my 3rd party tools. Apparently the Unity plugin for Plastic didn't like this very much. It wanted to make an add of the new folder, and remove the old one. Cheking in the add worked, but it couldn't check in the removal operation apparently. This caused issues on the other end, of course, since when someone else updated the project they got a copy of the same files in another place, and messed up the IDs. I have solved the issue without much trouble, but it's still a hassle that moving operations are so fickle. It was one of the things I wanted to avoid by not choosing e.g. p4. Is this somethnig I just have to deal with, or did I just do it wrong?

 

Side-note: I saw another thread about it but figured I might as well ask here as well. One thing I'm excited about is to building my structure using XLinks. However, only being able to target an entire changeset, and not just a selection of sub-folders, I consider a great limitation. I have a separate project with a collection of project independent tools and frameworks. Different projects needs different tools, so it'd be cool to being able to target only selected parts. For now, I've split them up into branches, but it feels hacky and I know it's gonna bite me in the ass when I start to update them. I figure I can also place them in separate repositories, but I'd prefer to being able to gather them all in one place.

 

Thanks

Johan

  • Like 1
Link to post
Share on other sites

Hi Johan!

 

 

let me try to answer your questions!

 

 

1. We notice that when you, in the Project view, choose to create a new item, it is automatically marked as add to source control, which is to be expected. However, say you change your mind, and choose to revert the change in the Version Control view in Unity. It's removed from source control, but the file remains in the project as a local file. I assume this is intentional?

 

Yep, that on purpose. When you undo an "added" item you are just saying to the VCS "hey don't add it to the repo" but the file remains on disk "just in case". Notice that if you add a file, you perform several changes and by mistake you undo it the only version you have of that file is the one you have on disk... so loosing it is not a good thing.

 

You can later of course remove it if you need it. I think it's not a common case so it doesn't hurt as far I as I see it.

 

 

2. I noticed that the icons on files in the project view doesn't seem to update completely. Sub-folders and files update seem to update after a version control operation, but top folders still have the add/check-out icon even though they're not in that state anymore. Is this a known issue, or have I just missed how to properly update the view?

 

It's a know issue we are trying to properly report it to Unity. Can you tell me your Unity version and if you have a certain structure where it happen more frequently?

 

 

3. One annoyance we're experiencing, mostly due to being used to Asset Server, is that you can't edit assets in the inspector without explicitly checking them out first. It's not a huge bother once we get used to it, by just e.g. checking the "Materials" folder out, doing the changes, reverting unchanged and then checking in the changes. Luckily the operations are quick. I'm just not a fan of the editor telling me what I can and can not do. Is there any setting or mode available where the files aren't locked in Unity, but changes are detected as soon as you make changes?

 

I'm not fully understanding this one.

When you edit something and then you save it (ctrl+s/command+s) Unity will ask plastic to checkout the file, if anyone has it locked (exclusive checkout) the operation will success.

 

Are you telling me you prefer to edit the file regardless if a coworker has it locked? Just asking to know that's the case.

 

4. I had an big issue with a move operation. I added an package, which created a folder in the root of the Asset folder along with it's entire tree, and checked it into source control. Later, I wanted to move the fodler into a separate folder, where I place all my 3rd party tools. Apparently the Unity plugin for Plastic didn't like this very much. It wanted to make an add of the new folder, and remove the old one. Cheking in the add worked, but it couldn't check in the removal operation apparently. This caused issues on the other end, of course, since when someone else updated the project they got a copy of the same files in another place, and messed up the IDs. I have solved the issue without much trouble, but it's still a hassle that moving operations are so fickle. It was one of the things I wanted to avoid by not choosing e.g. p4. Is this somethnig I just have to deal with, or did I just do it wrong?

 

We are not aware of issues with the "move" operation. It should be working fine.

Please if it happens again maybe we can get connected and review it.

 

Side-note: I saw another thread about it but figured I might as well ask here as well. One thing I'm excited about is to building my structure using XLinks. However, only being able to target an entire changeset, and not just a selection of sub-folders, I consider a great limitation. I have a separate project with a collection of project independent tools and frameworks. Different projects needs different tools, so it'd be cool to being able to target only selected parts. For now, I've split them up into branches, but it feels hacky and I know it's gonna bite me in the ass when I start to update them. I figure I can also place them in separate repositories, but I'd prefer to being able to gather them all in one place.

 

Try to choose the xlink applications carefully and use them if they really fit in your scenario, I do recommend to read this: http://codicesoftware.blogspot.com/2014/08/how-to-share-engine-repository-between.html

 

Not having sub-directories support in xlinks if a restriction, I agree, but we are working in more features for Plastic SCM that will rock.

You can always create smaller repos or subrepositories (cm mkrep default, cm mkrep default/mod1, cm mkrep default/mod1/core1...)

 

Hope it helps and feel free to ask more if you want to!

Link to post
Share on other sites

Hi manu!

 

 

It's a know issue we are trying to properly report it to Unity. Can you tell me your Unity version and if you have a certain structure where it happen more frequently?

 

 

We're using Unity 5.1.2p3.

I don't know exactly when and how it happens, but I'll try to keep an eye and update. As far as I understand, it seems to be mostly folders that suffer from this. Files seem to update fine. But if I move around folders, adding and removing them just to generate changes, they seem to never get rid of their symbols if I submit or revert.

 

 

 

I'm not fully understanding this one.

When you edit something and then you save it (ctrl+s/command+s) Unity will ask plastic to checkout the file, if anyone has it locked (exclusive checkout) the operation will success.

 

 

Sorry that is was unclear, I'll try to explain.

If I edit e.g. a scene, and save it, it gets marked as a change and all is well. But if I want to update e.g. a prefab or a material, the Inspector view, where I make all the changes, is greyed out and not editable, without checking the file out. There is a "checkout" button at the bottom of the window, I can also just check the file out manually, and I can then make changes.

 

I've attached an image to show how it looks when the file is not checked out. If I check it out, I can of course edit it normally.

 

What I'm wondering is, is there any way of making it so that the Inspector it not greyed out, but rather the file is editable always and it gets automatically checked out on save, as other types of files work.

 

 

 

Are you telling me you prefer to edit the file regardless if a coworker has it locked? Just asking to know that's the case.

 

 

No, but that is another thing I've been wondering actually. I understand the purpose of exclusive locks. But let's say someone has checked out a file and locked it, but I want to access that file to do some edits as a temporary test. I have no intention of submitting the change, I just want to test a few things. Is it possible for me to edit the file even if it's under lock?

 

 

Not having sub-directories support in xlinks if a restriction, I agree, but we are working in more features for Plastic SCM that will rock.

You can always create smaller repos or subrepositories (cm mkrep default, cm mkrep default/mod1, cm mkrep default/mod1/core1...)

 

 

I was actually not aware of subrepositories. I'm not able to find any info on it in the documentation, can you provide a link? It sounds like what I need.

If I create a repo with sub-repos, can I create a workspace for the parentrepo and it will then also include the subs?

 

If I have

 

libRepo

  - libRepo/lib1

  - libRepo/lib2

 

Are lib1 and lib2 actual repositories, contained inside of the parent repository? Can I have workspaces targeting both the subrepos (lib1, lib2), as well as workspaces targeting libRepo, which then also includes lib1 and lib2?

 

 

Another question just popped into my head: In PlasticGUI you can view pending changes as changelists, and group your changes into changelists. Is there any plan of adding similar support to the Unity plugin? Even if you don't can create new ones, just being able to view your changes by changelists and selecting to just submit a certain changelist would be super awesome.

The reason why I would want this, is that my ambition is to be able to do as much as possible of my SCM operations from inside Unity. 

 

Thanks again for taking the time to answer my questions. Please let me know if stuff is unclear and I'll try to elaborate.

 

post-30041-0-66131600-1441105211_thumb.png

Link to post
Share on other sites

Hi Johan!

 

 

We're using Unity 5.1.2p3.

I don't know exactly when and how it happens, but I'll try to keep an eye and update. As far as I understand, it seems to be mostly folders that suffer from this. Files seem to update fine. But if I move around folders, adding and removing them just to generate changes, they seem to never get rid of their symbols if I submit or revert.

 

 

Ok, let us give this information to Unity, I'll also try to reproduce the behavior so we can fix it asap.

 

 

Sorry that is was unclear, I'll try to explain.

If I edit e.g. a scene, and save it, it gets marked as a change and all is well. But if I want to update e.g. a prefab or a material, the Inspector view, where I make all the changes, is greyed out and not editable, without checking the file out. There is a "checkout" button at the bottom of the window, I can also just check the file out manually, and I can then make changes.

 

I've attached an image to show how it looks when the file is not checked out. If I check it out, I can of course edit it normally.

 

What I'm wondering is, is there any way of making it so that the Inspector it not greyed out, but rather the file is editable always and it gets automatically checked out on save, as other types of files work.

 

Aha! I understand it now.

 

Ok, there's a way. You can to open the "Editor Settings" and enable the "Work offline", that will allow you to edit a file and save it without triggering the checkout operation.

 

(Yes, I now it's not very comfortable but it's the only way Unity allows to do it)

 

 

I was actually not aware of subrepositories. I'm not able to find any info on it in the documentation, can you provide a link? It sounds like what I need.

If I create a repo with sub-repos, can I create a workspace for the parentrepo and it will then also include the subs?

 

If I have

 

libRepo

  - libRepo/lib1

  - libRepo/lib2

 

Are lib1 and lib2 actual repositories, contained inside of the parent repository? Can I have workspaces targeting both the subrepos (lib1, lib2), as well as workspaces targeting libRepo, which then also includes lib1 and lib2?

 

Nop sorry, a workspace working with libRepo won't download lib1 and lib2. They are completely independent repositories but they are store inside other repositories.

 

The only way to get your structure is using xlinks. Xlinks are great for third party libraries and they fit in a great number of scenarios but I what I want to make sure is that you completely understand how xlinks, expansion rules and target changeset update work before you start using xlinks.

 

Maybe we can schedule an online meeting so you can show me your structure and I can demo you how to use xlinks for shared libraries. Sounds good?

 

 

Another question just popped into my head: In PlasticGUI you can view pending changes as changelists, and group your changes into changelists. Is there any plan of adding similar support to the Unity plugin? Even if you don't can create new ones, just being able to view your changes by changelists and selecting to just submit a certain changelist would be super awesome.

The reason why I would want this, is that my ambition is to be able to do as much as possible of my SCM operations from inside Unity. 

 

We can send the request to Unity, we are able to do it from both the regular GUI and the CLI :)

Link to post
Share on other sites

Thanks for your answers!

 

 

 

Nop sorry, a workspace working with libRepo won't download lib1 and lib2. They are completely independent repositories but they are store inside other repositories.

 

The only way to get your structure is using xlinks. Xlinks are great for third party libraries and they fit in a great number of scenarios but I what I want to make sure is that you completely understand how xlinks, expansion rules and target changeset update work before you start using xlinks.

 

Maybe we can schedule an online meeting so you can show me your structure and I can demo you how to use xlinks for shared libraries. Sounds good?

 

 

Sounds good. I understand the purpose of Xlinks and libraries is exactly what I have in mind for them, but I want to get it right. I'll send you a mail and see if I can find some time next week.

 

 

 

We are not aware of issues with the "move" operation. It should be working fine.

Please if it happens again maybe we can get connected and review it.

 

 

I realized I failed to answer regarding the move operations. It seems as if moving files alone are no problem. When moving an entire directory tree however, it seems to not being able to competely handle the top folder correctly, maybe due to Unity's meta files?

 

When doing a move of a folder with subfolders and files, the Versioning window markes the new tree as an Add, and the old one as a remove. Submitting this change failes to properly submit the removal of the old folder, and when someone updates this changes to their workspace, they wil have a new directory tree and the old one.

 

Doing it from within PlasticGUI works better. There it is properly listed as a move operation, and submitting this change moves the folders. But when someone else updates the workspace, they get the move properly updated, but in their changelist there is listed a remove operation for the old folder.

 

Difficult to explain. But it might be easier to go over this at the same time we look into XLinks. I'll try to prepare a proper step-by-step by then as well.

 

We can send the request to Unity, we are able to do it from both the regular GUI and the CLI :)

 

My fingers are crossed :)

Link to post
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...