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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Issues when moving to .Net 4.x for Remote Configs?

Discussion in 'Unity Remote Config' started by LesBloom, Jan 13, 2022.

  1. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    Hello,

    We are currently using GA remote configs, but want to move away because of its limitations.

    The Unity solution looks very promising.

    However, our app is currently using .Net Standard 2.0 with Unity 2020.3 LTS, and Unity's remote config solution would require us to change to .Net 4.x.

    I have been trying to research what to expect with this change.

    Some threads suggest we might lose some device support, but there is no concrete info about how many or what.

    Some threads suggest there might be some math order of operation differences.

    The reports are sparse and minimal.

    I am wondering what people here have encountered. Surely, I am not the only one who made this .Net transition for the sake of Unity's remote configs.

    Thank you for your time and assistance
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @LesBloom My testing Remote Config project in Unity 2020.3 LTS is using .NET Standard 2.0 and it works just fine. Where are you seeing it requires 4.x?
     
  3. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    Hello @JeffDUnity3D

    I saw it here

    https://docs.unity3d.com/Packages/com.unity.remote-config@3.0/manual/ConfiguringYourProject.html

    Requirements
    • Unity Remote Config requires Unity Editor 2018.3 or higher for versions 2.0.x, and Unity Editor 2019.4 for versions 3.0.x.
    • Set your API Compatibility Level to .NET 4.x.
    • Enable Unity Services for your Project.
    • Install the Remote Config package (detailed below).

    If .Net 4.x isn't actually required; then great! But that's from the official docs. But, also, you work at Unity.

    <sarcasm>Who am I supposed to believe?! Lol ;)</sarcasm>

    Thank you
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Hmm, good point. Let me do some checking...
     
    LesBloom likes this.
  5. bcapdevila

    bcapdevila

    Joined:
    Oct 26, 2016
    Posts:
    18
    Hello!
    We are considering using RemoteConfig in our projects, but I see that we need to use 4.x Net.
    @JeffDUnity can you confirm this requirement?
    If it is the case, I don't think we can use it.. It is a weird choice to force its use for what it seems a simple module.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    The reason for 4.x Net is our use of async/await
     
  7. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    @JeffDUnity3D

    Can you elaborate on this some more, please?

    I have been testing a build with RemoteConfig added, but the project was not updated to 4.x Net.

    It appears to be working properly.

    Does your comment mean that we just haven't tested on enough (older?) devices?

    Thank you
     
  8. bcapdevila

    bcapdevila

    Joined:
    Oct 26, 2016
    Posts:
    18
    async/await is actually working in net 2.0 and we are using it extensively through UniTask
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you using await in your code? If not, then your point is quite valid, we are checking here. Await "can" be used, but apparently not required.
     
  10. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    @JeffDUnity3D

    My code doesn't use await at all.

    My code only uses Coroutines and callbacks.

    I was interpreting your comment as stating that the internal workings of Unity's RemoteConfig code uses await. And that therefore my entire project requires 4.x Net.

    Did I misunderstand something?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    No you haven't missed anything, please see my last post.
     
  12. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    @JeffDUnity3D

    Apologies for my confusion, but I was responding to your last post. I was responding to the following:

    Are you using await in your code? If not, then your point is quite valid, we are checking here. Await "can" be used, but apparently not required.

    I don't fully comprehend this response. Sorry.
     
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    "your point is quite valid, we are checking here" = "you may be correct, the .NET 4 requirement may not be needed. We are looking into this here, and I will reply when we have more information to share"
     
  14. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    I see. That is good to hear.

    Thank you for that clarification. I appreciate the time you have been spending to get this issue figured out.

    Cheers
     
  15. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    Hello @JeffDUnity3D

    By any chance have you heard anything about this topic?

    My latest patch is entering test, and with it my new remote config code will be going live.

    I would prefer to know if there are any unknown side effects before I release; as I am *not* planning on updating to .NET 4x.

    Thank you
     
  16. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @LesBloom it turns out that we do require .NET 4.x for our internal async calls, previous versions are not supported. If RC is working for you in your testing, you can make the decision based on this information. Keep in mind that future releases (that use .Net 4.x) may change the behavior in your case if you choose to upgrade at that time.
     
  17. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    144
    Interesting, thank you @JeffDUnity3D . I will do more research into what will happen to my supported device list if I upgrade to .NET 4x then.

    Thank you
     
  18. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    341
    I'm still confused by this requirement @JeffDUnity3D . Many games don't use .NET 4.x API. I'm not aware of any other Unity Services that require this, given that fact. Nor does this .NET 4.x API seem to be a requirement of Unity Game Services Core or Unity Authentication.

    Second, if an assembly is making a call to a .NET API that isn't supported then I would imaging it wouldn't link or at the very least there would be a runtime error. Why isn't this happening?