Browse Source

Various fixes, updates, minor details. Downgraded the project back to 2019.4 too.

master
Nico de Poel 4 years ago
parent
commit
29b359d2be
  1. 4
      Assets/Plugins/EpicOnlineServices/Source/Core/BoxedData.cs
  2. 3
      Assets/Scripts/EOSNativeHelper.cpp
  3. 22
      Assets/Scripts/EOSVoiceChat.cs
  4. 2
      Assets/Scripts/Editor/BuildScript.cs
  5. 8
      Assets/Scripts/EpicVoiceChatTest.cs
  6. 13
      Packages/manifest.json
  7. 56
      Packages/packages-lock.json
  8. 2
      ProjectSettings/PS5Settings.json
  9. 106
      ProjectSettings/ProjectSettings.asset
  10. 4
      ProjectSettings/ProjectVersion.txt

4
Assets/Plugins/EpicOnlineServices/Source/Core/BoxedData.cs

@ -9,6 +9,10 @@ namespace Epic.OnlineServices
{
public object Data { get; private set; }
public BoxedData()
{
}
public BoxedData(object data)
{
Data = data;

3
Assets/Scripts/EOSNativeHelper.cpp

@ -26,7 +26,7 @@ static void *ReallocateMemory(void *ptr, size_t size, size_t alignment)
return nullptr;
}
// EOS will sometimes request a reallocation for a null pointer, so we need to specifically handle that
// Ensure we replicate the realloc behavior that EOS expects
if (ptr == nullptr)
{
return _aligned_malloc(size, alignment);
@ -44,6 +44,7 @@ typedef void* (*AllocateMemoryFunc)(size_t, size_t);
typedef void* (*ReallocateMemoryFunc)(void*, size_t, size_t);
typedef void (*ReleaseMemoryFunc)(void*);
// For more information, see: https://ps4.siedev.net/forums/thread/507337/
DLL_EXPORT void EOS_GetMemoryFunctions(AllocateMemoryFunc *allocFunc, ReallocateMemoryFunc *reallocFunc, ReleaseMemoryFunc *releaseFunc)
{
*allocFunc = AllocateMemory;

22
Assets/Scripts/EOSVoiceChat.cs

@ -74,6 +74,9 @@ public class EOSVoiceChat: IDisposable
searchHandle.SetLobbyId(new LobbySearchSetLobbyIdOptions { LobbyId = chatLobbyName });
var localUserId = localUserProvider.Invoke();
if (localUserId == null)
return;
searchHandle.Find(new LobbySearchFindOptions { LocalUserId = localUserId }, null, findData =>
{
switch (findData.ResultCode)
@ -327,22 +330,37 @@ public class EOSVoiceChat: IDisposable
{
defaultInputDeviceId = null;
var sb = new System.Text.StringBuilder();
// Update the default input device, so we know whether we can actually talk or not
uint inputDevicesCount = audioInterface.GetAudioInputDevicesCount(new GetAudioInputDevicesCountOptions());
Debug.Log($"Found {inputDevicesCount} input device(s)");
sb.AppendLine($"Found {inputDevicesCount} audio input device(s):");
for (uint inputDeviceIndex = 0; inputDeviceIndex < inputDevicesCount; ++inputDeviceIndex)
{
var inputDeviceInfo = audioInterface.GetAudioInputDeviceByIndex(
new GetAudioInputDeviceByIndexOptions { DeviceInfoIndex = inputDeviceIndex });
Debug.Log($"Input device {inputDeviceIndex}: ID = {inputDeviceInfo.DeviceId}, Name = {inputDeviceInfo.DeviceName}, Default = {inputDeviceInfo.DefaultDevice}");
sb.AppendLine($"Input device {inputDeviceIndex}: ID = {inputDeviceInfo.DeviceId}, Name = {inputDeviceInfo.DeviceName}, Default = {inputDeviceInfo.DefaultDevice}");
if (inputDeviceInfo.DefaultDevice)
{
defaultInputDeviceId = inputDeviceInfo.DeviceId;
}
}
uint outputDevicesCount = audioInterface.GetAudioOutputDevicesCount(new GetAudioOutputDevicesCountOptions());
sb.AppendLine($"Found {outputDevicesCount} audio output device(s):");
for (uint outputDeviceIndex = 0; outputDeviceIndex < outputDevicesCount; ++outputDeviceIndex)
{
var outputDeviceInfo = audioInterface.GetAudioOutputDeviceByIndex(
new GetAudioOutputDeviceByIndexOptions { DeviceInfoIndex = outputDeviceIndex });
sb.AppendLine($"Output device {outputDeviceIndex}: ID = {outputDeviceInfo.DeviceId}, Name = {outputDeviceInfo.DeviceName}, Default = {outputDeviceInfo.DefaultDevice}");
}
Debug.Log(sb);
}
private void SubscribeToRoomNotifications()

2
Assets/Scripts/Editor/BuildScript.cs

@ -19,7 +19,7 @@ public static class BuildScript
{
DoBuild("XboxOne", BuildTarget.GameCoreXboxOne, buildOptions);
DoBuild("XboxSeries", BuildTarget.GameCoreXboxSeries, buildOptions);
DoBuild("PS4/EpicVoiceTest", BuildTarget.PS4, buildOptions);
//DoBuild("PS4/EpicVoiceTest", BuildTarget.PS4, buildOptions); // PS4 doesn't feature C++ source code plugin support, so just ignore for now
DoBuild("PS5/EpicVoiceTest", BuildTarget.PS5, buildOptions);
DoBuild("Windows/EpicVoiceTest.exe", BuildTarget.StandaloneWindows64, buildOptions);
}

8
Assets/Scripts/EpicVoiceChatTest.cs

@ -265,7 +265,7 @@ public class EpicVoiceChatTest : MonoBehaviour
var loggedInUser = PSInput.RefreshUsersDetails(0);
// Note: this requires a Presence2 service to be enabled on the game app and activated on the corresponding auth server.
// This auth server's client ID needs to be registered as an Identity Provider on the EOS portal.
// The auth server's client ID needs to be registered as an Identity Provider on the EOS portal.
var request = new Authentication.GetIdTokenRequest
{
UserId = loggedInUser.userId,
@ -323,7 +323,9 @@ public class EpicVoiceChatTest : MonoBehaviour
status.AppendLine("Xbox Live successfully authenticated");
xstsToken = tokenAndSignature.Token;
}
#else
#endif
#if UNITY_STANDALONE
private Credentials GetEpicCredentials() // This is platform-specific (actually it's not, we can skip this on consoles)
{
if (!string.IsNullOrEmpty(devAuthAddress))
@ -460,7 +462,7 @@ public class EpicVoiceChatTest : MonoBehaviour
private void LoadLibrary()
{
// EOS SDK 1.13 uses dynamic library binding in the Editor but does not provide any system functions to actually load dynamic libraries,
// EOS SDK 1.13+ uses dynamic library binding in the Editor but does not provide any system functions to actually load dynamic libraries,
// so we need to provide those ourselves.
eosLbraryHandle = EOSNativeHelper.LoadLibrary($@"Assets\Plugins\EpicOnlineServices\Bin\{Config.LibraryName}.dll");
if (eosLbraryHandle == IntPtr.Zero)

13
Packages/manifest.json

@ -1,14 +1,13 @@
{
"dependencies": {
"com.unity.collab-proxy": "1.15.4",
"com.unity.collab-proxy": "1.6.0",
"com.unity.gamecore": "file:gamecore/com.unity.gamecore-0.4.6-preview.tgz",
"com.unity.ide.rider": "3.0.7",
"com.unity.ide.visualstudio": "2.0.12",
"com.unity.ide.vscode": "1.2.4",
"com.unity.ide.rider": "1.2.1",
"com.unity.ide.vscode": "1.2.3",
"com.unity.psn.ps5": "file:psn/com.unity.psn.ps5-0.0.26-preview.tgz",
"com.unity.test-framework": "1.1.29",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.6.3",
"com.unity.test-framework": "1.1.27",
"com.unity.textmeshpro": "2.1.4",
"com.unity.timeline": "1.2.18",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

56
Packages/packages-lock.json

@ -1,13 +1,10 @@
{
"dependencies": {
"com.unity.collab-proxy": {
"version": "1.15.4",
"version": "1.6.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.services.core": "1.0.1"
},
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
@ -24,54 +21,29 @@
"dependencies": {}
},
"com.unity.ide.rider": {
"version": "3.0.7",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.ext.nunit": "1.0.6"
},
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.12",
"version": "1.2.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.9"
"com.unity.test-framework": "1.1.1"
},
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.4",
"version": "1.2.3",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.psn.ps5": {
"version": "file:psn/com.unity.psn.ps5-0.0.26-preview.tgz",
"depth": 0,
"source": "local-tarball",
"dependencies": {}
},
"com.unity.services.core": {
"version": "1.0.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.unitywebrequest": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.29",
"version": "1.1.27",
"depth": 0,
"source": "registry",
"dependencies": {
@ -82,7 +54,7 @@
"url": "https://packages.unity.com"
},
"com.unity.textmeshpro": {
"version": "3.0.6",
"version": "2.1.4",
"depth": 0,
"source": "registry",
"dependencies": {
@ -91,7 +63,7 @@
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.6.3",
"version": "1.2.18",
"depth": 0,
"source": "registry",
"dependencies": {
@ -244,18 +216,6 @@
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.uielementsnative": "1.0.0"
}
},
"com.unity.modules.uielementsnative": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
}

2
ProjectSettings/PS5Settings.json

@ -38,7 +38,7 @@
],
"sharedBinaryContentLabels": [],
"sharedBinarySystemFolders": [],
"workspaceName": "workspace0",
"workspaceName": "workspace2",
"buildCompressionType": 0,
"buildCompressionLevel": 0,
"keepPackageFiles": false,

106
ProjectSettings/ProjectSettings.asset

@ -3,7 +3,7 @@
--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 23
serializedVersion: 20
productGUID: ef4c4aa5fa6edb0459d6d44932600349
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0
@ -49,8 +49,6 @@ PlayerSettings:
m_StereoRenderingPath: 0
m_ActiveColorSpace: 0
m_MTRendering: 1
mipStripping: 0
numberOfMipsStripped: 0
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
@ -125,9 +123,7 @@ PlayerSettings:
stadiaTargetFramerate: 0
vulkanNumSwapchainBuffers: 3
vulkanEnableSetSRGBWrite: 0
vulkanEnablePreTransform: 0
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
m_SupportedAspectRatios:
4:3: 1
5:4: 1
@ -142,6 +138,31 @@ PlayerSettings:
xboxOneDisableKinectGpuReservation: 1
xboxOneEnable7thCore: 1
vrSettings:
cardboard:
depthFormat: 0
enableTransitionView: 0
daydream:
depthFormat: 0
useSustainedPerformanceMode: 0
enableVideoLayer: 0
useProtectedVideoMemory: 0
minimumSupportedHeadTracking: 0
maximumSupportedHeadTracking: 1
hololens:
depthFormat: 1
depthBufferSharingEnabled: 1
lumin:
depthFormat: 0
frameTiming: 2
enableGLCache: 0
glCacheMaxBlobSize: 524288
glCacheMaxFileSize: 8388608
oculus:
sharedDepthBuffer: 1
dashSupport: 1
lowOverheadMode: 0
protectedContext: 0
v2Signing: 1
enable360StereoCapture: 0
isWsaHolographicRemotingEnabled: 0
enableFrameTimingStats: 0
@ -157,7 +178,6 @@ PlayerSettings:
Standalone: 0
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
@ -211,11 +231,10 @@ PlayerSettings:
iOSLaunchScreeniPadFillPct: 100
iOSLaunchScreeniPadSize: 100
iOSLaunchScreeniPadCustomXibPath:
iOSUseLaunchScreenStoryboard: 0
iOSLaunchScreenCustomStoryboardPath:
iOSLaunchScreeniPadCustomStoryboardPath:
iOSDeviceRequirements: []
iOSURLSchemes: []
macOSURLSchemes: []
iOSBackgroundModes: 0
iOSMetalForceHardShadows: 0
metalEditorSupport: 1
@ -231,17 +250,9 @@ PlayerSettings:
iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0
shaderPrecisionModel: 0
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
templatePackageId: com.unity.template.3d@4.2.8
templateDefaultScene: Assets/Scenes/SampleScene.unity
useCustomMainManifest: 0
useCustomLauncherManifest: 0
useCustomMainGradleTemplate: 0
useCustomLauncherGradleManifest: 0
useCustomBaseGradleTemplate: 0
useCustomGradlePropertiesTemplate: 0
useCustomProguardFile: 0
AndroidTargetArchitectures: 1
AndroidTargetDevices: 0
AndroidSplashScreenScale: 0
@ -261,9 +272,6 @@ PlayerSettings:
banner: {fileID: 0}
androidGamepadSupportLevel: 0
chromeosInputEmulation: 1
AndroidMinifyWithR8: 0
AndroidMinifyRelease: 0
AndroidMinifyDebug: 0
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
m_BuildTargetIcons: []
@ -345,8 +353,6 @@ PlayerSettings:
tvOS: 1
m_BuildTargetGroupLightmapEncodingQuality: []
m_BuildTargetGroupLightmapSettings: []
m_BuildTargetNormalMapEncoding: []
m_BuildTargetDefaultTextureCompressionFormat: []
playModeTestRunnerEnabled: 0
runPlayModeTestAsEditModeTest: 0
actionOnDotNetUnhandledException: 1
@ -356,16 +362,12 @@ PlayerSettings:
cameraUsageDescription:
locationUsageDescription:
microphoneUsageDescription:
bluetoothUsageDescription:
switchNMETAOverride:
switchNetLibKey:
switchSocketMemoryPoolSize: 6144
switchSocketAllocatorPoolSize: 128
switchSocketConcurrencyLimit: 14
switchScreenResolutionBehavior: 2
switchUseCPUProfiler: 0
switchUseGOLDLinker: 0
switchLTOSetting: 0
switchApplicationID: 0x01004b9000490000
switchNSODependencies:
switchTitleNames_0:
@ -494,11 +496,8 @@ PlayerSettings:
switchSocketInitializeEnabled: 1
switchNetworkInterfaceManagerInitializeEnabled: 1
switchPlayerConnectionEnabled: 1
switchUseNewStyleFilepaths: 0
switchUseMicroSleepForYield: 1
switchEnableRamDiskSupport: 0
switchMicroSleepForYieldTime: 25
switchRamDiskSpaceSize: 12
ps4NPAgeRating: 12
ps4NPTitleSecret:
ps4NPTrophyPackPath:
@ -569,6 +568,7 @@ PlayerSettings:
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4CompatibilityPS5: 0
ps4AllowPS5Detection: 0
ps4GPU800MHz: 1
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules:
@ -585,6 +585,38 @@ PlayerSettings:
- libSceNpToolkit2.prx
- libSceS3DConversion.prx
ps4attribVROutputEnabled: 0
ps5ParamFilePath:
ps5VideoOutPixelFormat: 0
ps5VideoOutInitialWidth: 1920
ps5VideoOutOutputMode: 1
ps5BackgroundImagePath:
ps5StartupImagePath:
ps5Pic2Path:
ps5StartupImagesFolder:
ps5IconImagesFolder:
ps5SaveDataImagePath:
ps5SdkOverride:
ps5BGMPath:
ps5ShareOverlayImagePath:
ps5NPConfigZipPath:
ps5Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
ps5UseResolutionFallback: 0
ps5UseAudio3dBackend: 0
ps5ScriptOptimizationLevel: 2
ps5Audio3dVirtualSpeakerCount: 14
ps5UpdateReferencePackage:
ps5disableAutoHideSplash: 0
ps5OperatingSystemCanDisableSplashScreen: 0
ps5IncludedModules:
- libc.prx
- libSceFace.prx
- libSceFaceTracker.prx
- libSceJobManager.prx
- libSceJobManager_nosubmission.prx
- libSceNpCppWebApi.prx
- libScePfs.prx
ps5SharedBinaryContentLabels: []
ps5SharedBinarySystemFolders: []
monoEnv:
splashScreenBackgroundSourceLandscape: {fileID: 0}
splashScreenBackgroundSourcePortrait: {fileID: 0}
@ -601,12 +633,10 @@ PlayerSettings:
webGLAnalyzeBuildSize: 0
webGLUseEmbeddedResources: 0
webGLCompressionFormat: 1
webGLWasmArithmeticExceptions: 0
webGLLinkerTarget: 1
webGLThreadsSupport: 0
webGLDecompressionFallback: 0
webGLWasmStreaming: 0
scriptingDefineSymbols: {}
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend: {}
il2cppCompilerConfiguration: {}
@ -614,8 +644,6 @@ PlayerSettings:
incrementalIl2cppBuild: {}
suppressCommonWarnings: 1
allowUnsafeCode: 0
useDeterministicCompilation: 1
enableRoslynAnalyzers: 1
additionalIl2CppArgs:
scriptingRuntimeVersion: 1
gcIncremental: 0
@ -678,7 +706,10 @@ PlayerSettings:
XboxOneXTitleMemory: 8
XboxOneOverrideIdentityName:
XboxOneOverrideIdentityPublisher:
vrEditorSettings: {}
vrEditorSettings:
daydream:
daydreamIconForeground: {fileID: 0}
daydreamIconBackground: {fileID: 0}
cloudServicesEnabled:
UNet: 1
luminIcon:
@ -693,14 +724,11 @@ PlayerSettings:
m_VersionCode: 1
m_VersionName:
apiCompatibilityLevel: 6
activeInputHandler: 0
cloudProjectId:
framebufferDepthMemorylessMode: 0
qualitySettingsNames: []
projectName:
organizationId:
cloudEnabled: 0
enableNativePlatformBackendsForNewInputSystem: 0
disableOldInputManagerSupport: 0
legacyClampBlendShapeWeights: 0
playerDataPath:
forceSRGBBlit: 1
virtualTexturingSupportEnabled: 0

4
ProjectSettings/ProjectVersion.txt

@ -1,2 +1,2 @@
m_EditorVersion: 2021.2.7f1
m_EditorVersionWithRevision: 2021.2.7f1 (6bd9e232123f)
m_EditorVersion: 2019.4.34f1
m_EditorVersionWithRevision: 2019.4.34f1 (6a9faed444f2)
Loading…
Cancel
Save