Skip to content

Commit

Permalink
fix 非WebGL平台打包兼容BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
yinlong committed Nov 7, 2018
1 parent 2c86c50 commit dd5e837
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
m_IndirectSpecularColor: {r: 0.37311947, g: 0.38074005, b: 0.35872722, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -362,7 +362,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: -0.0000019468666, y: -0.00002671818}
m_AnchoredPosition: {x: 0.000021455015, y: -0.0000042927095}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &208146964
Expand Down Expand Up @@ -1508,7 +1508,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -0.00001220189}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &753216757
Expand Down Expand Up @@ -1712,7 +1712,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: -10.58, y: -70.9}
m_AnchoredPosition: {x: -10.58, y: -71}
m_SizeDelta: {x: -21.16, y: 35.62}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &821358077
Expand Down Expand Up @@ -2939,7 +2939,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 114770475}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0.9999998
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
Expand Down Expand Up @@ -3717,7 +3717,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 837294422}
m_HandleRect: {fileID: 837294421}
m_Direction: 2
m_Value: 1
m_Value: 0
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public void NewSocket()
entryItem.transform.localScale = Vector3.one;
entryItem.transform.localRotation = Quaternion.identity;
entryItem.onClick.AddListener(() => { OnEntryItemClick(entry); });

if (m_selectedEntry == null)
m_selectedEntry = entry;
}

private void OnEntryItemClick(WebSocketEntry entry)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#if UNITY_WEBGL && !UNITY_EDITOR
using System.Runtime.InteropServices;
using System;
using UnityWebSocket;


namespace WebSocketJslib
{
/// <summary>
Expand Down Expand Up @@ -94,4 +96,5 @@ private void OnError(string msg)
onError(this, new ErrorEventArgs(msg));
}
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if UNITY_WEBGL && !UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -200,3 +201,4 @@ public void HandleError(string message)
}
}
}
#endif
1 change: 1 addition & 0 deletions UnityWebSocket/ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ GraphicsSettings:
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down
5 changes: 3 additions & 2 deletions UnityWebSocket/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
companyName: com.redstone
productName: UnityWebsocket
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
Expand Down Expand Up @@ -157,7 +157,8 @@ PlayerSettings:
resolutionScalingMode: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier: {}
applicationIdentifier:
Android: com.redstone.UnityWebsocket
buildNumber: {}
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 16
Expand Down

0 comments on commit dd5e837

Please sign in to comment.