GongFaxin / protobuf_for_unity

google's protobuf 3 for unity3d(5.x) game engine
137 stars 35 forks source link

untiy 2017.2.0f3 #6

Closed Liaoer closed 7 years ago

Liaoer commented 7 years ago

Google.Protobuf/WellKnownTypes/AnyPartial.cs(87,22): error CS1644: Feature `interpolated strings' cannot be used because it is not part of the C# 4.0 language specification

Liaoer commented 7 years ago

换成 .net 4.6 又出现 Google.Protobuf/Reflection/MessageDescriptor.cs(102,24): error CS0104: ReadOnlyDictionary' is an ambiguous reference betweenGoogle.Protobuf.Collections.ReadOnlyDictionary<TKey,TValue>' and `System.Collections.ObjectModel.ReadOnlyDictionary<TKey,TValue>'

GongFaxin commented 7 years ago

原来unity2017已经可以用.net4.6了,可以试试proto官方源码https://github.com/google/protobuf/tree/master/csharp

Liaoer commented 7 years ago

你这个项目适配unity的,是从官方源码中适配成.net framework 4.x的吗?还有就是上面说的这个ReadOnlyDictionary,是指System.Collections.ObjectModel.ReadOnlyDictionary<TKey,TValue>这个函数么?

GongFaxin commented 7 years ago

官方源码需要 .net4.5 以上,Unity 5.x 并不支持,所以降级到.net3.5才有了这个项目,.net4.5以上直接用proto官方版本就好了

Liaoer commented 7 years ago

好的。谢谢,试了下,确实可以,等后续看有没有不兼容了。