Comments (42)
It's fixed internally on Unity's trunk and is awaiting backport to the 2021.3 branch. I requested an update earlier today on when the backport will be happening.
from unirx.
2021.3.0f1 is out - but this issue is still not fixed.
@Nezz: Any news from your source?
from unirx.
I've just checked with 2021.3.1f1, it's still not fixed!
from unirx.
The PR for the backport was submitted yesterday for 2021.3. If all goes well, it should be merged and released fairly quickly.
from unirx.
Still not fixed in 2021.2.19f1.
from unirx.
Oooh now the page says:
Fixed in: 2021.3.3f1
Fixed in: 2022.1.1f1
:)
from unirx.
A quick workaround of this issue would be put using UniRx
into namespace
.
namespace Game
{
using UniRx;
...
}
For those code without namespace
you have to remove using System
as @peterdijkstra suggested.
from unirx.
Some news:
The devs have decided to explicitly exclude System.Reactive.* assemblies from our .NET 4.8 profile. The pull request for this change is now awaiting approval.
In the meantime, it appears you can work around the problem by additionally targeting a runtime platform for the affected assembly definitions (e.g. Editor AND Stadia, if you're not deploying on the Stadia platform, this should have no effect on the project).
from unirx.
I opened a ticket with Unity about this.
from unirx.
2021.3.2, it's still not fixed!
from unirx.
I've tried on Unity 2021.2.13f1.
API Compatibillity Level: .NET Standard 2.1 is worked.
API Compatibillity Level: .NET Framework, conflicts.
Indeed, it implicitly refers to System.Reactive.*.dll
.
I think it's a bug in Unity, so until there's an official announcement (references added, etc.), I'll wait and see.
from unirx.
A quick workaround of this issue would be put
using UniRx
intonamespace
.namespace Game { using UniRx; ... }For those code without
namespace
you have to removeusing System
as @peterdijkstra suggested.
This works.
If you happen to be using using System;
as well, put it outside of the namespace, then you can use it as normal:
using System;
namespace SomeNamaspace {
using UniRx;
...
}
from unirx.
This issue was mentioned in Unity 2022.2a release notes.
from unirx.
@kLy: The issue mentions, that it will be fixed in 2021.3:
Fixed in 2022.2.X
Fix In Review for 2021.3.X, 2022.1.X
from unirx.
It's an enterprise support ticket, no point in linking it :)
from unirx.
This is the latest I got:
The devs have informed me that this looks like unintended behaviour but they will need to investigate the problem further.
from unirx.
Still broken in 2021.2.15f1, keep staying in 2021.2.11f1
from unirx.
I've just checked out 2021.2.17f1. This issue is still in this version.
from unirx.
It's still the same in 2021.2.18f1.
from unirx.
Woohoo! 2021.3.3 just released! https://unity3d.com/unity/whats-new/2021.3.3
And it includes the fix:
- Scripting: Removed outdated System.Reactive extensions from .Net 4.8 profile. (1407597)
Tested on my project. Working! :D
from unirx.
I have removed all using System;
lines in files where this broke, and just changed IDisposable
to System.IDisposable
etc. That also works, but might be a hassle if you use UniRx a ton
For what it's worth, this wasn't a problem with 2021.2.8
from unirx.
A really preliminary test on 2022.1.1f seems to show that it's fixed. I'm just going to assume that it now works and close this issue
from unirx.
I'm running into this exact issue as well. Tried upgrading to 2021.2, but I don't think that's compatible with UniRx for this reason.
from unirx.
Interestingly, this problem cannot be reproduced in 2021.2.11, but I figured a workaround needs to be found going forward. As far as I can tell, just deleting all the System.Reactive
dll's in C:\Program Files\Unity\Hub\Editor\2021.2.12f1\Editor\Data\UnityReferenceAssemblies\unity-4.8-api
makes it work with no apparent side effects. Unfortunately, the project now cannot be opened without fiddling with editor files. I've been trying to figure out a way to exclude these DLLs via configuration in the project, but have been unsuccessful.
from unirx.
I opened a ticket with Unity about this.
Are you able to link the ticket here, please?
from unirx.
I have removed all
using System;
lines in files where this broke, and just changedIDisposable
toSystem.IDisposable
etc. That also works, but might be a hassle if you use UniRx a tonFor what it's worth, this wasn't a problem with 2021.2.8
Yeah, that would be +200 files in our project. I'm not confident this issue will really be fixed. Is this repository completely abandoned?
from unirx.
It's not an issue in UniRx, it's an issue with Unity. Unity 2021.2.12 started referencing System.Reactive.Core for Editor assemblies, most likely as a side-effect of this fix:
Editor: Fixed an issue where there was no automatic filter out and ignore assemblies that were automatic included as a part of the system library references. (1363463)
Because this assembly is not referenced by player assemblies, we can't just put #if UNITY_2021_2_OR_NEWER
around the duplicate UniRx implementation. There are two possible solutions:
- Reference System.Reactive.Core in both player and editor assemblies and add
#if UNITY_2021_2_OR_NEWER
to UniRx. - Restore the Unity 2021.2.11 behaviour and not reference System.Reactive.Core in any of the assemblies
Note that if you are targeting the full .NET with your app, System.Reactive.Core might get referenced by player assemblies too and the first approach might work for you already. However, for those like us who target .NET Standard this is not a solution.
from unirx.
A workaround for this can be
using UniRxExt = UniRx.ObservableExtensions;
and then use that as a prefix for and UniRx related calls like
UniRxExt.Subscribe(...);
from unirx.
System.Reactive.Core is not automatically available to player assemblies at build time, so we can't just use System.Reactive in our code without pulling it in separately
from unirx.
I also have this issue, just tested and still happening in Unity 2021.2.13f1 (as in 2021.2.12f1).
I will stay on 2021.2.11f1 until some fix in available either on Unity side or this repository side.
from unirx.
A workaround for this can be
rename SystemsRx.MicroRx.Extensions.IObservableExtensions.Subscribe()
from unirx.
I have similar problem, and I went hard way of renaming the UniRx extension method's names. Which kinda works on Windows platform, but when I try to build for the other platforms such as PS4 or Switch etc, it complains that it is missing the System.Reactive.Core (or not allowed)...
I am using Unity 2021.2.12f1 and full .net targeting.
Any idea? I mean, for windows build, I can see System.Reactive.Core.dll being included in the build...?
ArgumentException: The Assembly System.Reactive.Core is referenced by Assembly-CSharp ('Library/PlayerScriptAssemblies/Assembly-CSharp.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary
2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at :0)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
from unirx.
This is the latest I got:
The devs have informed me that this looks like unintended behaviour but they will need to investigate the problem further.
"The devs" => Do you mean from Unity? Any links to the forum thread?
from unirx.
Yes, from Unity. This is from enterprise support (not public).
from unirx.
And broken in 2021.2.16f1.
from unirx.
Really, 2021.3.1f1 it´s still the problem.
But I think that it can solved by UniRx, not Unity.
I solved it in 2 steps:
- Change all the Subscribe methods in UniRx.ObservableExtensions to RxSubscribe
- Using the Replace Tool in VS, replace in current project all ".Subscribe(" to ".RxSubscribe("
And done, all conflicting references gone away, program working like a charm.
Just a tip. UniRx uses IObservable, IObserver, Tuple and other C# native System library related names. Put a Rx prefix in names you know that are from those libraries, or other you want. That´s a good practice inherited from C (that don´t have namespaces) to avoid conflicts and big names.
from unirx.
There is no need for these methods in UniRx if System.Reactive is referenced, since it replicates the same extension methods. The issue is that System.Reactive is referenced only sometimes (Editor assemblies).
from unirx.
Hey so it isn't in 2021.3.1? :( Is the backport still happening?
Nezz, there is still no response from Unity? Any link for us to track this backport? Or is this just a PM exchange you're having with Unity?
from unirx.
Great!
Is 2021.3.3f released yet? Then I'll jump over
from unirx.
2021.3.3 is not out yet, but hopefully it'll be out soon - it was scheduled for this week.
from unirx.
Yesterday I installed 2021.3.3 via UnityHub on one computer, but today I am on another computer and cannot find this version.
from unirx.
my unity editor version is 2022.1.0b16,when i switch to il2cpp + .net standard2.1(pc platform), this compilation error disappears
from unirx.
Related Issues (20)
- Awaiting to a filtered ReactiveProperty HOT 1
- What is the difference between Timer and Delay?
- ObserveOnMainThread does not propagate events from background threads to main thread
- TimeScale doesnt effect to Observable.Timer(Scheduler.MainThread)
- Bug: `InvalidOperation` does not use correct error message HOT 1
- Make repeat on error, but when other Observable method succeed
- How to convert this to a WhenAll pattern? HOT 2
- `CancellableDisposable` does not call `_cts.Dispose()` HOT 1
- Switchmap equivalent? HOT 3
- 1
- Why does ReactiveProperty call GC.SuppressFinalize(this) if it has no finalizer?
- In Unity 2021 when i upgrade UniRX to latest vesion getting issue related to observable HOT 1
- Observable from UnityWebRequest calls OnComplete although status is still InProgress HOT 1
- Is the order of Subject to events in the same frame guaranteed?
- Incorect summary of method OnBeforeRent in ObjectPool
- `Object.FindObjectsOfType` is obsolete
- The CancellationTokenSource created within CancellationDisposable is not being disposed
- ReadOnlyReactiveProperty does not call OnCompleted in some cases
- Wrong OnCompleted timing of ZipObservable
- When Reload Domain option is disabled, Observable.EveryUpdate is called multiple times in one frame
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unirx.