Second version of DetailsPanel rework
improved layout text now scrolls to top on beginning models are now children of their camera to simplify getting a good view of them increased render texture resolution and used a better blending function
This commit is contained in:
@@ -8,13 +8,13 @@ Material:
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ObjectCameraMaterial
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _ALPHATEST_ON
|
||||
m_ShaderKeywords: _ALPHABLEND_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2450
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: TransparentCutout
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -57,21 +57,21 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 1
|
||||
- _Cutoff: 0.301
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlend: 10
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 1
|
||||
- _Mode: 2
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlend: 5
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
|
||||
@@ -11,19 +11,19 @@ RenderTexture:
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_Width: 512
|
||||
m_Height: 512
|
||||
m_Width: 1024
|
||||
m_Height: 1024
|
||||
m_AntiAliasing: 1
|
||||
m_DepthFormat: 2
|
||||
m_ColorFormat: 0
|
||||
m_MipMap: 0
|
||||
m_MipMap: 1
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 1
|
||||
m_UseDynamicScale: 1
|
||||
m_BindMS: 0
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_FilterMode: 2
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
|
||||
@@ -29,6 +29,23 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1065495783931696
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 224200271212345534}
|
||||
- component: {fileID: 222966107194084688}
|
||||
- component: {fileID: 114531659355891526}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1088261487859592
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -47,6 +64,23 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1125399514285838
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 224988931619594536}
|
||||
- component: {fileID: 222805632229339052}
|
||||
- component: {fileID: 114283102023446632}
|
||||
m_Layer: 5
|
||||
m_Name: ModelTexture
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1191674719837668
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -91,7 +125,6 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 224292492441239568}
|
||||
- component: {fileID: 222651095218169722}
|
||||
- component: {fileID: 114271944212076120}
|
||||
- component: {fileID: 114183846072457360}
|
||||
- component: {fileID: 114047882587450334}
|
||||
m_Layer: 5
|
||||
@@ -353,6 +386,23 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1553995320662558
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 224923893760777956}
|
||||
- component: {fileID: 222418191301371036}
|
||||
- component: {fileID: 114129011032390252}
|
||||
m_Layer: 5
|
||||
m_Name: Border
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1595175857114310
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -491,7 +541,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &4112130633259944
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -658,7 +708,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
m_VerticalFit: 0
|
||||
--- !u!114 &114020375159146616
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -844,6 +894,33 @@ MonoBehaviour:
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &114129011032390252
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1553995320662558}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: d7c1ed00403294f44afec942af3cc296, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
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: 26eb50ae3c8418745bdac31ddc6d13fc, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &114155538012578298
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1051,33 +1128,6 @@ MonoBehaviour:
|
||||
m_CallState: 2
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &114271944212076120
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1230596598073714}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 2d69022d4516264499a1a0abeae89af8, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
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
|
||||
--- !u!114 &114277299948679770
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1105,6 +1155,33 @@ MonoBehaviour:
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &114283102023446632
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1125399514285838}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 2d69022d4516264499a1a0abeae89af8, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
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
|
||||
--- !u!114 &114312924644555460
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1290,6 +1367,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
DetailsText: {fileID: 114941164005360912}
|
||||
DetailsTextScrollRect: {fileID: 114394030101927196}
|
||||
DetailsModel: {fileID: 114183846072457360}
|
||||
--- !u!114 &114507205352577392
|
||||
MonoBehaviour:
|
||||
@@ -1307,6 +1385,33 @@ MonoBehaviour:
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &114531659355891526
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1065495783931696}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 184173fb9a2399341882a894edcac032, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
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: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &114584917988102786
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1345,8 +1450,8 @@ MonoBehaviour:
|
||||
m_TargetGraphic: {fileID: 114013157313467306}
|
||||
m_HandleRect: {fileID: 224126681634059420}
|
||||
m_Direction: 2
|
||||
m_Value: 0.4999999
|
||||
m_Size: 0.4911189
|
||||
m_Value: 0.5
|
||||
m_Size: 0.49794
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -1864,6 +1969,12 @@ CanvasRenderer:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1088261487859592}
|
||||
--- !u!222 &222418191301371036
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1553995320662558}
|
||||
--- !u!222 &222450742828561450
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1930,12 +2041,24 @@ CanvasRenderer:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1045492388477854}
|
||||
--- !u!222 &222805632229339052
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1125399514285838}
|
||||
--- !u!222 &222883275204112786
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1298020638438872}
|
||||
--- !u!222 &222966107194084688
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1065495783931696}
|
||||
--- !u!222 &222986991869533932
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -2035,6 +2158,24 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224200271212345534
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1065495783931696}
|
||||
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: 224250538007241578}
|
||||
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!224 &224216194665817218
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -2063,8 +2204,8 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 224457627043515580}
|
||||
- {fileID: 224450108705652292}
|
||||
- {fileID: 224200271212345534}
|
||||
- {fileID: 224923893760777956}
|
||||
- {fileID: 224017865803686938}
|
||||
- {fileID: 224888481017931948}
|
||||
m_Father: {fileID: 224804495073354866}
|
||||
@@ -2073,7 +2214,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 25, y: 25}
|
||||
m_SizeDelta: {x: 460, y: 375.3}
|
||||
m_SizeDelta: {x: 460, y: 375}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!224 &224251385334151864
|
||||
RectTransform:
|
||||
@@ -2109,7 +2250,7 @@ RectTransform:
|
||||
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_AnchoredPosition: {x: 0, y: -0.000030517578}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224272151730405692
|
||||
@@ -2139,14 +2280,17 @@ RectTransform:
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 224988931619594536}
|
||||
- {fileID: 224457627043515580}
|
||||
- {fileID: 224450108705652292}
|
||||
m_Father: {fileID: 224888481017931948}
|
||||
m_RootOrder: 0
|
||||
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: 381.8}
|
||||
m_SizeDelta: {x: 460, y: 350}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 175}
|
||||
m_SizeDelta: {x: 0, y: 350}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224415045131491092
|
||||
RectTransform:
|
||||
@@ -2173,16 +2317,16 @@ RectTransform:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1977378795970684}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 224250538007241578}
|
||||
m_RootOrder: 1
|
||||
m_Father: {fileID: 224292492441239568}
|
||||
m_RootOrder: 2
|
||||
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_AnchoredPosition: {x: 0, y: -0.5}
|
||||
m_SizeDelta: {x: 0, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224457627043515580
|
||||
RectTransform:
|
||||
@@ -2190,12 +2334,12 @@ RectTransform:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1986268301643462}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 224250538007241578}
|
||||
m_RootOrder: 0
|
||||
m_Father: {fileID: 224292492441239568}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -2234,10 +2378,10 @@ RectTransform:
|
||||
m_Father: {fileID: 224888481017931948}
|
||||
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_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 460, y: 360}
|
||||
m_SizeDelta: {x: 0, y: -10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224620536568054620
|
||||
RectTransform:
|
||||
@@ -2377,7 +2521,25 @@ RectTransform:
|
||||
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.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224923893760777956
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1553995320662558}
|
||||
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: 224250538007241578}
|
||||
m_RootOrder: 1
|
||||
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!224 &224932340658346134
|
||||
@@ -2414,8 +2576,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -5, y: 0}
|
||||
m_SizeDelta: {x: 10, y: 360}
|
||||
m_AnchoredPosition: {x: -7, y: 0}
|
||||
m_SizeDelta: {x: 10, y: -10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224954540062687134
|
||||
RectTransform:
|
||||
@@ -2437,3 +2599,21 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: -75, y: -100}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224988931619594536
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1125399514285838}
|
||||
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: 224292492441239568}
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 350, y: 350}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace RothenburgAR
|
||||
public class AppInitializerBehaviour : MonoBehaviour
|
||||
{
|
||||
public Camera UICamera;
|
||||
public Camera UIObjectCamera;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
@@ -20,7 +21,8 @@ namespace RothenburgAR
|
||||
VuforiaARController.Instance.RegisterVuforiaInitializedCallback(InitializeData);
|
||||
|
||||
UIManager.Instance.Initialize();
|
||||
UIManager.Instance.SetUiCamera(UICamera);
|
||||
UIManager.Instance.UICamera = UICamera;
|
||||
UIManager.Instance.UIObjectCamera = UIObjectCamera;
|
||||
UIManager.Instance.InitStartView();
|
||||
|
||||
InputManager.Instance.Initialize();
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace RothenburgAR.UI
|
||||
public class DetailsPanelBehaviour : MonoBehaviour
|
||||
{
|
||||
public TextMeshProUGUI DetailsText;
|
||||
public ScrollRect DetailsTextScrollRect;
|
||||
public DetailsModelBehaviour DetailsModel;
|
||||
|
||||
private void Start()
|
||||
@@ -33,27 +34,21 @@ namespace RothenburgAR.UI
|
||||
public void SetText(String el)
|
||||
{
|
||||
DetailsText.text = el;
|
||||
SetBoxHeight();
|
||||
|
||||
// Scroll to top
|
||||
DetailsTextScrollRect.normalizedPosition = new Vector2(0, 1);
|
||||
}
|
||||
|
||||
public void SetModel(GameObject modelGo)
|
||||
{
|
||||
RemoveModel();
|
||||
modelGo.transform.SetParent(DetailsModel.transform, false);
|
||||
|
||||
|
||||
// Apply rotation to the object
|
||||
//var animator = modelGo.AddComponent<Animator>();
|
||||
//animator.runtimeAnimatorController = Resources.Load("UI/InfoModelAnimatorController") as RuntimeAnimatorController;
|
||||
//animator.speed = 0.3f;
|
||||
//animator.Play("poi_model_rotation");
|
||||
|
||||
modelGo.transform.SetParent(UIManager.Instance.UIObjectCamera.transform, false);
|
||||
modelGo.transform.localPosition += new Vector3(0, 0, 450);
|
||||
|
||||
_currentDisplayedModelGo = modelGo;
|
||||
DetailsModel.CurrentModel = _currentDisplayedModelGo;
|
||||
|
||||
DetailsModel.gameObject.SetActive(true);
|
||||
SetBoxHeight();
|
||||
}
|
||||
|
||||
public void SetModelFromPoi(PoiData data)
|
||||
@@ -63,25 +58,13 @@ namespace RothenburgAR.UI
|
||||
{
|
||||
SetModel(data.InstantiateModelPrefab());
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
// ignore, just do not display an object
|
||||
_currentDisplayedModelGo = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetBoxHeight()
|
||||
{
|
||||
var rt = GetComponent<RectTransform>();
|
||||
var modelHeight = 0.0f;
|
||||
|
||||
if (HasModel)
|
||||
modelHeight = DetailsModel.GetComponent<LayoutElement>().minHeight;
|
||||
|
||||
var height = Math.Max(120, DetailsText.preferredHeight + modelHeight);
|
||||
rt.sizeDelta = new Vector2(rt.sizeDelta.x, height);
|
||||
}
|
||||
|
||||
|
||||
public void RemoveModel()
|
||||
{
|
||||
DetailsModel.gameObject.SetActive(false);
|
||||
@@ -91,7 +74,6 @@ namespace RothenburgAR.UI
|
||||
Destroy(_currentDisplayedModelGo);
|
||||
_currentDisplayedModelGo = null;
|
||||
}
|
||||
SetBoxHeight();
|
||||
}
|
||||
|
||||
public void UpdateOpeningAnimation(Vector3 position)
|
||||
@@ -157,5 +139,10 @@ namespace RothenburgAR.UI
|
||||
{
|
||||
DetailsModel.EndRotateModelByDrag(data as PointerEventData);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
RemoveModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,8 @@ namespace RothenburgAR.UI
|
||||
public class UIManager : Singleton<UIManager>
|
||||
{
|
||||
private ARViewBehaviour _ARViewBehaviour;
|
||||
private Camera _uiCamera;
|
||||
public Camera UICamera;
|
||||
public Camera UIObjectCamera;
|
||||
|
||||
public Boolean IsARViewVisible
|
||||
{
|
||||
@@ -160,7 +161,7 @@ namespace RothenburgAR.UI
|
||||
Canvas c = _currentViewInstance.GetComponentInChildren<Canvas>();
|
||||
if (c != null)
|
||||
{
|
||||
c.worldCamera = _uiCamera;
|
||||
c.worldCamera = UICamera;
|
||||
c.renderMode = RenderMode.ScreenSpaceCamera;
|
||||
c.planeDistance = 0.5f;
|
||||
}
|
||||
@@ -184,10 +185,5 @@ namespace RothenburgAR.UI
|
||||
_currentView.OnUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetUiCamera(Camera uiCamera)
|
||||
{
|
||||
_uiCamera = uiCamera;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,6 +141,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
UICamera: {fileID: 1931338041}
|
||||
UIObjectCamera: {fileID: 1230455931}
|
||||
--- !u!4 &220850826
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -377,7 +378,7 @@ Camera:
|
||||
height: 1
|
||||
near clip plane: 0.1
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
field of view: 40
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 2
|
||||
|
||||
Reference in New Issue
Block a user