浏览代码

Adding the configuration chooser scene to the menu.

/4.1
Todd Stinson 4 年前
当前提交
aefdfb5e
共有 4 个文件被更改,包括 245 次插入3 次删除
  1. 228
      Assets/Scenes/ARFoundationMenu/Menu.unity
  2. 5
      Assets/Scripts/UX/ARSceneSelectUI.cs
  3. 9
      Assets/Scripts/UX/CheckAvailableFeatures.cs
  4. 6
      ProjectSettings/EditorBuildSettings.asset

228
Assets/Scenes/ARFoundationMenu/Menu.unity


m_SampleUX: {fileID: 1783746788}
m_CheckSupport: {fileID: 912198813}
m_Depth: {fileID: 251164954}
m_ConfigChooser: {fileID: 2011106401}
--- !u!1 &786358435
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1536440840}
m_CullTransparentMesh: 0
--- !u!1 &1555465365
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1555465366}
- component: {fileID: 1555465368}
- component: {fileID: 1555465367}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1555465366
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1555465365}
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_Father: {fileID: 2011106399}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1555465367
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1555465365}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Config Chooser
--- !u!222 &1555465368
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1555465365}
m_CullTransparentMesh: 0
--- !u!1 &1569808630
GameObject:
m_ObjectHideFlags: 0

- {fileID: 1783746786}
- {fileID: 912198811}
- {fileID: 251164958}
- {fileID: 2011106399}
m_Father: {fileID: 1413559114}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2010536955}
m_CullTransparentMesh: 0
--- !u!1 &2011106398
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2011106399}
- component: {fileID: 2011106403}
- component: {fileID: 2011106402}
- component: {fileID: 2011106401}
- component: {fileID: 2011106400}
m_Layer: 5
m_Name: Configuration Chooser
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2011106399
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011106398}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2.8958, y: 2.8958, z: 2.8958}
m_Children:
- {fileID: 1555465366}
m_Father: {fileID: 1569808631}
m_RootOrder: 21
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: -650}
m_SizeDelta: {x: 110, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2011106400
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011106398}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 16733cd6749cf4d96be9df0329c6938a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Tooltip: {fileID: 2094799242}
--- !u!114 &2011106401
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011106398}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 0
m_TargetGraphic: {fileID: 2011106402}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 774532498}
m_TargetAssemblyTypeName: UnityEngine.XR.ARFoundation.Samples.ARSceneSelectUI,
Assembly-CSharp
m_MethodName: ConfigChooserButtonPressed
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2011106402
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011106398}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
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!222 &2011106403
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011106398}
m_CullTransparentMesh: 0
--- !u!1 &2026763857
GameObject:

5
Assets/Scripts/UX/ARSceneSelectUI.cs


LoadScene("SampleUXScene");
}
public void ConfigChooserButtonPressed()
{
LoadScene("ConfigurationChooser");
}
public void FaceTrackingMenuButtonPressed()
{
ActiveMenu.currentMenu = MenuType.FaceTracking;

9
Assets/Scripts/UX/CheckAvailableFeatures.cs


set { m_Depth = value; }
}
[SerializeField]
Button m_ConfigChooser;
public Button configChooser
{
get => m_ConfigChooser;
set => m_ConfigChooser = value;
}
// Start is called before the first frame update
void Start()
{

m_Interaction.interactable = true;
m_SampleUX.interactable = true;
m_CheckSupport.interactable = true;
m_ConfigChooser.interactable = true;
}
if(faceDescriptors.Count > 0)

6
ProjectSettings/EditorBuildSettings.asset


path: Assets/Scenes/Check Support.unity
guid: cf67ab53e5ff241dfa61608222d82109
- enabled: 1
path: Assets/Scenes/Configurations/ConfigurationChooser.unity
guid: 3aae069bebee946a090ed6a756a1e77b
- enabled: 1
path: Assets/Scenes/EnvironmentProbes.unity
guid: d568d188cadf141e38769dbabd3fe385
- enabled: 1

- enabled: 1
path: Assets/Scenes/Interaction/Interaction.unity
guid: ff9b6e62e970e432a9e8d51604b3bad8
- enabled: 0
path: Assets/Scenes/Configurations/ConfigurationChooser.unity
guid: 3aae069bebee946a090ed6a756a1e77b
m_configObjects:
UnityEditor.XR.ARCore.ARCoreSettings: {fileID: 11400000, guid: f8ce26fe3bc69499b9be4b2378e97a94,
type: 2}

正在加载...
取消
保存