- Home /
I refactored a type and now my project is f'd up
I had something like List but I needed it as another type so I refactored it to a GameObject and now my debug log looks like this: http://i.imgur.com/IlXdMEY.png?1?6358
This is the code when I click on the second error: http://i.imgur.com/on7iF6O.png?1
Does anyone know what the hell I did and how I can fix it?
I haven't seen that error, before, but it looks like you have more than one GameObject
class defined in your project. Did you create one manually? Do you have multiple copies of dependencies, such as DLLs?
@rutter I'm pretty sure I dont't. The problem came as soon as I refactored my list.
hmm try casting to make sure - children.Add(child.gameObject as UnityEngine.GameObject);
search project for "class GameObject" just to be sure (Search > Find In Files, search whole solution)
i've had some interesting times with Xamarin/$$anonymous$$onodev4's refactoring.
Answer by mhdema n9ne · Nov 14, 2013 at 09:00 PM
Double check your project references and double check there isn't another GameObject class defined elsewhere. This would cause an ambiguity with UnityEngine.Object and cause errors like that.
Your answer
![](https://koobas.hobune.stream/wayback/20220613121913im_/https://answers.unity.com/themes/thub/images/avi.jpg)