浏览代码

Merge pull request #200 from Unity-Technologies/zgh/fix_win_il2cpp_build_2

fix: windows il2cpp build lead to empty scene
/main
GitHub 3 年前
当前提交
25113d72
共有 10 个文件被更改,包括 18 次插入6 次删除
  1. 1
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanelWrapper.cs
  2. 11
      com.unity.uiwidgets/Runtime/ui/painting.cs
  3. 2
      com.unity.uiwidgets/Runtime/ui/text.cs
  4. 7
      com.unity.uiwidgets/Runtime/ui/window.cs
  5. 2
      engine/src/lib/ui/painting/picture.cc
  6. 1
      engine/src/lib/ui/window/window.cc

1
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanelWrapper.cs


int width, int height, float dpi, string streamingAssetsPath, string font_settings);
[DllImport(NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool UIWidgetsPanel_releaseNativeTexture(IntPtr ptr);
[DllImport(NativeBindings.dllName)]

11
com.unity.uiwidgets/Runtime/ui/painting.cs


static extern void Path_reset(IntPtr ptr);
[DllImport(NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool Path_contains(IntPtr ptr, float x, float y);
[DllImport(NativeBindings.dllName)]

static extern unsafe void Path_getBounds(IntPtr ptr, float* rect);
[DllImport(NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool Path_op(IntPtr ptr, IntPtr path1, IntPtr path2, int operation);
}

[DllImport(NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool PathMeasure_nativeNextContour();
}

public static extern void Vertices_dispose(IntPtr ptr);
[DllImport(NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern unsafe bool Vertices_init(IntPtr ptr,
int mode,
float* positions,

}
}
public int approximateBytesUsed => Picture_GetAllocationSize(_ptr);
public ulong approximateBytesUsed => Picture_GetAllocationSize(_ptr);
static extern int Picture_GetAllocationSize(IntPtr ptr);
[return: MarshalAs(UnmanagedType.SysUInt)]
static extern ulong Picture_GetAllocationSize(IntPtr ptr);
delegate void Picture_toImageCallback(IntPtr callbackHandle, IntPtr result);

static extern void PictureRecorder_dispose(IntPtr ptr);
[DllImport(NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool PictureRecorder_isRecording(IntPtr ptr);
[DllImport(NativeBindings.dllName)]

2
com.unity.uiwidgets/Runtime/ui/text.cs


}
}
[StructLayout(LayoutKind.Sequential)]
public struct Float32List {
public IntPtr data;
public int length;

static extern float Paragraph_ideographicBaseline(IntPtr ptr);
[DllImport(dllName: NativeBindings.dllName)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool Paragraph_didExceedMaxLines(IntPtr ptr);
[DllImport(dllName: NativeBindings.dllName)]

7
com.unity.uiwidgets/Runtime/ui/window.cs


return null;
}
List<string> _computePlatformResolvedLocale(List<string> supportedLocalesData) =>
// Window_computePlatformResolvedLocale not implement yet, TODO _computePlatformResolvedLocale
List<string> _computePlatformResolvedLocale(List<string> supportedLocalesData) {
return new List<string>();
}
/// A callback that is invoked whenever [locale] changes value.
///

static extern void Window_render(IntPtr ptr, IntPtr scene);
[DllImport(NativeBindings.dllName)]
static extern List<string> Window_computePlatformResolvedLocale(List<string> supportedLocalesData);
static extern void Window_computePlatformResolvedLocale(List<string> supportedLocalesData);
[MonoPInvokeCallback(typeof(Window_sendPlatformMessageCallback))]
static unsafe void _sendPlatformMessageCallback(IntPtr callbackHandle, byte* data, int dataLength) {

2
engine/src/lib/ui/painting/picture.cc


UIWIDGETS_API(void) Picture_dispose(Picture* ptr) { ptr->Release(); }
UIWIDGETS_API(bool) Picture_GetAllocationSize(Picture* ptr) {
UIWIDGETS_API(size_t) Picture_GetAllocationSize(Picture* ptr) {
return ptr->GetAllocationSize();
}

1
engine/src/lib/ui/window/window.cc


// TODO: ComputePlatformResolvedLocale
UIWIDGETS_API(void) Window_computePlatformResolvedLocale(Window* ptr, Scene* scene) {
ptr->client()->Render(scene);
}
} // namespace

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存