Open chrisfromwork opened 4 years ago
@dfields-msft
@majaeger can we use the .meta file to disable this script for non-Windows configurations?
@dfields-msft , I don't believe we can do this in the .meta files for the editor host platform. I believe we'll need to update the code files as @chrisfromwork stated to use the UNITY_EDITOR_WIN define instead of the broader UNITY_EDITOR
The call here fails for me in a Mac Unity Editor (2019.2.*): https://github.com/microsoft/vcrt-forwarders/blob/d82a8fd2ba9c1311258939e731e848d1684a1a80/Unity/Editor/InitVCRTForwarders.cs#L27
It seems that these initializer c# scripts should only run in
UNITY_EDITOR_WIN
environments. Wrapping the InitVCRTForwarders.cs file content inUNITY_EDITOR_WIN
ifdefs unblocked iOS builds for me. Note: this affects all other projects that follow this model of calling LoadLibraryExW in the Unity editor, such as Microsoft.MixedReality.QRWhen this error occurs, it may not necessarily result in a formal Unity build failure. In my case, it does prevent other prebuild/postbuild scripts from running. This causes things like Azure Spatial Anchors that copies Podfiles into generate iOS project folders to fail, causing the iOS build to fail in xcode.