Page 1 of 1

Problems with Unity 2018.3.0b1

Posted: Wed Sep 12, 2018 3:35 am
by Haapavuo
Hi,

Dialogue System seems to be not working with the latest Unity beta:

Error 1:
Assets\Plugins\Pixel Crushers\Common\Scripts\Misc\RuntimeTypeUtility.cs(46,130): error CS0234: The type or namespace name 'ModuleBuilder' does not exist in the namespace 'System.Reflection.Emit' (are you missing an assembly reference?)

Error 2:
Assets\Plugins\Pixel Crushers\Common\Scripts\Misc\RuntimeTypeUtility.cs(47,42): error CS1579: foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator'

It seems like Error 2 happens because of Error 1. Unity has removed ModuleBuilder from System.Reflection.Emit?

Re: Problems with Unity 2018.3.0b1

Posted: Wed Sep 12, 2018 3:54 am
by Haapavuo
Fixing other build errors made these errors go away. Seems to have something to do with the Mono build system perhaps...

Re: Problems with Unity 2018.3.0b1

Posted: Wed Sep 12, 2018 4:22 am
by Tony Li
I did a basic "does it compile / does demo run?" check when 2018.3.0b1 was first available. As the beta approaches release, I'll put the latest Dialogue System through the full test suite. Thanks for the heads up on this. I'll pay extra attention to RuntimeTypeUtility.

Re: Problems with Unity 2018.3.0b1

Posted: Thu Jan 03, 2019 6:20 am
by NeatWolf
I'm having the same issue on Unity 2018.3.0f2... but little control on fixing the errors remotely on a Mac way far from here :)

Has this been fixed in the meantime? Scrolling through the changelog right now :)

Re: Problems with Unity 2018.3.0b1

Posted: Thu Jan 03, 2019 10:41 am
by Tony Li
Hi Alex,

Yes, it's been addressed. RuntimeTypeUtility.cs has a compiler define that checks for NET_STANDARD_2_0:

Code: Select all

#if NET_STANDARD_2_0
    var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(p => !(p.IsDynamic)); // Exclude dynamic assemblies.
#else
    var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(p => !(p.ManifestModule is System.Reflection.Emit.ModuleBuilder)); // Exclude dynamic assemblies.
#endif
Make sure you're using .NET Standard 2.0.