Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UniTask fails to compile when Physics or Physics2D module is disabled #222

Closed
Razenpok opened this issue Jan 28, 2021 · 10 comments
Closed

Comments

@Razenpok
Copy link

As per title, you can disable built-in Unity modules which causes errors during compilation.

image

RamType0 added a commit to RamType0/UniTask that referenced this issue Feb 5, 2021
@RamType0
Copy link
Contributor

RamType0 commented Feb 5, 2021

I made PR which will fix this, but this issue also present for many other packages(Include unity official packages).
So you will continue to have headache for this issue even if it merged.

@neuecc
Copy link
Member

neuecc commented Feb 5, 2021

I disagree with adding it to dependencies.

@Razenpok
Copy link
Author

Razenpok commented Feb 5, 2021

@Razenpok
Copy link
Author

Razenpok commented Feb 5, 2021

Smth like this
image

@RamType0
Copy link
Contributor

RamType0 commented Feb 6, 2021

I agree with @neuecc

Probably conditional defines would be better
https://docs.unity3d.com/2020.1/Documentation/Manual/ScriptCompilationAssemblyDefinitionFiles.html#define-symbols

Note that conditional defines doesn't work in Unity 2018.4.
image

So it will be breaking changes for Unity2018.4 users.

Package dependencies are supported in Unity 2018.4, so I used it, which makes no breaking changes for Unity 2018.4 users.

Also, I previously tried to solve this kind of issue with conditional defines in #126, but it was not merged.

I have not heard clear answer yet(I just heard that not desirable or disagree).

@Razenpok
Copy link
Author

Razenpok commented Feb 6, 2021

This feature can be applied starting from Unity 2019.1

#if !UNITY_2019_1_OR_NEWER || UNITASK_PHYSICS_2D

This shouldn't be a big deal since Unity 2018.4 will be out of support very soon

https://unity3d.com/unity/qa/lts-releases

Unity 2018.4 is now the legacy LTS; it will be updated monthly until it reaches the end of its support cycle in spring 2021.

@RamType0
Copy link
Contributor

RamType0 commented Feb 7, 2021

This shouldn't be a big deal since Unity 2018.4 will be out of support very soon

https://unity3d.com/unity/qa/lts-releases

Unity 2018.4 is now the legacy LTS; it will be updated monthly until it reaches the end of its support cycle in spring 2021.

Personally, I agree with it.(So I made #126)

I am ready to make PR with conditional define , but I'm really not sure about what @neuecc disagree and what will he agree.

@neuecc
Copy link
Member

neuecc commented Feb 8, 2021

@Razenpok
Already UniTask defines com.unity.modules.assetbundle -> UNITASK_ASSETBUNDLE_SUPPORT so I'll define same way for physics.
I've released 2.1.2, it defined for Physics, Physics2D, ParticleSystem, uGUI, WebRequest.

@neuecc
Copy link
Member

neuecc commented Feb 8, 2021

@RamType0
#126 is completely different.
It separates dependency, to asmdef.
If you think they are the same thing, then you have a mind problem.
Unfortunately, I'm going to block you from this repository for a while.

@neuecc neuecc closed this as completed Feb 8, 2021
@Razenpok
Copy link
Author

Razenpok commented Feb 8, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants