Skip to content

Commit 50c3a50

Browse files
committed
bugfix for Release 1.1.0
- set Background white - set initial Scale = 0.5 - Clamp Scale in 0.5 and 1.5
1 parent a9b8264 commit 50c3a50

File tree

3 files changed

+60
-69
lines changed

3 files changed

+60
-69
lines changed

Assets/Scenes/MainScene.unity

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ Camera:
10101010
m_Enabled: 1
10111011
serializedVersion: 2
10121012
m_ClearFlags: 2
1013-
m_BackGroundColor: {r: 0.764151, g: 0.764151, b: 0.764151, a: 0}
1013+
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
10141014
m_projectionMatrixMode: 1
10151015
m_GateFitMode: 2
10161016
m_FOVAxisMode: 0
@@ -1024,7 +1024,7 @@ Camera:
10241024
width: 1
10251025
height: 1
10261026
near clip plane: 0.3
1027-
far clip plane: 1000
1027+
far clip plane: 100
10281028
field of view: 60
10291029
orthographic: 1
10301030
orthographic size: 4.028003
@@ -1185,7 +1185,7 @@ MonoBehaviour:
11851185
m_EditorClassIdentifier:
11861186
m_UiScaleMode: 0
11871187
m_ReferencePixelsPerUnit: 100
1188-
m_ScaleFactor: 1
1188+
m_ScaleFactor: 0.5
11891189
m_ReferenceResolution: {x: 800, y: 600}
11901190
m_ScreenMatchMode: 0
11911191
m_MatchWidthOrHeight: 0

Assets/Scripts/ScaleController.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
public class ScaleController : MonoBehaviour
88
{
9-
private float _distance;
9+
private float _scaleFactor;
1010
private float zoomSensitivity = 100.0f;
1111
private float touchZoomSensitivity = 0.001f;
1212
private CanvasScaler _canvasScaler;
@@ -15,7 +15,7 @@ public class ScaleController : MonoBehaviour
1515
void Start()
1616
{
1717
_canvasScaler = GetComponent<CanvasScaler>();
18-
_distance = _canvasScaler.scaleFactor;
18+
_scaleFactor = _canvasScaler.scaleFactor;
1919
}
2020

2121
// Update is called once per frame
@@ -37,20 +37,21 @@ void Update()
3737
print(zoomModifier);
3838

3939
if (prevMagnitude > currentMagnitude)
40-
_distance -= zoomModifier;
40+
_scaleFactor -= zoomModifier;
4141
if (prevMagnitude < currentMagnitude)
42-
_distance += zoomModifier;
42+
_scaleFactor += zoomModifier;
4343
}
4444
// handle zoom
4545
if (Input.mouseScrollDelta.y != 0)
4646
{
4747
float distance = Input.mouseScrollDelta.y * zoomSensitivity * Time.deltaTime;
48-
_distance = distance;
48+
_scaleFactor = distance;
4949
}
5050
}
5151

5252
private void LateUpdate()
5353
{
54-
_canvasScaler.scaleFactor = _distance;
54+
_scaleFactor = Mathf.Clamp(_scaleFactor, 0.5f, 1.5f);
55+
_canvasScaler.scaleFactor = _scaleFactor;
5556
}
5657
}

ProjectSettings/ProjectSettings.asset

Lines changed: 50 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ PlayerSettings:
1313
useOnDemandResources: 0
1414
accelerometerFrequency: 60
1515
companyName: Luciano Jung
16-
productName: RelativeS_names
16+
productName: Relatiive
1717
defaultCursor: {fileID: 0}
1818
cursorHotspot: {x: 0, y: 0}
1919
m_SplashScreenBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
2020
m_ShowUnitySplashScreen: 1
2121
m_ShowUnitySplashLogo: 1
2222
m_SplashScreenOverlayOpacity: 1
23-
m_SplashScreenAnimation: 0
24-
m_SplashScreenLogoStyle: 0
23+
m_SplashScreenAnimation: 2
24+
m_SplashScreenLogoStyle: 1
2525
m_SplashScreenDrawMode: 0
26-
m_SplashScreenBackgroundAnimationZoom: 1
26+
m_SplashScreenBackgroundAnimationZoom: 0
2727
m_SplashScreenLogoAnimationZoom: 1
2828
m_SplashScreenBackgroundLandscapeAspect: 1
2929
m_SplashScreenBackgroundPortraitAspect: 1
@@ -40,9 +40,9 @@ PlayerSettings:
4040
width: 1
4141
height: 1
4242
m_SplashScreenLogos:
43-
- logo: {fileID: 21300000, guid: dfcb8e7a1a9e2b4479d09e0dfe1126d8, type: 3}
43+
- logo: {fileID: 21300000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
4444
duration: 2
45-
m_VirtualRealitySplashScreen: {fileID: 2800000, guid: dfcb8e7a1a9e2b4479d09e0dfe1126d8, type: 3}
45+
m_VirtualRealitySplashScreen: {fileID: 2800000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
4646
m_HolographicTrackingLossScreen: {fileID: 0}
4747
defaultScreenWidth: 1920
4848
defaultScreenHeight: 1080
@@ -129,7 +129,7 @@ PlayerSettings:
129129
16:10: 1
130130
16:9: 1
131131
Others: 1
132-
bundleVersion: 1.0.3
132+
bundleVersion: 1.1.0
133133
preloadedAssets: []
134134
metroInputSource: 0
135135
wsaTransparentSwapchain: 0
@@ -158,7 +158,7 @@ PlayerSettings:
158158
iPhone: 0
159159
tvOS: 0
160160
overrideDefaultApplicationIdentifier: 1
161-
AndroidBundleVersionCode: 103
161+
AndroidBundleVersionCode: 110
162162
AndroidMinSdkVersion: 19
163163
AndroidTargetSdkVersion: 30
164164
AndroidPreferredInstallLocation: 1
@@ -243,7 +243,7 @@ PlayerSettings:
243243
useCustomProguardFile: 0
244244
AndroidTargetArchitectures: 3
245245
AndroidSplashScreenScale: 0
246-
androidSplashScreen: {fileID: 2800000, guid: dfcb8e7a1a9e2b4479d09e0dfe1126d8, type: 3}
246+
androidSplashScreen: {fileID: 2800000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
247247
AndroidKeystoreName: D:/OneDrive/Dokumente/Keystore/user.keystore
248248
AndroidKeyaliasName: unityrelativeskeyvalue
249249
AndroidBuildApkPerCpuArchitecture: 0
@@ -259,24 +259,55 @@ PlayerSettings:
259259
banner: {fileID: 0}
260260
androidGamepadSupportLevel: 0
261261
AndroidMinifyWithR8: 0
262-
AndroidMinifyRelease: 0
262+
AndroidMinifyRelease: 1
263263
AndroidMinifyDebug: 0
264264
AndroidValidateAppBundleSize: 1
265265
AndroidAppBundleSizeToValidate: 150
266266
m_BuildTargetIcons:
267267
- m_BuildTarget:
268268
m_Icons:
269269
- serializedVersion: 2
270-
m_Icon: {fileID: 0}
270+
m_Icon: {fileID: 2800000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
271271
m_Width: 128
272272
m_Height: 128
273273
m_Kind: 0
274274
m_BuildTargetPlatformIcons:
275275
- m_BuildTarget: Android
276276
m_Icons:
277+
- m_Textures:
278+
- {fileID: 2800000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
279+
m_Width: 192
280+
m_Height: 192
281+
m_Kind: 1
282+
m_SubKind:
283+
- m_Textures: []
284+
m_Width: 144
285+
m_Height: 144
286+
m_Kind: 1
287+
m_SubKind:
288+
- m_Textures: []
289+
m_Width: 96
290+
m_Height: 96
291+
m_Kind: 1
292+
m_SubKind:
293+
- m_Textures: []
294+
m_Width: 72
295+
m_Height: 72
296+
m_Kind: 1
297+
m_SubKind:
298+
- m_Textures: []
299+
m_Width: 48
300+
m_Height: 48
301+
m_Kind: 1
302+
m_SubKind:
303+
- m_Textures: []
304+
m_Width: 36
305+
m_Height: 36
306+
m_Kind: 1
307+
m_SubKind:
277308
- m_Textures:
278309
- {fileID: 10307, guid: 0000000000000000f000000000000000, type: 0}
279-
- {fileID: 2800000, guid: dfcb8e7a1a9e2b4479d09e0dfe1126d8, type: 3}
310+
- {fileID: 2800000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
280311
m_Width: 432
281312
m_Height: 432
282313
m_Kind: 2
@@ -307,73 +338,32 @@ PlayerSettings:
307338
m_Kind: 2
308339
m_SubKind:
309340
- m_Textures:
310-
- {fileID: 2800000, guid: dfcb8e7a1a9e2b4479d09e0dfe1126d8, type: 3}
311-
m_Width: 192
312-
m_Height: 192
313-
m_Kind: 1
314-
m_SubKind:
315-
- m_Textures:
316-
- {fileID: 0}
317-
m_Width: 144
318-
m_Height: 144
319-
m_Kind: 1
320-
m_SubKind:
321-
- m_Textures:
322-
- {fileID: 0}
323-
m_Width: 96
324-
m_Height: 96
325-
m_Kind: 1
326-
m_SubKind:
327-
- m_Textures:
328-
- {fileID: 0}
329-
m_Width: 72
330-
m_Height: 72
331-
m_Kind: 1
332-
m_SubKind:
333-
- m_Textures:
334-
- {fileID: 0}
335-
m_Width: 48
336-
m_Height: 48
337-
m_Kind: 1
338-
m_SubKind:
339-
- m_Textures:
340-
- {fileID: 0}
341-
m_Width: 36
342-
m_Height: 36
343-
m_Kind: 1
344-
m_SubKind:
345-
- m_Textures:
346-
- {fileID: 2800000, guid: dfcb8e7a1a9e2b4479d09e0dfe1126d8, type: 3}
341+
- {fileID: 2800000, guid: a3353e2705c32484f9a940b6afee28c6, type: 3}
347342
m_Width: 192
348343
m_Height: 192
349344
m_Kind: 0
350345
m_SubKind:
351-
- m_Textures:
352-
- {fileID: 0}
346+
- m_Textures: []
353347
m_Width: 144
354348
m_Height: 144
355349
m_Kind: 0
356350
m_SubKind:
357-
- m_Textures:
358-
- {fileID: 0}
351+
- m_Textures: []
359352
m_Width: 96
360353
m_Height: 96
361354
m_Kind: 0
362355
m_SubKind:
363-
- m_Textures:
364-
- {fileID: 0}
356+
- m_Textures: []
365357
m_Width: 72
366358
m_Height: 72
367359
m_Kind: 0
368360
m_SubKind:
369-
- m_Textures:
370-
- {fileID: 0}
361+
- m_Textures: []
371362
m_Width: 48
372363
m_Height: 48
373364
m_Kind: 0
374365
m_SubKind:
375-
- m_Textures:
376-
- {fileID: 0}
366+
- m_Textures: []
377367
m_Width: 36
378368
m_Height: 36
379369
m_Kind: 0
@@ -425,7 +415,7 @@ PlayerSettings:
425415
tvOS: 1
426416
m_BuildTargetGroupLightmapEncodingQuality:
427417
- m_BuildTarget: Android
428-
m_EncodingQuality: 1
418+
m_EncodingQuality: 2
429419
m_BuildTargetGroupLightmapSettings: []
430420
m_BuildTargetNormalMapEncoding: []
431421
playModeTestRunnerEnabled: 0

0 commit comments

Comments
 (0)