Skip to content

Commit

Permalink
feat: add compilation flags around all uwb files
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 committed Nov 28, 2024
1 parent c37d7da commit e98f7e7
Show file tree
Hide file tree
Showing 71 changed files with 460 additions and 97 deletions.
4 changes: 2 additions & 2 deletions src/Packages/Passport/Runtime/Resources/index.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/Packages/Passport/Runtime/Scripts/Public/Passport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ private async UniTask Initialise(
this.webBrowserClient = new UwbWebView();
await ((UwbWebView)this.webBrowserClient).Init(engineStartupTimeoutMs);
readySignalReceived = true;

#endif
}
#elif (UNITY_ANDROID && !UNITY_EDITOR_WIN) || (UNITY_IPHONE && !UNITY_EDITOR_WIN) || UNITY_STANDALONE_OSX || UNITY_WEBGL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

using System;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
Expand Down Expand Up @@ -51,4 +53,6 @@ public static unsafe void CopyTo<T>(this NativeArray<T> array, Span<T> dst)
}
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

using System;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
Expand Down Expand Up @@ -51,4 +53,6 @@ public static unsafe void CopyTo<T>(this NativeSlice<T> array, Span<T> dst)
}
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

using System;
using Unity.Collections;

Expand Down Expand Up @@ -61,3 +63,6 @@ public static NativeArray<T> ToNativeArray<T>(this ReadOnlySpan<T> source, Alloc
}
}
}


#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

using System;
using System.Diagnostics;
using Unity.Collections.LowLevel.Unsafe;
Expand All @@ -23,4 +25,6 @@ internal static void CheckCopyLengths(int srcLength, int dstLength)
throw new ArgumentException("source and destination length must be the same");
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "VoltstroStudios.NativeArraySpanExtensions",
"rootNamespace": "VoltstroStudios.NativeArraySpanExtensions",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
"name": "VoltstroStudios.NativeArraySpanExtensions",
"rootNamespace": "VoltstroStudios.NativeArraySpanExtensions",
"references": [],
"includePlatforms": [
"Editor",
"WindowsStandalone64"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -40,3 +42,6 @@
[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Prj")]
[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Editor")]
[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Tests")]


#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -60,4 +62,6 @@ public abstract class CommunicationLayer : ScriptableObject
public abstract void GetIpcSettings(out object outLocation, out object inLocation,
[CanBeNull] out string layerName);
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -47,4 +49,6 @@ public override void GetIpcSettings(out object outLocation, out object inLocatio
layerName = "TCP";
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -145,4 +147,6 @@ public void ExecuteJs(string js)

#endregion
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -81,4 +83,6 @@ public struct EnginePlatformFiles
[Obsolete]
public abstract string EngineFilesNotFoundError { get; }
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -46,4 +48,6 @@ public override string GetEngineExecutableName()

public override IEnumerable<EnginePlatformFiles> EngineFiles => engineFiles;
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2024 Voltstro-Studios
//
Expand Down Expand Up @@ -82,4 +84,6 @@ public void Dispose()
processHandle.Dispose();
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2024 Voltstro-Studios
//
Expand All @@ -18,4 +20,6 @@ internal interface IProcess : IDisposable

public int ExitCode { get; }
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2024 Voltstro-Studios
//
Expand Down Expand Up @@ -118,4 +120,6 @@ private static int RunProcessAndWaitForExit(string fileName, string arguments, T
}
}

#endif

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2024 Voltstro-Studios
//
Expand Down Expand Up @@ -55,3 +57,6 @@ public void Dispose()
}

#endif


#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2024 Voltstro-Studios
//
Expand Down Expand Up @@ -166,4 +168,6 @@ public struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
}
}

#endif

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2022 Voltstro-Studios
//
Expand Down Expand Up @@ -60,4 +62,6 @@ public void OnEngineFullscreen(bool fullscreen)
}
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN))

// UnityWebBrowser (UWB)
// Copyright (c) 2021-2024 Voltstro-Studios
//
Expand All @@ -16,4 +18,6 @@ internal InvalidArgumentsException(string message) : base(message)
{
}
}
}
}

#endif
Loading

0 comments on commit e98f7e7

Please sign in to comment.