Merge pull request #20 from tverona1/misc
Fix icon aspect ratio, fix Go controller scrolling.
This commit is contained in:
@@ -39,6 +39,9 @@ namespace ControllerSelection {
|
||||
[Tooltip("Show gaze pointer as ray pointer.")]
|
||||
public bool showRayPointer = true;
|
||||
|
||||
// Start ray draw distance
|
||||
private const float StartRayDrawDistance = 0.032f;
|
||||
|
||||
[HideInInspector]
|
||||
public OVRInput.Controller activeController = OVRInput.Controller.None;
|
||||
|
||||
@@ -73,7 +76,7 @@ namespace ControllerSelection {
|
||||
}
|
||||
|
||||
if (linePointer != null) {
|
||||
linePointer.SetPosition(0, ray.origin);
|
||||
linePointer.SetPosition(0, ray.origin + ray.direction * StartRayDrawDistance);
|
||||
linePointer.SetPosition(1, ray.origin + ray.direction * hitRayDrawDistance);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,14 +28,15 @@ RectTransform:
|
||||
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: []
|
||||
m_Children:
|
||||
- {fileID: 270483903320688520}
|
||||
m_Father: {fileID: 2187993270055489575}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 36}
|
||||
m_SizeDelta: {x: 834, y: 460}
|
||||
m_SizeDelta: {x: 834, y: 469}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8250312052813223195
|
||||
CanvasRenderer:
|
||||
@@ -58,7 +59,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -232,6 +233,96 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4032891918720229799
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 270483903320688520}
|
||||
- component: {fileID: 531682556823569209}
|
||||
- component: {fileID: 8091170928783170726}
|
||||
- component: {fileID: 2431431278619055510}
|
||||
m_Layer: 0
|
||||
m_Name: Sprite
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &270483903320688520
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4032891918720229799}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.001}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7191631915371959719}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &531682556823569209
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4032891918720229799}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8091170928783170726
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4032891918720229799}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &2431431278619055510
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4032891918720229799}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AspectMode: 3
|
||||
m_AspectRatio: 1.7777777
|
||||
--- !u!1 &4824380111246446992
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -271,7 +362,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 834, y: 547}
|
||||
m_SizeDelta: {x: 834, y: 556}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4582160310205455797
|
||||
CanvasRenderer:
|
||||
@@ -306,6 +397,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 53f2e028e4291b741960616a445cf2ba, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sprite: {fileID: 4032891918720229799}
|
||||
packageId:
|
||||
appName:
|
||||
--- !u!1 &5252017818009209086
|
||||
@@ -343,7 +435,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 834, y: 560}
|
||||
m_SizeDelta: {x: 834, y: 570}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &165040609097649856
|
||||
CanvasRenderer:
|
||||
|
||||
@@ -57,8 +57,8 @@ MonoBehaviour:
|
||||
m_ChildAlignment: 0
|
||||
m_StartCorner: 0
|
||||
m_StartAxis: 0
|
||||
m_CellSize: {x: 834, y: 548}
|
||||
m_Spacing: {x: 75, y: 75}
|
||||
m_CellSize: {x: 834, y: 557}
|
||||
m_Spacing: {x: 70, y: 70}
|
||||
m_Constraint: 0
|
||||
m_ConstraintCount: 3
|
||||
--- !u!114 &1038337479447180675
|
||||
|
||||
@@ -1444,7 +1444,7 @@ PrefabInstance:
|
||||
type: 3}
|
||||
propertyPath: m_modelOculusGoController
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
objectReference: {fileID: 407379521}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5c706126fee98a74ea509233e2a32a7f, type: 3}
|
||||
--- !u!4 &174121772 stripped
|
||||
@@ -2791,7 +2791,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &407379522
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11872,7 +11872,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1644749161
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -14895,7 +14895,7 @@ PrefabInstance:
|
||||
type: 3}
|
||||
propertyPath: m_modelOculusGoController
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
objectReference: {fileID: 1644749160}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 411c0b99f954d1d4884fa0d6256933cf, type: 3}
|
||||
--- !u!1 &2057963232
|
||||
|
||||
@@ -4,6 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class AppEntry : MonoBehaviour
|
||||
{
|
||||
public GameObject sprite;
|
||||
|
||||
public string packageId;
|
||||
public string appName;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace QuestAppLauncher
|
||||
public string sortMode = Sort_AZ;
|
||||
|
||||
// Whether to show 2D apps
|
||||
public bool show2D = false;
|
||||
public bool show2D = true;
|
||||
|
||||
// Auto Category: Apps are automatically categorized into 3 tabs - Quest, Go/GearVr, 2D
|
||||
public string autoCategory = Category_Top;
|
||||
|
||||
@@ -337,13 +337,17 @@ namespace QuestAppLauncher
|
||||
// Set the icon image
|
||||
if (null != bytesIcon)
|
||||
{
|
||||
var image = newObj.transform.Find("AppIcon").GetComponentInChildren<Image>();
|
||||
var texture = new Texture2D(2, 2, TextureFormat.RGB24, false);
|
||||
var texture = new Texture2D(2, 2, TextureFormat.RGBA32, false);
|
||||
texture.filterMode = FilterMode.Trilinear;
|
||||
texture.anisoLevel = 16;
|
||||
texture.LoadImage(bytesIcon);
|
||||
var rect = new Rect(0, 0, texture.width, texture.height);
|
||||
var image = appEntry.sprite.GetComponent<Image>();
|
||||
image.sprite = Sprite.Create(texture, rect, new Vector2(0.5f, 0.5f));
|
||||
|
||||
// Preserve icon's aspect ratio
|
||||
var aspectRatioFitter = appEntry.sprite.GetComponent<AspectRatioFitter>();
|
||||
aspectRatioFitter.aspectRatio = (float)texture.width / (float)texture.height;
|
||||
}
|
||||
|
||||
// Set app name in text
|
||||
|
||||
@@ -78,6 +78,14 @@ namespace QuestAppLauncher
|
||||
{
|
||||
moveVector = OVRInput.Get(OVRInput.Axis2D.SecondaryThumbstick);
|
||||
}
|
||||
if (moveVector.x == 0 && moveVector.y == 0)
|
||||
{
|
||||
moveVector = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad);
|
||||
}
|
||||
if (moveVector.x == 0 && moveVector.y == 0)
|
||||
{
|
||||
moveVector = OVRInput.Get(OVRInput.Axis2D.SecondaryTouchpad);
|
||||
}
|
||||
|
||||
if (moveVector.y == 0)
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ PlayerSettings:
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 0.9
|
||||
bundleVersion: 0.9.1
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
||||
Reference in New Issue
Block a user