Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Videoman · Mar 03, 2014 at 01:10 AM · errornamespacedefinition

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; } }
     }
 }
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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?

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Videoman · Mar 03, 2014 at 05:10 AM 0
Share

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?
avatar image Kiloblargh · Mar 03, 2014 at 05:22 AM 0
Share

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.

avatar image Videoman · Mar 03, 2014 at 05:26 AM 0
Share

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.

avatar image Videoman · Mar 04, 2014 at 03:49 AM 0
Share

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

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges