Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.31k stars 347 forks source link

UWP Build Error #303

Open OzoneABN opened 5 years ago

OzoneABN commented 5 years ago

Thanks!, it solved it completely!:) Unity 2018 | UWP (Hololens) | .NET 4.x | DOTween v1.2.235

The demon appeared for me with the face of: " The name 'AppDomain' does not exist in the current context... "

Hello, Using DOTween 1.2.235 will cause the " The name 'AppDomain' does not exist in the current context... " build error inside Unity (2018.3.12f1). Trying to exclude the corresponding lines in DOTweenModuleUtilities.cs (line 56+) from build using

[UnityEngine.Scripting.Preserve]
    // Just used to preserve methods when building, never called
    static void Preserver()
    {
#if !WINDOWS_UWP
        Assembly[] loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
        MethodInfo mi = typeof(MonoBehaviour).GetMethod("Stub");
#endif
    }

will fix the build-problem inside Unity, but when trying to build it forHoloLens with VS the same error occurs again (but somewere else).

Downgrading to DOTween 1.1.710 solved this error for me. Will there be an fix in a newer version of DOTween anytime soon? Regards

Originally posted by @OzoneABN in https://github.com/Demigiant/dotween/issues/257#issuecomment-481245700

Demigiant commented 5 years ago

Ahoy,

I did actually solve this bug by implementing the Preserve attribute for those lines, which are indeed fundamental, and after that users could build on HoloLens without problems. It's very weird that it resurfaced for you. Can you un-comment those and tell me more about your build settings?

Morgan-6Freedom commented 5 years ago

Same issue when Trying to build with Unity 2018.3.13f1 + Dotween 1.2.245 + Holotoolkit

Assets\Plugins\DOTween\Modules\DOTweenModuleUtils.cs(60,43): error CS0103: The name 'AppDomain' does not exist in the current context

image

Morgan-6Freedom commented 5 years ago

The build show no error with Dotween 1.1.710

StarBax89 commented 5 years ago

Same error with DoTween 1.2.250 in Unity 2018.4.0f1

Demigiant commented 5 years ago

Hi, on what Unity version and configuration are you? Can you check this link to see if it helps, since it appears that your configuration doesn't support Reflection?

StarBax89 commented 5 years ago

Hi, here is my config. Unity 2018.4.0.f1 Unbenannt Unbenannt2