- Home /
error CS0101: The namespace `RTS' already contains a definition for `ResourceManager'. What is going on?
I have already tried creating a new project without importing any Default Unity Assets, and that had no effect. Even so, this is still driving me nuts. Can anyone help?
Here is the error.
error CS0101: The namespace `RTS' already contains a definition for `ResourceManager'
Here is my code.
using UnityEngine;
using System.Collections;
namespace RTS {
public static class ResourceManager {
public static int ScrollWidth { get { return 15; } }
public static float ScrollSpeed { get { return 25; } }
public static float RotateAmount { get { return 10; } }
public static float RotateSpeed { get { return 100; } }
public static float MinCameraHeight { get { return 10; } }
public static float MaxCameraHeight { get { return 40; } }
}
}
Answer by Kiloblargh · Mar 03, 2014 at 04:54 AM
You know ResourceManager
is already the name of something, right?
If you call it CameraCustomizer
instead, does the problem go away?
It does, but now a new issue arises. I get this error.
error CS0246: The type or namespace name `Player' could not be found. Are you missing a using directive or an assembly reference?
There's no reference to a Player
in the script above, so I don't know.
But why are you dicking around with namespaces anyway? It's a better idea to just come up with slightly longer, more specific names for things that you know will be unique. PlayerStatsHolder, for example.
Sorry, forgot to mention. The player
was in a different file that might have been using the resourcemananger. It only appeared as an error after I change the resourcemananger na$$anonymous$$g.
Can you please tell me what the "Resource$$anonymous$$anager" is already be used by? I spoke with another person who has Unity Free and they said they input the same code and came up with no such error or issue that I am experiencing. To I am thinking it a Unity Pro only issue.
Can anyone inform me of what is using "Resource$$anonymous$$anager" and why Unity Free does not have this issue?
Thanks
Your answer
Follow this Question
Related Questions
The namespace already contains a definition for '' 1 Answer
Moved assets out of Resources folder: the namespace already contains a definition 0 Answers
error CSO246: The type or namespace "Nunit" could not be found. 0 Answers
namespace could not be found 0 Answers
Ml agents namespace "input" can't be found in Unity.MLAgents.Extension 0 Answers