- Home /
unity reading global variables as a local variables
unity is reading all of the global variables as local variables(?)(new to C#) and when my other scipts do this
public abstract float cycleDistance { get; }
with "float" being changed line to line how do i get unity to understand that there global variables? this is not one of my scripts just scripts i purchased form the assets store here is one of my errors Assets/Locomotion System/GhostOriginal.cs(4,14): error CS0101: The namespace global::' already contains a definition for
GhostOriginal'. when i search global i find nothing.
Do you accidentally have 2 of the same script in your project? Or, search for 'GhostOriginal' and see if it is defined multiple times somewhere
it appears that each function has there own script, for some reason, again not my code it was downloaded in the 3rd person shooter assets created by unity
I am having trouble understanding what you mean by
unity is reading all of the global variables as local variables
However, the error you are seeing, as I said above, usually is an indication that you have the same file imported twice, or you have multiple files where 'GhostOriginal' is defined. Did you double check that this is the case? If so, you are going to have to remove the duplicate definition or rename one of them to rectify this error
Exactly what agobrianruggieri said I think that's the case or check for updates maybe the creator did now this kind of issue and report it him.
Answer by theyseemerollinandtheyarehatingme · Jan 10, 2014 at 09:03 PM
after a day of searching (and some help from brianruggiensri) i finally found the global scripts so huge thanks to him and the person that answered before my revision
Your answer
![](https://koobas.hobune.stream/wayback/20220613130039im_/https://answers.unity.com/themes/thub/images/avi.jpg)