Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Flash Export Type '<PrivateImplementationDetails>' is defined in multiple scripts

Discussion in 'Flash' started by sotsotdei, Dec 22, 2011.

  1. sotsotdei

    sotsotdei

    Joined:
    Aug 21, 2010
    Posts:
    33
    Hi all,

    I got only this one line error in the console when trying to export to Flash

    Type '<PrivateImplementationDetails>' is defined in multiple scripts. Please rename one of them.

    No others errors or warning showing off.

    What does it mean ?
     
  2. sotsotdei

    sotsotdei

    Joined:
    Aug 21, 2010
    Posts:
    33
    i wish the console message was more verbose.
     
  3. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    I am seeing this too. Not too sure what causes it either.
     
  4. woko

    woko

    Joined:
    Oct 11, 2011
    Posts:
    23
    I'm getting the same error; google says it probably has something to do with Dictionaries
     
  5. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Last edited: Dec 23, 2011
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Got passed this one removed iTween and got a host of new errors!
     
  7. vamsikg

    vamsikg

    Joined:
    Mar 23, 2011
    Posts:
    5
    I also got the same error even after removing iTween. I am also trying to port my game in Unity Flash Build. Please reply if any one knows the solution.
     
  8. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Do you use a big switch case statemenent in the game that checks against strings, objects or some other none complex none integer type?

    If so try just removing that chunk of code from the build to test that it's the culprit e.g.

    Code (csharp):
    1. #if !UNITY_FLASH
    2. <switch case with complex comparison type>
    3. #endif
    This is a good way of quickly isolating problem code you can always add dummy values in there in an #else clause.
     
  9. Wozik

    Wozik

    Joined:
    Apr 10, 2009
    Posts:
    662
    I guess you have some scripts with a same name in different places. Renaming them should fix this issue.

    Also, in C# you can have a variable with same name in different sections, in js and as you cannot. We'll fix this later, but for now please be sure to not have any variables with the same name.

    Both issues are on the todo list.
     
  10. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    We've found the problem in the converter. in the meantime, we do not have a great workaround other than Arowx's "try to find which part of the code generates that privateimplementationdetails thing and try to change it to no longer do that"
     
  11. Devin-Reimer

    Devin-Reimer

    Joined:
    Dec 14, 2009
    Posts:
    15
  12. sotsotdei

    sotsotdei

    Joined:
    Aug 21, 2010
    Posts:
    33
    @DevinReimer : i saw your post on twitter, it fixed some errors, but a bunch of others came out. I will wait the beta7 or the final release of 3.5 to see if it will fix the issues. Furthermore I am thinking if I am willing to pay an additional cost for Flash.
     
  13. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Hi,
    I'm stuck with this error generating my swf competition entry, but so far can't track down the cause.
    Do you think you will release a 3.5 b7 with this fix before the competition closing date?

    Or any tips on trying to track down the error?

    ty!
     
  14. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    This error can be caused by switch case statements, see explanation here.
    1. Do a search for switch in your code base.
    2. Try isolating it with #if UNITY_FLASH #endif tags to see if it is the problem area.
    3. Then replacing it with if else if statements.
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    any idea if we will get an extension on the contest? this is driving me crazy, i removed every single 'switch' statement and i still get the error.
    I guess b7 will fix it but unless it's released right this minute... i doubt we can make it for the contest deadline :/
     
  16. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Yes I saw that (ty!), does not seem to be the cause in this case as far as I can tell.

    It would be easier if they just released another beta with the fix!
     
  17. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    yeah it's not only the switch statements, also pre initialized arrays like int [] r = {2,3,4} will fail, plus hashtable cloning and all other kind of crazy stuff.
    I've been changing code for hours and i still keep getting it and since the error doesn't specify at least the assembly or file or something... no clue where to look at.

    i guess we are left out of the competition then, since b7 is not out yet :(
     
  18. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Thanks for the confirmation!

    Kind of strange to run a beta with a competition without releasing beta fixes, but it's their show - and I do understand things are probably a little crazy on their side atm. Still, an indication of beta releases would be nice! (hint hint;-)

    I'm not going to invest anymore time into it in that case, as I could be wasting hours chasing my tail.