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

transplant Windows Store Thread problem

Discussion in 'Windows' started by songhaineng, Mar 31, 2014.

  1. songhaineng

    songhaineng

    Joined:
    Mar 31, 2014
    Posts:
    40
    Assets\Script\Network\Receiver.cs(21,13): error CS0246: The type or namespace name 'Thread' could not be found (are you missing a using directive or an assembly reference?)

    Why can‘t found Thread? I have to use " Windows.System.Threading.ThreadPool"?

    Assets\Script\SharpZip\src\Encryption\ZipAESStream.cs(51,32): error CS0246: The type or namespace name 'CryptoStream' could not be found (are you missing a using directive or an assembly reference?)

    And this?System.Security.Cryptography also can't use...
     
  2. Lexustio

    Lexustio

    Joined:
    Jun 26, 2013
    Posts:
    18
    The threadpool problem has been reported many many times already. Use the search function.

    In a nutshell: Yes, you have to use Windows.System.Threading. You also have to wrap any code that uses Windows.* classes with #if NETFX_CORE / #endif. Refer to http://msdn.microsoft.com/en-us/library/windows/apps/hh465290.aspx.

    Also, System.Security.Cryptography is NOT supported by Windows Store Apps. You have to use Windows.Security.Cryptography instead (see above).
     
  3. songhaineng

    songhaineng

    Joined:
    Mar 31, 2014
    Posts:
    40
    The next version can solve these problems?Affect transplantation efficiency very much.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    We are already providing implementations for some missing types as part of our WinRTLegacy library.
    System.Security.Cryptography has been started, but I can't give you any ETA for when and how much will be done.
    Thread is a more complicated issue, no promisses on it being implemented at all.
     
  5. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    Any news on how to fix this ?

    I tried implementing it like below, but it doesn't work:

    Code (csharp):
    1.  
    2. using System.Threading;
    3.  
    4. #if NETFX_CORE
    5.     private Windows.System.Threading.Thread _boardRetrievalThread;
    6. #else
    7.     private Thread _boardRetrievalThread;
    8. #endif
    9.