0
Cannot Fix

Rad2Deg & Deg2rad not working in Standalone build.

andsville 2 months ago updated by Lazlo Bonin (Lead Developer) 2 months ago 2

Hello, not sure if this is a bug or just some weird anomaly just for me but I've had to replace all the Rad2Deg and Deg2Rad functions with an equation to get my game to work as a standalone build. It runs fine in the editor. I'm pretty sure it worked previously but it was a while ago I last tried.

 I also tested my project in the previous version of Unity (2019.1.11 i think) and Bolt (1.45) with the same error. I have not as yet tried with a new project.

Failed to define GetMember#2dc1d...:
System.MissingMemberException: No matching member found: 'Mathf.Deg2Rad'
at Ludiq.Member.Reflect () [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Member.EnsureReflected () [0x00000] in <00000000000000000000000000000000>:0
at Bolt.MemberUnit.Definition () [0x00000] in <00000000000000000000000000000000>:0
at Bolt.GetMember.Definition () [0x00000] in <00000000000000000000000000000000>:0
at Bolt.Unit.Define () [0x00000] in <00000000000000000000000000000000>:0
at Bolt.Unit.AfterAdd () [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.GraphElementCollection`1[TElement].AfterAdd (TElement element) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.GraphElementCollection`1[TElement].InsertItem (System.Int32 index, TElement element) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.VariantCollection`2[TBase,TImplementation].Add (TBase item) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.MergedKeyedCollection`2[TKey,TItem].Add (TItem item) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Graph.OnAfterDependenciesDeserialized () [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Serialization.CheckIfDependenciesMet (Ludiq.ISerializationDepender depender) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Serialization.AwaitDependencies (Ludiq.ISerializationDepender depender) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Graph.OnAfterDeserialize () [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializationCallbackReceiverProcessor.OnAfterDeserialize (System.Type storageType, System.Object instance) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.Invoke_OnAfterDeserialize (System.Collections.Generic.List`1[T] processors, System.Type storageType, System.Object instance) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsReflectedConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_2_Version (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Serialization.DeserializeJson (Ludiq.FullSerializer.fsSerializer serializer, System.String json, System.Object& instance, System.Boolean forceReflected) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x00000] in <00000000000000000000000000000000>:0
at Ludiq.LudiqScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Bolt.Unit:Define()
Bolt.Unit:AfterAdd()
Ludiq.GraphElementCollection`1:AfterAdd(TElement)
Ludiq.GraphElementCollection`1:InsertItem(Int32, TElement)
Ludiq.VariantCollection`2:Add(TBase)
Ludiq.MergedKeyedCollection`2:Add(TItem)
Ludiq.Graph:OnAfterDependenciesDeserialized()
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender)
Ludiq.Serialization:AwaitDependencies(ISerializationDepender)
Ludiq.Graph:OnAfterDeserialize()
Ludiq.FullSerializer.fsSerializationCallbackReceiverProcessor:OnAfterDeserialize(Type, Object)
Ludiq.FullSerializer.fsSerializer:Invoke_OnAfterDeserialize(List`1, Type, Object)
Ludiq.FullSerializer.fsSerializer:TryDeserialize(fsData, Type, Type, Object&)
Ludiq.FullSerializer.fsReflectedConverter:TryDeserialize(fsData, Object&, Type)
Ludiq.FullSerializer.fsSerializer:InternalDeserialize_5_Converter(Type, fsData, Type, Object&)
Ludiq.FullSerializer.fsSerializer:InternalDeserialize_4_Cycles(Type, fsData, Type, Object&)
Ludiq.FullSerializer.fsSerializer:InternalDeserialize_3_Inheritance(Type, fsData, Type, Object&, List`1&)
Ludiq.FullSerializer.fsSerializer:InternalDeserialize_2_Version(Type, fsData, Type, Object&, List`1&)
Ludiq.FullSerializer.fsSerializer:InternalDeserialize_1_CycleReference(Type, fsData, Type, Object&, List`1&)
Ludiq.FullSerializer.fsSerializer:TryDeserialize(fsData, Type, Type, Object&)
Ludiq.Serialization:DeserializeJson(fsSerializer, String, Object&, Boolean)
Ludiq.Serialization:DeserializeInto(SerializationData, Object&, Boolean)
Ludiq.LudiqScriptableObject:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()

Bolt Version:
Bolt v.1.4.6f2
Unity Version:
Windows 2019.2.2f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED

Thanks Lazio. That's grand. The custom equation will suffice. It's funny though as i could have sworn i'd had it working in in the standalone player previously. Must be confusing dreams with reality again. Thanks for the help. 

Satisfaction mark by andsville 2 months ago
Cannot Fix

Hi Andsville,

Unfortunately, this is a known issue we cannot fix out of the box.

There is a workaround provided in this thread though! It revolves around adding Mathf to a link.xml file in your project:

https://support.ludiq.io/communities/5/topics/2009-some-constants-fail-in-aot-builds

I added a Known Issue entry about this in case anyone else ever runs into it:

https://ludiq.io/bolt/known-issues#constants