instant show / hide
fix discord game SDK crashes
This commit is contained in:
parent
e782706146
commit
eb5fbac8cf
Binary file not shown.
|
Before Width: | Height: | Size: 400 KiB After Width: | Height: | Size: 682 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 212 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 393 KiB |
|
|
@ -371,9 +371,9 @@ RectTransform:
|
|||
m_Father: {fileID: 574002313}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -21}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 32, y: 32}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &9435782
|
||||
|
|
@ -3519,9 +3519,9 @@ RectTransform:
|
|||
m_Father: {fileID: 539838476}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 32, y: -21}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 32, y: 32}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &121871281
|
||||
|
|
@ -3664,9 +3664,9 @@ RectTransform:
|
|||
m_Father: {fileID: 539838476}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 72, y: -21}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 32, y: 32}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &129013734
|
||||
|
|
@ -3786,9 +3786,9 @@ RectTransform:
|
|||
m_Father: {fileID: 539838476}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 112, y: -21}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 32, y: 32}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &151246938
|
||||
|
|
@ -5005,7 +5005,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -399.99994, y: 0}
|
||||
m_AnchoredPosition: {x: -400, y: 0}
|
||||
m_SizeDelta: {x: -800.0001, y: 194}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &195260752
|
||||
|
|
@ -10377,7 +10377,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 177.66988, y: -60.01}
|
||||
m_AnchoredPosition: {x: 177.66986, y: -60.01}
|
||||
m_SizeDelta: {x: 42, y: 42}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &449176922
|
||||
|
|
@ -16663,7 +16663,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 486, y: -109.99997}
|
||||
m_AnchoredPosition: {x: 486, y: -110}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &683816223
|
||||
|
|
@ -26115,7 +26115,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 153.75505}
|
||||
m_AnchoredPosition: {x: 0, y: 153.75513}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &1154875945
|
||||
|
|
@ -30195,9 +30195,9 @@ RectTransform:
|
|||
m_Father: {fileID: 574002313}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 40, y: -21}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 32, y: 32}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &1345846031
|
||||
|
|
@ -31317,7 +31317,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -399.99994, y: 0}
|
||||
m_AnchoredPosition: {x: -400, y: 0}
|
||||
m_SizeDelta: {x: -800.0001, y: 194}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &1426168094
|
||||
|
|
@ -38052,9 +38052,9 @@ RectTransform:
|
|||
m_Father: {fileID: 574002313}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 80, y: -21}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 32, y: 32}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &1783491359
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
|
||||
public static class AppInfo {
|
||||
public const string Version = "0.0.1012";
|
||||
public static readonly DateTime Date = new DateTime(2023, 10, 19, 03, 18, 26, 972, DateTimeKind.Utc);
|
||||
public const string Version = "0.0.1016";
|
||||
public static readonly DateTime Date = new DateTime(2023, 10, 20, 02, 31, 04, 288, DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace HeavenStudio.DiscordRPC
|
|||
|
||||
private long lastStartTime;
|
||||
|
||||
private bool disconnected;
|
||||
private bool quitting;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
|
@ -30,13 +30,13 @@ namespace HeavenStudio.DiscordRPC
|
|||
|
||||
// private void OnApplicationQuit()
|
||||
// {
|
||||
// Disconnect();
|
||||
// quitting = true;
|
||||
// }
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
discord = new Discord.Discord(DiscordRPC.clientID, (System.UInt64)Discord.CreateFlags.NoRequireDiscord);
|
||||
disconnected = false;
|
||||
quitting = false;
|
||||
}
|
||||
|
||||
public void Disconnect()
|
||||
|
|
@ -44,7 +44,7 @@ namespace HeavenStudio.DiscordRPC
|
|||
if (discord != null)
|
||||
{
|
||||
discord.Dispose();
|
||||
disconnected = true;
|
||||
quitting = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ namespace HeavenStudio.DiscordRPC
|
|||
|
||||
void Update()
|
||||
{
|
||||
if (discord != null && !disconnected)
|
||||
if ((!quitting) && discord != null)
|
||||
{
|
||||
discord.RunCallbacks();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,7 +229,15 @@ namespace HeavenStudio.Games.Global
|
|||
float prog = cond.GetPositionFromBeat(e.beat, e.length);
|
||||
if (prog >= 0f && prog <= 1f)
|
||||
{
|
||||
float inp = cond.GetPositionFromBeat(e.beat, 1);
|
||||
float inp;
|
||||
if (e["instantOn"])
|
||||
{
|
||||
inp = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
inp = cond.GetPositionFromBeat(e.beat, 1);
|
||||
}
|
||||
IdolSongLabel.text = e["text1"];
|
||||
IdolArtistLabel.text = e["text2"];
|
||||
|
||||
|
|
@ -242,7 +250,7 @@ namespace HeavenStudio.Games.Global
|
|||
}
|
||||
else if (idolShown)
|
||||
{
|
||||
if (prog < 1f)
|
||||
if (prog < 1f || e["instantOff"])
|
||||
{
|
||||
IdolAnimator.Play("NoPose", -1, 0);
|
||||
IdolAnimator.speed = 1;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ namespace HeavenStudio
|
|||
|
||||
public static string buildTime = "00/00/0000 00:00:00";
|
||||
|
||||
public static bool HasShutDown = false;
|
||||
public static bool discordDuringTesting = false;
|
||||
|
||||
static string loadedScene;
|
||||
|
|
@ -77,6 +78,7 @@ namespace HeavenStudio
|
|||
public static void Init()
|
||||
{
|
||||
Application.wantsToQuit += WantsToQuit;
|
||||
Application.quitting += OnQuitting;
|
||||
|
||||
BasicCheck();
|
||||
|
||||
|
|
@ -380,14 +382,19 @@ namespace HeavenStudio
|
|||
}
|
||||
}
|
||||
|
||||
void OnApplicationQuit()
|
||||
private static void OnQuitting()
|
||||
{
|
||||
Debug.Log("Disconnecting JoyShocks...");
|
||||
PlayerInput.CleanUp();
|
||||
Debug.Log("Clearing RIQ Cache...");
|
||||
Jukebox.RiqFileHandler.ClearCache();
|
||||
Debug.Log("Closing Discord GameSDK...");
|
||||
DiscordRPC.DiscordController.instance?.Disconnect();
|
||||
if (!HasShutDown)
|
||||
{
|
||||
Debug.Log("Disconnecting JoyShocks...");
|
||||
PlayerInput.CleanUp();
|
||||
Debug.Log("Clearing RIQ Cache...");
|
||||
Jukebox.RiqFileHandler.ClearCache();
|
||||
Debug.Log("Closing Discord GameSDK...");
|
||||
DiscordRPC.DiscordController.instance?.Disconnect();
|
||||
|
||||
HasShutDown = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool WantsToQuit()
|
||||
|
|
|
|||
|
|
@ -872,6 +872,8 @@ namespace HeavenStudio
|
|||
{
|
||||
new Param("text1", "", "Title", "Text to display in the upper label (Rich Text is supported!)"),
|
||||
new Param("text2", "", "Artist", "Text to display in the lower label (Rich Text is supported!)"),
|
||||
new Param("instantOn", false, "Instant Show", "Skip the show animation?"),
|
||||
new Param("instantOff", false, "Instant Hide", "Skip the hide animation?"),
|
||||
}
|
||||
),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ PlayerSettings:
|
|||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 0.0.1012
|
||||
bundleVersion: 0.0.1016
|
||||
preloadedAssets:
|
||||
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
|
||||
metroInputSource: 0
|
||||
|
|
@ -158,11 +158,11 @@ PlayerSettings:
|
|||
applicationIdentifier:
|
||||
Standalone: com.RHeavenStudio.Heaven-Studio
|
||||
buildNumber:
|
||||
Standalone: 1012
|
||||
Standalone: 1016
|
||||
iPhone: 0
|
||||
tvOS: 0
|
||||
overrideDefaultApplicationIdentifier: 0
|
||||
AndroidBundleVersionCode: 1012
|
||||
AndroidBundleVersionCode: 1016
|
||||
AndroidMinSdkVersion: 22
|
||||
AndroidTargetSdkVersion: 0
|
||||
AndroidPreferredInstallLocation: 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue