Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Using Animation Rigging: Damped Transform - Readme.cs(4,14): error CS0101 / (11,3): error CS0579

Discussion in 'Animation Rigging' started by ucrs_dp, Nov 9, 2020.

  1. ucrs_dp

    ucrs_dp

    Joined:
    Nov 28, 2017
    Posts:
    2
    So I downloaded the tutorial to try out some stuff but I keep getting errors in both the 2019 and 2020 versions. Anyone know why? - thanks

    Assets\_Project\TutorialInfo\Scripts\Readme.cs(4,14): error CS0101: The namespace '<global namespace>' already contains a definition for 'Readme'

    Assets\_Project\TutorialInfo\Scripts\Readme.cs(11,3): error CS0579: Duplicate 'Serializable' attribute
     
  2. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Seems like your Readme.css class already exists within your project. Not sure how this is related to the Animation Rigging package but I would put Readme.css in a namespace of its own to avoid name clashes.
     
    ucrs_dp likes this.
  3. ucrs_dp

    ucrs_dp

    Joined:
    Nov 28, 2017
    Posts:
    2
    The problem is that it seems like several resources get info from the Readme.cs. I am not sure if your solution will fix this - not even sure how to do as you state :) I'll have to look it up. Thanks for the reply!
     
  4. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    More info on namespaces:
    https://www.tutorialspoint.com/csharp/csharp_namespaces.htm

    The Readme.css class is in your TutorialInfo folder, so I would make sure every scripts contained in that folder has its own namespace to avoid conflicts.

    Also, not sure about this error:
    Assets\_Project\TutorialInfo\Scripts\Readme.cs(11,3): error CS0579: Duplicate 'Serializable' attribute

    Do you have the [Serializable] attribute twice on top of your Readme.cs class?
     
  5. tgk262

    tgk262

    Joined:
    Mar 22, 2019
    Posts:
    1
    I'm sorry for conjuring this post, but deleting the Unity folder in that project will help you out. danUnity is right. There are 2 Readme.cs files in the project, so we'll need to delete one. I'm assuming you're trying out the big worm project. If you were, the Unity folder doesn't look like it has anything dependent on it, so deleting it works fine for me, tho it does drop warnings, but so far things look fine.