mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Revert "PathToUrl"
This reverts commit 396adcdbc6b5a770ffb3a69a8a8991368e8a305a.
This commit is contained in:
parent
e12d357c1d
commit
6eed6642f4
@ -108,7 +108,7 @@ namespace NewHorizons.Utility.Files
|
|||||||
{
|
{
|
||||||
DownloadHandlerAudioClip dh = new DownloadHandlerAudioClip(path, UnityEngine.AudioType.MPEG);
|
DownloadHandlerAudioClip dh = new DownloadHandlerAudioClip(path, UnityEngine.AudioType.MPEG);
|
||||||
dh.compressed = true;
|
dh.compressed = true;
|
||||||
using (UnityWebRequest www = new UnityWebRequest(path.PathToUrl(), "GET", dh, null))
|
using (UnityWebRequest www = new UnityWebRequest(path, "GET", dh, null))
|
||||||
{
|
{
|
||||||
var result = www.SendWebRequest();
|
var result = www.SendWebRequest();
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ namespace NewHorizons.Utility.Files
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(path.PathToUrl(), audioType))
|
using (UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(path, audioType))
|
||||||
{
|
{
|
||||||
var result = www.SendWebRequest();
|
var result = www.SendWebRequest();
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,7 @@ public class SlideReelAsyncImageLoader
|
|||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
using UnityWebRequest uwr = UnityWebRequestTexture.GetTexture(url.PathToUrl());
|
using UnityWebRequest uwr = UnityWebRequestTexture.GetTexture(url);
|
||||||
|
|
||||||
yield return uwr.SendWebRequest();
|
yield return uwr.SendWebRequest();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
using HarmonyLib;
|
|
||||||
using NewHorizons.External.Configs;
|
using NewHorizons.External.Configs;
|
||||||
using NewHorizons.External.Modules.VariableSize;
|
using NewHorizons.External.Modules.VariableSize;
|
||||||
using NewHorizons.External.SerializableData;
|
using NewHorizons.External.SerializableData;
|
||||||
@ -16,7 +15,6 @@ using System.Text;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
using static NewHorizons.External.Modules.ParticleFieldModule;
|
using static NewHorizons.External.Modules.ParticleFieldModule;
|
||||||
using NomaiCoordinates = NewHorizons.External.Configs.StarSystemConfig.NomaiCoordinates;
|
using NomaiCoordinates = NewHorizons.External.Configs.StarSystemConfig.NomaiCoordinates;
|
||||||
|
|
||||||
@ -427,17 +425,5 @@ namespace NewHorizons.Utility
|
|||||||
playerCameraEffectController._owCamera.postProcessingSettings.bloom.threshold = 0f;
|
playerCameraEffectController._owCamera.postProcessingSettings.bloom.threshold = 0f;
|
||||||
playerCameraEffectController._owCamera.postProcessingSettings.eyeMaskEnabled = true;
|
playerCameraEffectController._owCamera.postProcessingSettings.eyeMaskEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// unity is STUPID and makes us use UnityWebRequest stuff.
|
|
||||||
/// so we have to do this to let it work with special characters.
|
|
||||||
/// </summary>
|
|
||||||
public static string PathToUrl(this string url) =>
|
|
||||||
$"file:///{url
|
|
||||||
.Replace('\\', '/')
|
|
||||||
.Split('/')
|
|
||||||
.Select(UnityWebRequest.EscapeURL)
|
|
||||||
.Join(delimiter: "/")
|
|
||||||
}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user