[Edit] Work around found
Thanks Sean Kumar for pointing this one out!
If you encounter the Spinny wheel of death, simply right-click on any script and choose reimport. This will force Unity to recompile the script, breaking it out of the infinite spin, and you have escaped the grip of that damned wheel.
This blog is a guest entry from Andy. I’m the lead programmer on our project Carried Away, but I have also been referred to as the lead protagonist in the battle to fix Collab.
Against the grain of things, I’m not here to talk about all the stuff we have been working on this week, but instead, to use this as a platform to have a good old-fashioned British moan about the state of Unity’s Collab feature.
I’ll share the 2 most common issues that we constantly encounter when using Unity’s collab tool; as well as our solutions that we use to overcome them. Now, don’t get us wrong, collab is a great tool that enables us to work remotely in the same project without too many issues. It really is great for those of us too scared to venture into the land of Git/Svn, but there’s no real value in us talking about that. I’m going to focus on the feedback that we have shared with Unity in the hope that it will help other developers who are encountering the same problems.
F*** collab issue #1: Renaming files
TLDR; Don’t rename files
When we rename a file as part of a push, we normally encounter problems when this update is later pulled by the team. The renamed file gets correctly updated with its new name, but it does not get the new contents.
The most common occurrence of this problem is when we are renaming some of the poorly named classes in our project. In particular, we had a moment where scripts stopped being named XXController, and started being named XXManager. Renaming all the old scripts to match the new naming system I would go into the script and, using Visual Studio’s global renaming tool, rename the class and all references to it. I would then rename the file in the Unity’s Project view.
Signing off at the end of the day with a message of “Peace out guys, I’ve made that sexy as hell push we’ve been talking about all day, I’m outta here!”, usually starts a torrent of messages consisting of ‘don’t leave!’, and reports of a bad push containing the error “The type or namespace name ‘blah’ could not be found...”.
Investigating further quickly reveals that while the file has the correct new file name, and all references to the class inside the file are correct, the class in the file has the old name! And this means that any other changes made in that file haven’t been pushed either.
There’s a super easy fix to get around this if you are encountering the same problem:
The original pusher makes a small, insignificant change to the affected file(s) (like adding/removing whitespace) and then do another push. This forces collab to see the change and then everyone is happy again.
“Stop renaming files!” - Will, every time I rename a file
F*** collab issue #2: Spinny wheel of death
This one really grinds my gears. Our small studio has opted for 2 unity pro licenses for the people that will really use Unity a lot. However, it is exactly these same people (the two computers with plus licenses - me and Will) that encounter this problem.
Any interaction with the collab system - pushing, pulling, even just clicking on the drop down collab menu - will intermittently cause the project not to enter play mode, and to be stuck in script recompiling mode indefinitely until we restart Unity. Very annoying, especially when experienced in combination with the renaming file bug.
No fix for this one as of yet. So there it is rant over. But one more time because it feels good;
F*** YOU COLLAB!
Anyone else having these issues or know how to avoid spinny wheel of death when so much as glancing at the collab button?
(ﾉ´･ω･)ﾉ ﾐ ┸━┸