- Created static Wanted posters for all crooks, including Carmen Sandiego.
- Tweaked font SDF maps to be much smaller in size while still looking good. - Loot image downloading is now handled globally by CaseManager. - LocationBoard and MissingPoster now get their loot image from CaseManager. - Recompressed a lot of textures to try to save space. - Enabled streaming mipmaps on all textures, and texture streaming globally. - Updated occlusion culling data for the first time in a while.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,9 @@ using UdonSharp;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using VRC.SDK3.Data;
|
||||
using VRC.SDK3.Image;
|
||||
using VRC.SDK3.StringLoading;
|
||||
using VRC.SDK3.UdonNetworkCalling;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
@@ -31,22 +33,21 @@ public class CaseManager : UdonSharpBehaviour
|
||||
[Header("Global Case Assets")]
|
||||
[SerializeField] private Texture[] CrookPortraits;
|
||||
|
||||
[Space, Header("Managers")]
|
||||
[Space, Header("Management Classes")]
|
||||
[SerializeField] private PermissionsPanel _PermissionsPanel;
|
||||
[SerializeField] private GameManagerRound1 _Round1Manager;
|
||||
[SerializeField] private GameManagerRound2 _Round2Manager;
|
||||
[SerializeField] private GameManagerRound3 _Round3Manager;
|
||||
[Space]
|
||||
[SerializeField] private MultiRoundVideoPlayer _MultiRoundVideoPlayer;
|
||||
[Space, Header("Updateable Objects")]
|
||||
[SerializeField] private LiveIndicator _LiveIndicator;
|
||||
[SerializeField] private HostCardManager _HostCard;
|
||||
[Space]
|
||||
[SerializeField] private CaseManagerListView _CaseManagerList;
|
||||
[SerializeField] private Button _HostTeleportButton;
|
||||
[Space]
|
||||
[SerializeField] private MultiRoundVideoPlayer _MultiRoundVideoPlayer;
|
||||
[SerializeField] private WantedPoster[] _WantedPosters;
|
||||
[SerializeField] private MissingPoster[] _MissingPosters;
|
||||
[Space]
|
||||
[SerializeField] private LiveIndicator _LiveIndicator;
|
||||
[SerializeField] private LocationBoard _LocationBoard;
|
||||
[Space, Header("Host UI")]
|
||||
[SerializeField] private CaseManagerListView _CaseManagerList;
|
||||
[SerializeField] private Button _HostTeleportButton;
|
||||
|
||||
[UdonSynced] private VRCUrl _CaseFileCluesURL;
|
||||
[UdonSynced] private VRCUrl _CaseFileLootImage;
|
||||
@@ -68,6 +69,20 @@ public class CaseManager : UdonSharpBehaviour
|
||||
|
||||
private DataDictionary _CaseFileDictionary;
|
||||
|
||||
private VRCImageDownloader _LootImageDownloader;
|
||||
private Texture2D _LootImageTexture = null;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_LootImageDownloader = new VRCImageDownloader();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
_LootImageDownloader.Dispose();
|
||||
}
|
||||
|
||||
|
||||
public override void OnPlayerJoined(VRCPlayerApi Player)
|
||||
{
|
||||
@@ -216,16 +231,69 @@ public class CaseManager : UdonSharpBehaviour
|
||||
Debug.LogError("[CaseManager] Malformed case file. " + ErrorString);
|
||||
}
|
||||
|
||||
_InitialiseUpdateables();
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
private void _InitialiseUpdateables()
|
||||
{
|
||||
foreach (WantedPoster Poster in _WantedPosters)
|
||||
{
|
||||
Poster.SetNewCrook(_AccusedCrook, GetCrookName());
|
||||
}
|
||||
foreach (MissingPoster Poster in _MissingPosters)
|
||||
|
||||
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(DownloadLootImage), _CaseFileLootImage);
|
||||
}
|
||||
|
||||
[NetworkCallable]
|
||||
public void DownloadLootImage(VRCUrl LootURL)
|
||||
{
|
||||
TextureInfo AdditionalTextureInfo = new TextureInfo();
|
||||
AdditionalTextureInfo.WrapModeU = TextureWrapMode.Clamp;
|
||||
AdditionalTextureInfo.WrapModeV = TextureWrapMode.Clamp;
|
||||
AdditionalTextureInfo.GenerateMipMaps = true;
|
||||
_LootImageDownloader.DownloadImage(LootURL, null,
|
||||
(IUdonEventReceiver)this, AdditionalTextureInfo);
|
||||
}
|
||||
public override void OnImageLoadSuccess(IVRCImageDownload Result)
|
||||
{
|
||||
_LootImageTexture = Result.Result;
|
||||
if (_LootImageTexture != null)
|
||||
{
|
||||
Poster.SetNewLoot(_CaseFileLootImage, _StolenLoot);
|
||||
foreach (MissingPoster Poster in _MissingPosters)
|
||||
{
|
||||
Poster.ApplyLootImage(_LootImageTexture);
|
||||
Poster.SetNewLootName(_StolenLoot);
|
||||
}
|
||||
_LocationBoard.SetLootImage(_LootImageTexture);
|
||||
}
|
||||
|
||||
RequestSerialization();
|
||||
base.OnImageLoadSuccess(Result);
|
||||
}
|
||||
public override void OnImageLoadError(IVRCImageDownload Result)
|
||||
{
|
||||
string DownloadError = "[CaseManager] Could not retrieve loot image: " + Result.ErrorMessage;
|
||||
|
||||
//switch (Result.Error)
|
||||
//{
|
||||
// case VRCImageDownloadError.Unknown:
|
||||
// break;
|
||||
// case VRCImageDownloadError.InvalidURL:
|
||||
// break;
|
||||
// case VRCImageDownloadError.AccessDenied:
|
||||
// break;
|
||||
// case VRCImageDownloadError.DownloadError:
|
||||
// break;
|
||||
// case VRCImageDownloadError.InvalidImage:
|
||||
// break;
|
||||
// case VRCImageDownloadError.TooManyRequests:
|
||||
// break;
|
||||
//}
|
||||
|
||||
Debug.LogError(DownloadError);
|
||||
|
||||
base.OnImageLoadError(Result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ public class GameManagerRound2 : GameManagerBase
|
||||
_StageIndex = 0;
|
||||
|
||||
InitialiseLocationBoard();
|
||||
_LocationBoard.SetLootImageURL(_CaseManager.GetLootImage());
|
||||
|
||||
_JailChain.Initialise();
|
||||
_JailPhone.Initialise();
|
||||
|
||||
Reference in New Issue
Block a user