Commit 4f5d6056 authored by You're Perfect 's avatar You're Perfect

Work on fixing Android file loading

parent 68e3de99
......@@ -98,7 +98,7 @@ public class UIManager : MonoBehaviour
private void Update()
{
if (ShowOnscreenControlls && !MainMenu.gameObject.activeInHierarchy) {
if (ShowOnscreenControlls && !MainMenu.gameObject.activeInHierarchy && !IsAnyInputDialogOpen) {
DirectionButtons.gameObject.SetActive(BlockManager.PlayMode);
CursorControls.gameObject.SetActive(!BlockManager.PlayMode);
......
......@@ -359,12 +359,21 @@ public static class Serializer
public static void BlocksFromJson(Uri path, bool startPlayMode = false, string[] startPositionOverrides = null)
{
LogController.Log("Loading from " + path.ToString());
StageCollection deserializedCollection = new StageCollection(BlockManager.Instance);
WebClient webClient = new WebClient();
ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback;
Stream fs = webClient.OpenRead(path);
HandleLoad(fs, true);
if (Application.platform != RuntimePlatform.Android)
{
LogController.Log("Loading from " + path.ToString());
WebClient webClient = new WebClient();
ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback;
Stream fs = webClient.OpenRead(path);
HandleLoad(fs, true);
}
else
{
LogController.Log("Loading from " + path.Host + path.PathAndQuery + path.Fragment);
Stream fs = File.OpenRead(path.Host + path.PathAndQuery + path.Fragment);
HandleLoad(fs, true);
}
if(startPositionOverrides != null)
{
for(int i=0;i<startPositionOverrides.Length;++i)
......
......@@ -1316,7 +1316,7 @@ GameObject:
- component: {fileID: 80767367}
- component: {fileID: 2065144811}
m_Layer: 5
m_Name: 4 Ways DPad
m_Name: PlayerControls
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -1338,7 +1338,7 @@ RectTransform:
- {fileID: 136206543}
- {fileID: 375208072}
m_Father: {fileID: 1324165411}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
......@@ -1544,13 +1544,13 @@ RectTransform:
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 136206542}
m_LocalRotation: {x: 0, y: 0, z: 0.7071099, w: 0.7071037}
m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 80767366}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: -9, y: -15}
......@@ -1590,7 +1590,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3}
m_Sprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -2901,7 +2901,7 @@ Prefab:
type: 2}
propertyPath: FurtherCloserButtons
value:
objectReference: {fileID: 1407085337}
objectReference: {fileID: 0}
- target: {fileID: 114704978017189584, guid: 68c3d27a260911d4494f03cf47cd8060,
type: 2}
propertyPath: DirectionButtons
......@@ -3770,7 +3770,7 @@ GameObject:
m_Component:
- component: {fileID: 321236940}
m_Layer: 5
m_Name: MovementControls
m_Name: CursorControls
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -3793,7 +3793,7 @@ RectTransform:
- {fileID: 1449751777}
- {fileID: 1423084650}
m_Father: {fileID: 1324165411}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
......@@ -5085,13 +5085,13 @@ RectTransform:
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 375208071}
m_LocalRotation: {x: 0, y: 0, z: 0.70710444, w: -0.70710915}
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 80767366}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -9, y: -15}
......@@ -5131,7 +5131,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3}
m_Sprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -9983,7 +9983,7 @@ RectTransform:
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 790930488}
m_LocalRotation: {x: 0, y: 0, z: 1, w: -0.0000028163195}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
......@@ -10029,7 +10029,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3}
m_Sprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -11861,53 +11861,6 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 936473427}
m_CullTransparentMesh: 0
--- !u!1 &947682143
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 1418189210041048, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 947682144}
- component: {fileID: 947682145}
- component: {fileID: 1407085337}
m_Layer: 5
m_Name: 2 Ways DPad Vertical
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &947682144
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 224630003174134352, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 947682143}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1954408316}
- {fileID: 2129824250}
m_Father: {fileID: 1324165411}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -707.00006, y: -132}
m_SizeDelta: {x: 194.9, y: 400}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &947682145
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 222159474074990354, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 947682143}
m_CullTransparentMesh: 0
--- !u!1 &961216149
GameObject:
m_ObjectHideFlags: 0
......@@ -17100,7 +17053,6 @@ RectTransform:
m_Children:
- {fileID: 1437620945}
- {fileID: 1072148885}
- {fileID: 947682144}
- {fileID: 80767366}
- {fileID: 321236940}
m_Father: {fileID: 970769837}
......@@ -17624,21 +17576,6 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1385397378}
m_CullTransparentMesh: 0
--- !u!114 &1407085337
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114161189601828118, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 947682143}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2fa290c3290a9e04cb780c61b130e5af, type: 3}
m_Name:
m_EditorClassIdentifier:
DpadAxis:
- {fileID: 1954408317}
- {fileID: 2129824251}
--- !u!224 &1411117175
RectTransform:
m_ObjectHideFlags: 0
......@@ -24844,94 +24781,6 @@ Transform:
m_Father: {fileID: 1182866643}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1954408315
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 1892691386258570, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1954408316}
- component: {fileID: 1954408319}
- component: {fileID: 1954408318}
- component: {fileID: 1954408317}
m_Layer: 5
m_Name: Down
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1954408316
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 224257474753224792, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1954408315}
m_LocalRotation: {x: 0, y: 0, z: 0.7071099, w: 0.7071037}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 947682144}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 50.5}
m_SizeDelta: {x: 53.333332, y: 53.333332}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1954408317
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114862067977840982, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1954408315}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3}
m_Name:
m_EditorClassIdentifier:
AxisName: joystick 1 Y axis
AxisMultiplier: 1
--- !u!114 &1954408318
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114381612499792628, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1954408315}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &1954408319
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 222639413811957198, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1954408315}
m_CullTransparentMesh: 0
--- !u!1 &1965886420
GameObject:
m_ObjectHideFlags: 0
......@@ -26305,13 +26154,13 @@ RectTransform:
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2067197796}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 80767366}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 46, y: -15}
......@@ -26351,7 +26200,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3}
m_Sprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -26931,94 +26780,6 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2127282734}
m_CullTransparentMesh: 0
--- !u!1 &2129824249
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 1959208694774516, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2129824250}
- component: {fileID: 2129824253}
- component: {fileID: 2129824252}
- component: {fileID: 2129824251}
m_Layer: 5
m_Name: Up
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2129824250
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 224862202977274410, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2129824249}
m_LocalRotation: {x: 0, y: 0, z: 0.70710444, w: -0.70710915}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 947682144}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -50.5}
m_SizeDelta: {x: 53.333332, y: 53.333332}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2129824251
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114061770521577882, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2129824249}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0f6ae34570738c447a8f81bcb10d610c, type: 3}
m_Name:
m_EditorClassIdentifier:
AxisName: joystick 1 Y axis
AxisMultiplier: -1
--- !u!114 &2129824252
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114805273573282870, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2129824249}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 2cd0473fd8ba8a9478a6ea98025a16f0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &2129824253
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 222022246220629776, guid: e7d913beadda84f41aa5116b3a588ce5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2129824249}
m_CullTransparentMesh: 0
--- !u!1 &2130485172
GameObject:
m_ObjectHideFlags: 0
......
......@@ -670,7 +670,7 @@ PlayerSettings:
Android: 0
il2cppCompilerConfiguration: {}
incrementalIl2cppBuild: {}
allowUnsafeCode: 0
allowUnsafeCode: 1
additionalIl2CppArgs:
scriptingRuntimeVersion: 1
apiCompatibilityLevelPerPlatform: {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment