Unity .NET 4.6 experimental setting is not supported

Hi Everyone,

Just to make sure you don't turn on .NET 4.6 and stick to the stable .NET 3.5

We are getting more and more issues report that actually link back to the use of this experimental .NET 4.6 and at the present time we can't support such projects until Unity turn this feature as stable.

If you encounter issues, if you can't reproduce them using .NET 3.5, get in touch with Unity support directly so that they can improve and get closer to a support version.

Bye,

Jean

Comments

  • Yes,

    I am running a bunch of new tests on the latest 2018 beta to see if the issues got resolved ( we raised concerned back in 2017.2 but never got a reply), so hopefully it will be ok.

    Meanwhile, you are encouraged to try it out and report any issues to us and Unity should you find bugs when using 4.6 that do no occur when using 3.5, it's going to be hard because once you switch to 4.6 and use some of the new api, it will be impossible to check back...

    Bye,

    Jean
  • xblade724
    xblade724
    edited June 2018
    Heya, any ETA on 4.6 support? Does Unity still call it experimental? We'd like to upgrade to the latest Unity in a few months -- just wanted to make sure we'd get to utilize one of their biggest features~
  • Hi,

    well, on paper Unity is out of experimental mode for 2018 and .net46 support, however, it seems that it's still not as stable as it should, I'll refer to a post yesterday from Robocraft developer that is using Photon, and he seems to wonder about .net46 reliability, which is not a good sign:

    so, I would not recommend at this point to switch to .net46 in production as you could end up being blocked and not able to revert, as going for .net46 makes it impossible to switch back without rewriting it all back...

    you can still upgrade to 2018 latest, but just don't switch to .net46 just yet, or at least fully aware of the possible deadend for short/middle terms.

    If you find during testing some misbehavior, please report back to us, we are actively seeking feedback on how pun performs within .net46 environment on the developers end.

    Bye,

    Jean
  • Hi,

    Just a note on this, that internally, tests with the latest version of Unity shows no sign of issues when using the stable .Net46 runtime.

    So if you encounter issues, make sure you get back us and explain your issue so we can create cases and validate them or else, fix them if we can on our side, or ultimately check with Unity what can be done.

    Bye,

    Jean
  • Hello,

    I have dowloaded the last unity version (2018.3.x.x) and switched to NET .4.X and an error happen on my serialization.

    Error :

    FormatException: Input string was not in a correct format.
    System.Number.ParseSingle (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) (at :0)
    System.Single.Parse (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at :0)
    System.Single.Parse (System.String s) (at :0)
    First_PersonNetwork.OnPhotonSerializeView (PhotonStream stream, PhotonMessageInfo info) (at Assets/Scripts/Others/First_PersonNetwork.cs:363)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0)
    PhotonView.ExecuteComponentOnSerialize (UnityEngine.Component component, PhotonStream stream, PhotonMessageInfo info) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:553)
    PhotonView.DeserializeComponent (UnityEngine.Component component, PhotonStream stream, PhotonMessageInfo info) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:378)
    PhotonView.DeserializeView (PhotonStream stream, PhotonMessageInfo info) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:363)
    NetworkingPeer.OnSerializeRead (System.Object[] data, PhotonPlayer sender, System.Int32 networkTime, System.Int16 correctPrefix) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:4361)
    NetworkingPeer.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2612)
    ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuff) (at :0)
    ExitGames.Client.Photon.TPeer.DispatchIncomingCommands () (at :0)
    ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at :0)
    PhotonHandler.Update () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:153)


    Everything is fine by using NET .3.5.
    I use Photon 1.

    On my OnPhotonSerializeView i do :

    encodedText = (Val1 + "/" + Val2 + "/" + Val3);

    stream.SendNext(MyTransform.position);

    stream.SendNext(encodedText);


    And when i receive it , i do :


    correctPlayerPos = (Vector3)stream.ReceiveNext();

    outString = stream.ReceiveNext().ToString();

    ReceivedString = outString.Split("/" [0]);


    If you have an idea.

    Thank you.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    Hi @rokawar,

    Thank you for choosing Photon!

    Could you try reproducing using PUN2 in the meantime and wait for the next PUN1 update and retry?
  • JohnTube said:

    Hi @rokawar,

    Thank you for choosing Photon!

    Could you try reproducing using PUN2 in the meantime and wait for the next PUN1 update and retry?

    Thank you for your answer.

    I will try and i will come back to you if the problem is still present.

    Have a good day.
  • Truefx001
    Truefx001
    edited April 2019
    Hi when I change the Api Compatibility Level to .Net 4.x I get 2 errors with Photon Classic ( I cannot use version 2 right now) will there be a fix for it? Runtime switch to Net 4.x seems not to trigger any errors. Using Unity 2018.3.0f2
  • Hi,

    What are the errors you get? can you paste them here? thanks.

    Bye,

    Jean
  • Hi so I get 1 error 2 times when switching from Api Compatibility Level .Net 2.0 to .Net 4.x (Unity 2018.3.0f2) the error is Assets\PhotonChatApi\ChatPeer.cs(98,78): error CS0246: The type or namespace name 'SocketTcpAsync' could not be found (are you missing a using directive or an assembly reference?)
  • That sounds as if you updated PUN and the included Chat API without updating to the latest Photon3Unity3d.dll.
    Are you using the latest PUN Classic v1.95? You may want to reimport the package. The class that's apparently missing in your case, should be in the dll.
  • Should this still be pinned?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited June 2019
    I guess not.
    We will unpin it.
    Thanks.