app.hypergames.hypersdk 1.8.13 → 1.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 86b0d0e2ee949d84e9a9ef4aacc778c8
@@ -1119,10 +1119,19 @@ namespace Hyper.Editor
1119
1119
 
1120
1120
  private static void RepaintWindow()
1121
1121
  {
1122
- var window = GetWindow<HyperBuildAssistant>(false);
1123
- if (window != null)
1122
+ if (Application.isBatchMode)
1124
1123
  {
1125
- window.Repaint();
1124
+ return;
1125
+ }
1126
+
1127
+ HyperBuildAssistant[] windows = Resources.FindObjectsOfTypeAll<HyperBuildAssistant>();
1128
+
1129
+ foreach (HyperBuildAssistant window in windows)
1130
+ {
1131
+ if (window != null)
1132
+ {
1133
+ window.Repaint();
1134
+ }
1126
1135
  }
1127
1136
  }
1128
1137
 
@@ -1518,7 +1527,7 @@ namespace Hyper.Editor
1518
1527
  // Ensure we're using the Assets path, not Packages path
1519
1528
  // Remove any existing HyperLoader scenes from build index (including Packages/ ones)
1520
1529
  var scenes = new List<EditorBuildSettingsScene>(EditorBuildSettings.scenes);
1521
- scenes.RemoveAll(s =>
1530
+ scenes.RemoveAll(s =>
1522
1531
  string.Equals(s.path, scenePath, StringComparison.OrdinalIgnoreCase) ||
1523
1532
  (s.path.Contains("HyperLoader.unity") && !s.path.StartsWith("Assets/", StringComparison.OrdinalIgnoreCase))
1524
1533
  );
@@ -1744,105 +1753,6 @@ namespace Hyper.Editor
1744
1753
  }
1745
1754
  }
1746
1755
 
1747
- private static BuildSettingsSnapshot CaptureBuildSettingsSnapshot()
1748
- {
1749
- var snapshot = new BuildSettingsSnapshot();
1750
-
1751
- try
1752
- {
1753
- var webglType = typeof(PlayerSettings.WebGL);
1754
- var codeOptProp = webglType.GetProperty("codeOptimization");
1755
- if (codeOptProp != null)
1756
- {
1757
- snapshot.codeOptimizationValue = codeOptProp.GetValue(null);
1758
- snapshot.hasCodeOptimization = true;
1759
- }
1760
-
1761
- var debugSymbolProp = webglType.GetProperty("debugSymbolMode");
1762
- if (debugSymbolProp != null)
1763
- {
1764
- snapshot.debugSymbolModeValue = debugSymbolProp.GetValue(null);
1765
- snapshot.hasDebugSymbolMode = true;
1766
- }
1767
- }
1768
- catch (Exception ex)
1769
- {
1770
- HyperDebug.LogWarning($"Could not capture code optimization/debug symbols: {ex.Message}");
1771
- }
1772
-
1773
- try
1774
- {
1775
- snapshot.exceptionSupportValue = PlayerSettings.WebGL.exceptionSupport;
1776
- snapshot.hasExceptionSupport = true;
1777
- }
1778
- catch (Exception ex)
1779
- {
1780
- HyperDebug.LogWarning($"Could not capture exception support: {ex.Message}");
1781
- }
1782
-
1783
- try
1784
- {
1785
- snapshot.il2CppCodeGenerationValue = PlayerSettings.GetIl2CppCodeGeneration(NamedBuildTarget.WebGL);
1786
- snapshot.hasIl2CppCodeGeneration = true;
1787
- }
1788
- catch (Exception ex)
1789
- {
1790
- HyperDebug.LogWarning($"Could not capture IL2CPP code generation: {ex.Message}");
1791
- }
1792
-
1793
- return snapshot;
1794
- }
1795
-
1796
- private static void RestoreBuildSettingsSnapshot(BuildSettingsSnapshot snapshot)
1797
- {
1798
- try
1799
- {
1800
- var webglType = typeof(PlayerSettings.WebGL);
1801
-
1802
- if (snapshot.hasCodeOptimization)
1803
- {
1804
- var codeOptProp = webglType.GetProperty("codeOptimization");
1805
- codeOptProp?.SetValue(null, snapshot.codeOptimizationValue);
1806
- }
1807
-
1808
- if (snapshot.hasDebugSymbolMode)
1809
- {
1810
- var debugSymbolProp = webglType.GetProperty("debugSymbolMode");
1811
- debugSymbolProp?.SetValue(null, snapshot.debugSymbolModeValue);
1812
- }
1813
- }
1814
- catch (Exception ex)
1815
- {
1816
- HyperDebug.LogWarning($"Could not restore code optimization/debug symbols: {ex.Message}");
1817
- }
1818
-
1819
- try
1820
- {
1821
- if (snapshot.hasExceptionSupport)
1822
- {
1823
- PlayerSettings.WebGL.exceptionSupport = snapshot.exceptionSupportValue;
1824
- }
1825
- }
1826
- catch (Exception ex)
1827
- {
1828
- HyperDebug.LogWarning($"Could not restore exception support: {ex.Message}");
1829
- }
1830
-
1831
- try
1832
- {
1833
- if (snapshot.hasIl2CppCodeGeneration)
1834
- {
1835
- PlayerSettings.SetIl2CppCodeGeneration(NamedBuildTarget.WebGL, snapshot.il2CppCodeGenerationValue);
1836
- }
1837
- }
1838
- catch (Exception ex)
1839
- {
1840
- HyperDebug.LogWarning($"Could not restore IL2CPP code generation: {ex.Message}");
1841
- }
1842
-
1843
- AssetDatabase.Refresh();
1844
- }
1845
-
1846
1756
  private static void BuildDevelopment()
1847
1757
  {
1848
1758
  if (EditorApplication.isCompiling)
@@ -1851,64 +1761,25 @@ namespace Hyper.Editor
1851
1761
  return;
1852
1762
  }
1853
1763
 
1854
- ClearBuildInfo();
1855
- ResetOptimizationSummary();
1856
-
1857
- string buildPath = EditorUtility.SaveFolderPanel("Choose Build Location", "", "");
1764
+ string buildPath = EditorUtility.SaveFolderPanel("Choose Development Build Location", "", "");
1858
1765
  if (string.IsNullOrEmpty(buildPath))
1859
1766
  return;
1860
1767
 
1861
- var settingsSnapshot = CaptureBuildSettingsSnapshot();
1862
-
1863
- try
1768
+ HyperBuildResult result = HyperBuildPipeline.Build(new HyperBuildRequest
1864
1769
  {
1865
- if (System.IO.Directory.Exists(buildPath))
1866
- {
1867
- try
1868
- {
1869
- System.IO.Directory.Delete(buildPath, true);
1870
- if (IsSDKDeveloper()) HyperDebug.Log($"Cleaned existing build folder: {buildPath}");
1871
- }
1872
- catch (System.Exception ex)
1873
- {
1874
- if (IsSDKDeveloper()) HyperDebug.LogWarning($"Could not clean build folder: {ex.Message}");
1875
- }
1876
- }
1877
-
1878
- ForceAssetRepack();
1770
+ Profile = HyperBuildProfile.Development,
1771
+ OutputPath = buildPath,
1772
+ CleanOutputFolder = true,
1773
+ OpenOutputFolder = true,
1774
+ IsCliBuild = false
1775
+ });
1879
1776
 
1880
- SetReleaseBuildDefineSymbol(false);
1881
- ApplyDevelopmentBuildSettings();
1882
-
1883
- BuildPlayerOptions buildOptions = new BuildPlayerOptions
1884
- {
1885
- scenes = GetEnabledScenes(),
1886
- locationPathName = buildPath,
1887
- target = BuildTarget.WebGL,
1888
- options = BuildOptions.DetailedBuildReport // NO Development flag to keep Brotli compression
1889
- };
1890
-
1891
- HyperDebug.Action($"Starting Development Build to: {buildPath}");
1892
- BuildReport report = BuildPipeline.BuildPlayer(buildOptions);
1893
-
1894
- if (report.summary.result == BuildResult.Succeeded)
1895
- {
1896
- HyperDebug.LogSuccess("Development build completed successfully");
1897
- UpdateBuildInfo(buildPath, report);
1898
- OpenBuildOutputFolder(buildPath);
1899
- }
1900
- else
1901
- {
1902
- HyperDebug.LogError($"Development build failed: {report.summary.result}");
1903
- UpdateBuildInfo(buildPath, null);
1904
- }
1905
- }
1906
- finally
1777
+ if (!result.Succeeded)
1907
1778
  {
1908
- RestoreBuildSettingsSnapshot(settingsSnapshot);
1779
+ EditorUtility.DisplayDialog("Development Build Failed", result.Message, "OK");
1909
1780
  }
1910
1781
  }
1911
-
1782
+
1912
1783
  private static void BuildRelease()
1913
1784
  {
1914
1785
  if (EditorApplication.isCompiling)
@@ -1917,71 +1788,31 @@ namespace Hyper.Editor
1917
1788
  return;
1918
1789
  }
1919
1790
 
1920
- ClearBuildInfo();
1921
- ResetOptimizationSummary();
1922
-
1923
- string buildPath = EditorUtility.SaveFolderPanel("Choose Build Location", "", "");
1791
+ string buildPath = EditorUtility.SaveFolderPanel("Choose Release Build Location", "", "");
1924
1792
  if (string.IsNullOrEmpty(buildPath))
1925
1793
  return;
1926
1794
 
1927
- var settingsSnapshot = CaptureBuildSettingsSnapshot();
1928
-
1929
- try
1795
+ HyperBuildResult result = HyperBuildPipeline.Build(new HyperBuildRequest
1930
1796
  {
1931
- if (System.IO.Directory.Exists(buildPath))
1932
- {
1933
- try
1934
- {
1935
- System.IO.Directory.Delete(buildPath, true);
1936
- if (IsSDKDeveloper()) HyperDebug.Log($"Cleaned existing build folder: {buildPath}");
1937
- }
1938
- catch (System.Exception ex)
1939
- {
1940
- if (IsSDKDeveloper()) HyperDebug.LogWarning($"Could not clean build folder: {ex.Message}");
1941
- }
1942
- }
1943
-
1944
- ForceAssetRepack();
1945
-
1946
- SetReleaseBuildDefineSymbol(true);
1947
- AddOptimizationSummary("Runtime: Unity debug logger disabled in player (HYPER_RELEASE_BUILD)");
1948
- ApplyReleaseBuildSettings();
1949
-
1950
- BuildPlayerOptions buildOptions = new BuildPlayerOptions
1951
- {
1952
- scenes = GetEnabledScenes(),
1953
- locationPathName = buildPath,
1954
- target = BuildTarget.WebGL,
1955
- options = BuildOptions.DetailedBuildReport
1956
- };
1957
-
1958
- HyperDebug.Action($"Starting Release Build (with LTO) to: {buildPath}");
1959
- BuildReport report = BuildPipeline.BuildPlayer(buildOptions);
1797
+ Profile = HyperBuildProfile.Release,
1798
+ OutputPath = buildPath,
1799
+ CleanOutputFolder = true,
1800
+ OpenOutputFolder = true,
1801
+ IsCliBuild = false
1802
+ });
1960
1803
 
1961
- if (report.summary.result == BuildResult.Succeeded)
1962
- {
1963
- HyperDebug.LogSuccess("Release build completed successfully");
1964
- UpdateBuildInfo(buildPath, report);
1965
- OpenBuildOutputFolder(buildPath);
1966
- }
1967
- else
1968
- {
1969
- HyperDebug.LogError($"Release build failed: {report.summary.result}");
1970
- UpdateBuildInfo(buildPath, null);
1971
- }
1972
- }
1973
- finally
1804
+ if (!result.Succeeded)
1974
1805
  {
1975
- RestoreBuildSettingsSnapshot(settingsSnapshot);
1806
+ EditorUtility.DisplayDialog("Release Build Failed", result.Message, "OK");
1976
1807
  }
1977
1808
  }
1978
1809
 
1979
- private static void ResetOptimizationSummary()
1810
+ internal static void ResetOptimizationSummary()
1980
1811
  {
1981
1812
  lastAppliedOptimizations.Clear();
1982
1813
  }
1983
1814
 
1984
- private static void AddOptimizationSummary(string message)
1815
+ internal static void AddOptimizationSummary(string message)
1985
1816
  {
1986
1817
  if (string.IsNullOrEmpty(message))
1987
1818
  return;
@@ -2021,7 +1852,7 @@ namespace Hyper.Editor
2021
1852
  return false;
2022
1853
  }
2023
1854
 
2024
- private static void OpenBuildOutputFolder(string buildPath)
1855
+ internal static void OpenBuildOutputFolder(string buildPath)
2025
1856
  {
2026
1857
  if (string.IsNullOrEmpty(buildPath))
2027
1858
  {
@@ -2046,304 +1877,6 @@ namespace Hyper.Editor
2046
1877
  }
2047
1878
  }
2048
1879
 
2049
- private static void ApplyDevelopmentBuildSettings()
2050
- {
2051
- // Set Code Optimization to Shorter Build Time for fast iteration
2052
- try
2053
- {
2054
- var webglType = typeof(PlayerSettings.WebGL);
2055
- var codeOptProp = webglType.GetProperty("codeOptimization");
2056
- if (codeOptProp != null)
2057
- {
2058
- var enumType = codeOptProp.PropertyType;
2059
- var shorterBuildValue = System.Enum.Parse(enumType, "ShorterBuildTime");
2060
- codeOptProp.SetValue(null, shorterBuildValue);
2061
- AddOptimizationSummary("Code Optimization → Shorter Build Time");
2062
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Development build: Code Optimization → Shorter Build Time");
2063
- }
2064
- }
2065
- catch (System.Exception ex)
2066
- {
2067
- HyperDebug.LogWarning($"Could not set Code Optimization: {ex.Message}");
2068
- }
2069
-
2070
- // Enable Debug Symbols for debugging
2071
- try
2072
- {
2073
- var webglType = typeof(PlayerSettings.WebGL);
2074
- var debugSymbolModeProp = webglType.GetProperty("debugSymbolMode");
2075
- if (debugSymbolModeProp != null)
2076
- {
2077
- // Set to Embedded (value 2) for debugging
2078
- var embeddedValue = System.Enum.ToObject(debugSymbolModeProp.PropertyType, 2);
2079
- debugSymbolModeProp.SetValue(null, embeddedValue);
2080
- AddOptimizationSummary("Debug Symbols → Embedded");
2081
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Development build: Debug Symbols → Embedded");
2082
- }
2083
- }
2084
- catch (System.Exception ex)
2085
- {
2086
- HyperDebug.LogWarning($"Could not set Debug Symbols: {ex.Message}");
2087
- }
2088
-
2089
- // Set Exception Support to Full for better debugging
2090
- try
2091
- {
2092
- PlayerSettings.WebGL.exceptionSupport = WebGLExceptionSupport.FullWithoutStacktrace;
2093
- AddOptimizationSummary("Exception Support → Full Without Stacktrace");
2094
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Development build: Exception Support → Full Without Stacktrace");
2095
- }
2096
- catch (System.Exception ex)
2097
- {
2098
- HyperDebug.LogWarning($"Could not set Exception Support: {ex.Message}");
2099
- }
2100
-
2101
- AddOptimizationSummary("Unity Development Build flag NOT used (keeps Brotli compression)");
2102
- AddOptimizationSummary("Using Hyper dev API URL");
2103
- if (IsSDKDeveloper()) HyperDebug.Log("Development build settings applied: Fast iteration with Brotli compression");
2104
- }
2105
-
2106
- private static void ApplyReleaseBuildSettings()
2107
- {
2108
- string currentCodeOpt = "";
2109
- try
2110
- {
2111
- var webglType = typeof(PlayerSettings.WebGL);
2112
- var codeOptProp = webglType.GetProperty("codeOptimization");
2113
- if (codeOptProp != null)
2114
- {
2115
- var value = codeOptProp.GetValue(null);
2116
- if (value != null)
2117
- {
2118
- currentCodeOpt = value.ToString();
2119
- }
2120
- }
2121
- }
2122
- catch (System.Exception ex)
2123
- {
2124
- HyperDebug.LogWarning($"Could not read current Code Optimization setting: {ex.Message}");
2125
- }
2126
-
2127
- // Respect developer's choice:
2128
- // - "Shorter Build Time" → leave as is (don't change, don't report)
2129
- // - Runtime-related → enforce Runtime LTO
2130
- // - Disk-related → enforce Disk Size LTO
2131
- // - Empty/Unknown → enforce Disk Size LTO (Hyper's recommendation)
2132
-
2133
- bool isShorterBuildTime = !string.IsNullOrEmpty(currentCodeOpt) &&
2134
- currentCodeOpt.Contains("ShorterBuildTime");
2135
-
2136
- if (isShorterBuildTime)
2137
- {
2138
- if (IsSDKDeveloper()) HyperDebug.Log("Release build: Respecting developer's 'Shorter Build Time' choice - no Code Optimization changes applied.");
2139
- return;
2140
- }
2141
-
2142
- bool isRuntimePreference = !string.IsNullOrEmpty(currentCodeOpt) &&
2143
- (currentCodeOpt.Contains("Runtime") || currentCodeOpt.Contains("Faster"));
2144
-
2145
- bool isDiskPreference = !string.IsNullOrEmpty(currentCodeOpt) &&
2146
- (currentCodeOpt.Contains("DiskSize") || currentCodeOpt.Contains("Disk"));
2147
-
2148
- // Default to Disk Size LTO if no preference or unknown
2149
- bool wantsDiskSize = isDiskPreference || string.IsNullOrEmpty(currentCodeOpt) ||
2150
- (!isRuntimePreference && !isDiskPreference);
2151
-
2152
- string appliedCodeOpt = "";
2153
- try
2154
- {
2155
- var webglType = typeof(PlayerSettings.WebGL);
2156
- var codeOptProp = webglType.GetProperty("codeOptimization");
2157
- if (codeOptProp != null)
2158
- {
2159
- var enumType = codeOptProp.PropertyType;
2160
- string targetValue;
2161
-
2162
- string[] enumNames = System.Enum.GetNames(enumType);
2163
- if (wantsDiskSize)
2164
- {
2165
- targetValue = Array.IndexOf(enumNames, "DiskSizeLTO") >= 0 ? "DiskSizeLTO" : "DiskSize";
2166
- }
2167
- else
2168
- {
2169
- targetValue = Array.IndexOf(enumNames, "FasterRuntimeLTO") >= 0 ? "FasterRuntimeLTO" : "FasterRuntime";
2170
- }
2171
-
2172
- var enumValue = System.Enum.Parse(enumType, targetValue);
2173
- codeOptProp.SetValue(null, enumValue);
2174
- appliedCodeOpt = targetValue;
2175
-
2176
- if (IsSDKDeveloper()) HyperDebug.LogSuccess($"Release build: Code Optimization → {targetValue}");
2177
- }
2178
- }
2179
- catch (System.Exception ex)
2180
- {
2181
- HyperDebug.LogWarning($"Could not set Code Optimization: {ex.Message}");
2182
- }
2183
-
2184
- try
2185
- {
2186
- if (wantsDiskSize)
2187
- {
2188
- PlayerSettings.SetIl2CppCodeGeneration(NamedBuildTarget.WebGL, Il2CppCodeGeneration.OptimizeSize);
2189
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Release build: IL2CPP Code Generation → Optimize Size");
2190
- }
2191
- else
2192
- {
2193
- PlayerSettings.SetIl2CppCodeGeneration(NamedBuildTarget.WebGL, Il2CppCodeGeneration.OptimizeSpeed);
2194
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Release build: IL2CPP Code Generation → Optimize Speed");
2195
- }
2196
- }
2197
- catch (System.Exception)
2198
- {
2199
- HyperDebug.LogWarning("IL2CPP code generation setting not available in this Unity version");
2200
- }
2201
- }
2202
-
2203
- private static void SetReleaseBuildDefineSymbol(bool isRelease)
2204
- {
2205
- try
2206
- {
2207
- string defines = PlayerSettings.GetScriptingDefineSymbols(NamedBuildTarget.WebGL);
2208
- const string RELEASE_DEFINE = "HYPER_RELEASE_BUILD";
2209
- const string DEVELOPMENT_DEFINE = "HYPER_DEVELOPMENT_BUILD";
2210
-
2211
- bool hasReleaseDefine = defines.Contains(RELEASE_DEFINE);
2212
- bool hasDevelopmentDefine = defines.Contains(DEVELOPMENT_DEFINE);
2213
-
2214
- if (isRelease)
2215
- {
2216
- // Add HYPER_RELEASE_BUILD if not present
2217
- if (!hasReleaseDefine)
2218
- {
2219
- defines = string.IsNullOrEmpty(defines) ? RELEASE_DEFINE : $"{defines};{RELEASE_DEFINE}";
2220
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Set HYPER_RELEASE_BUILD (production API URL; Unity debug logger off in player)");
2221
- }
2222
-
2223
- // Remove HYPER_DEVELOPMENT_BUILD if present
2224
- if (hasDevelopmentDefine)
2225
- {
2226
- defines = defines.Replace(DEVELOPMENT_DEFINE, "").Replace(";;", ";").Trim(';');
2227
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Removed HYPER_DEVELOPMENT_BUILD define symbol for release build");
2228
- }
2229
- }
2230
- else
2231
- {
2232
- // Remove HYPER_RELEASE_BUILD if present
2233
- if (hasReleaseDefine)
2234
- {
2235
- defines = defines.Replace(RELEASE_DEFINE, "").Replace(";;", ";").Trim(';');
2236
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Removed HYPER_RELEASE_BUILD define symbol for dev API URL");
2237
- }
2238
-
2239
- // Add HYPER_DEVELOPMENT_BUILD if not present (since we're not using BuildOptions.Development to keep Brotli compression)
2240
- if (!hasDevelopmentDefine && IsSDKDeveloper()) // This is a developer only feature
2241
- {
2242
- defines = string.IsNullOrEmpty(defines) ? DEVELOPMENT_DEFINE : $"{defines};{DEVELOPMENT_DEFINE}";
2243
- if (IsSDKDeveloper()) HyperDebug.LogSuccess("Set HYPER_DEVELOPMENT_BUILD define symbol for development build");
2244
- }
2245
- }
2246
-
2247
- PlayerSettings.SetScriptingDefineSymbols(NamedBuildTarget.WebGL, defines);
2248
- }
2249
- catch (System.Exception ex)
2250
- {
2251
- HyperDebug.LogWarning($"Could not set release build define symbol: {ex.Message}");
2252
- }
2253
- }
2254
-
2255
- private static string[] GetEnabledScenes()
2256
- {
2257
- var scenes = new System.Collections.Generic.List<string>();
2258
- foreach (var scene in EditorBuildSettings.scenes)
2259
- {
2260
- if (scene.enabled)
2261
- scenes.Add(scene.path);
2262
- }
2263
- return scenes.ToArray();
2264
- }
2265
-
2266
- /// <summary>
2267
- /// Forces Unity to detect a change and repack assets by renaming a persistent marker
2268
- /// GameObject inside the HyperLoader scene. The marker stays in the scene permanently.
2269
- /// </summary>
2270
- private static void ForceAssetRepack()
2271
- {
2272
- const string hyperLoaderScenePath = HyperConstants.HYPER_LOADER_SCENE_PATH;
2273
- const string markerPrefix = "__HyperSDK_BuildMarker";
2274
- if (IsSDKDeveloper()) HyperDebug.Log("ForceAssetRepack() called");
2275
-
2276
- try
2277
- {
2278
- Scene hyperLoaderScene = EditorSceneManager.GetSceneByPath(hyperLoaderScenePath);
2279
- bool sceneWasLoaded = hyperLoaderScene.IsValid() && hyperLoaderScene.isLoaded;
2280
-
2281
- if (!sceneWasLoaded)
2282
- {
2283
- hyperLoaderScene = EditorSceneManager.OpenScene(hyperLoaderScenePath, OpenSceneMode.Additive);
2284
- }
2285
-
2286
- GameObject markerObject = FindMarkerObject(hyperLoaderScene, markerPrefix);
2287
- if (markerObject == null)
2288
- {
2289
- markerObject = new GameObject(markerPrefix);
2290
- if (hyperLoaderScene.rootCount > 0)
2291
- {
2292
- markerObject.transform.SetParent(hyperLoaderScene.GetRootGameObjects()[0].transform, false);
2293
- }
2294
- EditorSceneManager.MoveGameObjectToScene(markerObject, hyperLoaderScene);
2295
- }
2296
-
2297
- string newName = $"{markerPrefix}_{System.DateTime.Now.Ticks}";
2298
- markerObject.name = newName;
2299
-
2300
- EditorSceneManager.MarkSceneDirty(hyperLoaderScene);
2301
- EditorSceneManager.SaveScene(hyperLoaderScene);
2302
-
2303
- if (IsSDKDeveloper()) HyperDebug.Log($"Renamed build marker to '{newName}'");
2304
-
2305
- if (!sceneWasLoaded)
2306
- {
2307
- EditorSceneManager.CloseScene(hyperLoaderScene, true);
2308
- }
2309
- }
2310
- catch (System.Exception ex)
2311
- {
2312
- HyperDebug.LogWarning($"Could not force asset repack: {ex.Message}");
2313
- }
2314
- }
2315
-
2316
- private static GameObject FindMarkerObject(Scene scene, string markerPrefix)
2317
- {
2318
- foreach (var root in scene.GetRootGameObjects())
2319
- {
2320
- var marker = FindMarkerRecursive(root.transform, markerPrefix);
2321
- if (marker != null)
2322
- {
2323
- return marker.gameObject;
2324
- }
2325
- }
2326
-
2327
- return null;
2328
- }
2329
-
2330
- private static Transform FindMarkerRecursive(Transform parent, string markerPrefix)
2331
- {
2332
- if (parent.name.StartsWith(markerPrefix, StringComparison.Ordinal))
2333
- {
2334
- return parent;
2335
- }
2336
-
2337
- foreach (Transform child in parent)
2338
- {
2339
- var result = FindMarkerRecursive(child, markerPrefix);
2340
- if (result != null)
2341
- return result;
2342
- }
2343
-
2344
- return null;
2345
- }
2346
-
2347
1880
  public static void ClearAssetBreakdownForManualBuild()
2348
1881
  {
2349
1882
  lastBuildAssets?.Clear();
@@ -2351,7 +1884,7 @@ namespace Hyper.Editor
2351
1884
  RepaintWindow();
2352
1885
  }
2353
1886
 
2354
- private static void ClearBuildInfo()
1887
+ internal static void ClearBuildInfo()
2355
1888
  {
2356
1889
  lastBuildPath = "";
2357
1890
  lastBuildTime = null;
@@ -2369,7 +1902,7 @@ namespace Hyper.Editor
2369
1902
  RepaintWindow();
2370
1903
  }
2371
1904
 
2372
- public static void UpdateBuildInfo(string buildPath, BuildReport report = null)
1905
+ internal static void UpdateBuildInfo(string buildPath, BuildReport report = null)
2373
1906
  {
2374
1907
  lastBuildPath = buildPath;
2375
1908
  lastBuildTime = System.DateTime.Now;
@@ -2877,7 +2410,7 @@ namespace Hyper.Editor
2877
2410
 
2878
2411
  // Quick read to check for HyperRandom usage
2879
2412
  string content = System.IO.File.ReadAllText(filePath);
2880
-
2413
+
2881
2414
  // Check for HyperRandom usage patterns
2882
2415
  if (System.Text.RegularExpressions.Regex.IsMatch(content, @"\bHyperRandom\b", System.Text.RegularExpressions.RegexOptions.IgnoreCase))
2883
2416
  {
@@ -3046,13 +2579,13 @@ namespace Hyper.Editor
3046
2579
  // - SDK dev mode: Assets/HyperSDK/ and Assets/WebGLTemplates/
3047
2580
  // - Client dev mode: Packages/app.hypergames.hypersdk/ (UPM package)
3048
2581
  bool isSDKDev = IsSDKDeveloper();
3049
-
2582
+
3050
2583
  if (assetPath.StartsWith("Assets/HyperSDK/", System.StringComparison.OrdinalIgnoreCase) ||
3051
2584
  assetPath.StartsWith("Assets/WebGLTemplates/", System.StringComparison.OrdinalIgnoreCase))
3052
2585
  {
3053
2586
  return "HyperSDK";
3054
2587
  }
3055
-
2588
+
3056
2589
  // Only include package path for client devs (not SDK developers)
3057
2590
  if (!isSDKDev && assetPath.StartsWith("Packages/app.hypergames.hypersdk/", System.StringComparison.OrdinalIgnoreCase))
3058
2591
  {
@@ -80,6 +80,9 @@ namespace Hyper.Internal
80
80
  };
81
81
 
82
82
  #endregion
83
+
84
+ [HideInInspector] public bool HasScenesContent => GameScene.IsValid && PracticeScene.IsValid;
85
+ [HideInInspector] public bool HasPosterContent => gamePosterSprite != null;
83
86
  }
84
87
 
85
88
  #region Supporting Enums
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app.hypergames.hypersdk",
3
- "version": "1.8.13",
3
+ "version": "1.8.14",
4
4
  "displayName": "HyperSDK",
5
5
  "description": "Official Unity SDK for Hyper: multiplayer battles, leaderboards, deterministic RNG, session management, tutorials, and WebGL optimizations for production-ready games.",
6
6
  "unity": "6000.0",