浏览代码

fix

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
aa0c836c
共有 2 个文件被更改,包括 2 次插入11 次删除
  1. 2
      com.unity.uiwidgets/Runtime/painting/image_provider.cs
  2. 11
      com.unity.uiwidgets/Runtime/ui2/text.cs

2
com.unity.uiwidgets/Runtime/painting/image_provider.cs


Future<Codec> _loadAsync(FileImage key, DecoderCallback decode) {
#if UNITY_ANDROID && !UNITY_EDITOR
var path = Path.Combine(Application.streamingAssetsPath, key.file);
Debug.Log("path: "+path);
Debug.Log("load complete: "+unpackerWWW.bytes.Length);
byte[] bytes = unpackerWWW.bytes;
#else
byte[] bytes = File.ReadAllBytes(Path.Combine(Application.streamingAssetsPath, key.file));

11
com.unity.uiwidgets/Runtime/ui2/text.cs


internal static unsafe void setFloat(this byte[] bytes, int byteOffset, float value) {
D.assert(byteOffset >= 0 && byteOffset + 4 < bytes.Length);
var intVal = *(int*) &value;
#if UNITY_ANDROID && !UNITY_EDITOR
byte[] vOut = BitConverter.GetBytes(value);
b[0] = vOut[0];
b[1] = vOut[1];
b[2] = vOut[2];
b[3] = vOut[3];
#else
*(float*) b = value;
#endif
*(int*) b = intVal;
}
}

正在加载...
取消
保存