Implemented first Version of automatically scaling Exhibit Title
This commit is contained in:
@@ -11,6 +11,24 @@ Prefab:
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1561232343491480}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1128853001878032
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 224366238922922626}
|
||||
- component: {fileID: 222423545703559624}
|
||||
- component: {fileID: 114807976848859904}
|
||||
- component: {fileID: 114079883078300150}
|
||||
m_Layer: 0
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1153460862401542
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -23,6 +41,7 @@ GameObject:
|
||||
- component: {fileID: 23656124227573408}
|
||||
- component: {fileID: 222811054124192620}
|
||||
- component: {fileID: 114580846098669954}
|
||||
- component: {fileID: 114748046949405592}
|
||||
m_Layer: 0
|
||||
m_Name: TextMeshPro
|
||||
m_TagString: Untagged
|
||||
@@ -30,19 +49,19 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1391032952300248
|
||||
--- !u!1 &1508351644051650
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4391032952300248}
|
||||
- component: {fileID: 33391032952300248}
|
||||
- component: {fileID: 64391032952300248}
|
||||
- component: {fileID: 23391032952300248}
|
||||
- component: {fileID: 224381549858292536}
|
||||
- component: {fileID: 222865097206419458}
|
||||
- component: {fileID: 114464711075482232}
|
||||
- component: {fileID: 114345769449037722}
|
||||
m_Layer: 0
|
||||
m_Name: Background
|
||||
m_Name: PoiSpacer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -55,8 +74,11 @@ GameObject:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4709637294427056}
|
||||
- component: {fileID: 224308775056715718}
|
||||
- component: {fileID: 114416352051726708}
|
||||
- component: {fileID: 223073397320722684}
|
||||
- component: {fileID: 114964939743161744}
|
||||
- component: {fileID: 114811101551483864}
|
||||
m_Layer: 0
|
||||
m_Name: ExhibitTitle
|
||||
m_TagString: Untagged
|
||||
@@ -64,66 +86,6 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4391032952300248
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1391032952300248}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0.01}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4709637294427056}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4709637294427056
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1561232343491480}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 224646014036279432}
|
||||
- {fileID: 4391032952300248}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!23 &23391032952300248
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1391032952300248}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 184173fb9a2399341882a894edcac032, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!23 &23656124227573408
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -133,6 +95,7 @@ MeshRenderer:
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
@@ -148,6 +111,7 @@ MeshRenderer:
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
@@ -163,27 +127,44 @@ MeshFilter:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1153460862401542}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!33 &33391032952300248
|
||||
MeshFilter:
|
||||
--- !u!114 &114079883078300150
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1391032952300248}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!64 &64391032952300248
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1391032952300248}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_GameObject: {fileID: 1128853001878032}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Convex: 0
|
||||
m_InflateMesh: 0
|
||||
m_SkinWidth: 0.01
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 1
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!114 &114345769449037722
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1508351644051650}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: 0.15
|
||||
m_MinHeight: 0.15
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!114 &114416352051726708
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -195,9 +176,36 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: bd0b15f7f87279d44b52fffd4484095b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
BackgroundMeshRenderer: {fileID: 23391032952300248}
|
||||
BackgroundGo: {fileID: 1391032952300248}
|
||||
Background: {fileID: 1128853001878032}
|
||||
PoiSpacer: {fileID: 1508351644051650}
|
||||
Exhibit: {fileID: 0}
|
||||
--- !u!114 &114464711075482232
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1508351644051650}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
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: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &114580846098669954
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -217,7 +225,7 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_text: Title
|
||||
m_text: THIS IS MY TITLE
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 715b80e429c437e40867928a4e1fc975, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 715b80e429c437e40867928a4e1fc975, type: 2}
|
||||
@@ -281,13 +289,13 @@ MonoBehaviour:
|
||||
m_firstVisibleCharacter: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_margin: {x: 0.02, y: 0.02, z: 0.02, w: 0.02}
|
||||
m_textInfo:
|
||||
textComponent: {fileID: 114580846098669954}
|
||||
characterCount: 5
|
||||
characterCount: 16
|
||||
spriteCount: 0
|
||||
spaceCount: 0
|
||||
wordCount: 1
|
||||
spaceCount: 3
|
||||
wordCount: 4
|
||||
linkCount: 0
|
||||
lineCount: 1
|
||||
pageCount: 1
|
||||
@@ -310,12 +318,182 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_maskType: 0
|
||||
--- !u!114 &114748046949405592
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1153460862401542}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: 1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: 1000
|
||||
m_LayoutPriority: 1
|
||||
--- !u!114 &114807976848859904
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1128853001878032}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.88235295, g: 0.9607843, b: 0.99607843, a: 0.7490196}
|
||||
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: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &114811101551483864
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1561232343491480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 3
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
--- !u!114 &114964939743161744
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1561232343491480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!222 &222423545703559624
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1128853001878032}
|
||||
--- !u!222 &222811054124192620
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1153460862401542}
|
||||
--- !u!222 &222865097206419458
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1508351644051650}
|
||||
--- !u!223 &223073397320722684
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1561232343491480}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &224308775056715718
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1561232343491480}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 224381549858292536}
|
||||
- {fileID: 224646014036279432}
|
||||
- {fileID: 224366238922922626}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 90, 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: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224366238922922626
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1128853001878032}
|
||||
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: 224308775056715718}
|
||||
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_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &224381549858292536
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1508351644051650}
|
||||
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: 224308775056715718}
|
||||
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!224 &224646014036279432
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -326,11 +504,11 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0.01}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4709637294427056}
|
||||
m_RootOrder: 0
|
||||
m_Father: {fileID: 224308775056715718}
|
||||
m_RootOrder: 1
|
||||
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_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1, y: 0.15}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
||||
@@ -40,11 +40,12 @@ namespace RothenburgAR.Exhibition
|
||||
TitleBehaviour.Exhibit = this;
|
||||
}
|
||||
|
||||
|
||||
if (newTitle.Rotation.HasValue)
|
||||
TitleBehaviour.transform.localEulerAngles = newTitle.Rotation.Value + new Vector3(90, 0, 0);
|
||||
|
||||
if (newTitle.Position.HasValue)
|
||||
TitleBehaviour.transform.localPosition = newTitle.Position.Value;
|
||||
|
||||
TitleBehaviour.FontSize = newTitle.FontSize;
|
||||
TitleBehaviour.BoxHeight = newTitle.BoxHeight;
|
||||
TitleBehaviour.BoxWidth = newTitle.BoxWidth;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using RothenburgAR.Common;
|
||||
using RothenburgAR.PointOfInterest;
|
||||
using RothenburgAR.UI;
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -8,8 +9,8 @@ namespace RothenburgAR.Exhibition
|
||||
{
|
||||
public class ExhibitTitleBehaviour : MonoBehaviour
|
||||
{
|
||||
public MeshRenderer BackgroundMeshRenderer;
|
||||
public GameObject BackgroundGo;
|
||||
public GameObject Background;
|
||||
public GameObject PoiSpacer;
|
||||
public ExhibitBehaviour Exhibit;
|
||||
|
||||
private PoiBehaviour _descriptionPoiBehaviour;
|
||||
@@ -62,30 +63,28 @@ namespace RothenburgAR.Exhibition
|
||||
|
||||
public void UpdateRect(float width, float height)
|
||||
{
|
||||
return;
|
||||
this.GuiRect.sizeDelta = new Vector2(width, height);
|
||||
if (_descriptionPoiBehaviour != null)
|
||||
{
|
||||
BackgroundMeshRenderer.transform.localScale = new Vector3(width, height, 1.0f);
|
||||
Background.transform.localScale = new Vector3(width, height, 1.0f);
|
||||
_descriptionPoiBehaviour.transform.localPosition = new Vector3(-0.4f, 0f, -0.005f);
|
||||
}
|
||||
else
|
||||
{
|
||||
BackgroundMeshRenderer.transform.localScale = new Vector3(width, height, 1.0f);
|
||||
Background.transform.localScale = new Vector3(width, height, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
CreateBorder();
|
||||
StartCoroutine(CreateBorder());
|
||||
}
|
||||
|
||||
public void SetDescription(TextElement newDescription)
|
||||
{
|
||||
if (_descriptionPoiBehaviour == null)
|
||||
{
|
||||
var push = 0.1f;
|
||||
BackgroundMeshRenderer.transform.localScale += new Vector3(push, 0f, 0f);
|
||||
|
||||
// Create the POI
|
||||
var poiElementPrefab = Resources.Load("Prefabs/POI", typeof(PoiBehaviour));
|
||||
_descriptionPoiBehaviour = Instantiate(poiElementPrefab) as PoiBehaviour;
|
||||
@@ -94,23 +93,17 @@ namespace RothenburgAR.Exhibition
|
||||
|
||||
_descriptionPoiBehaviour.IsTitlePoi = true;
|
||||
var spriteRendererArray = _descriptionPoiBehaviour.gameObject.GetComponentsInChildren<SpriteRenderer>();
|
||||
|
||||
|
||||
foreach (var spriteRender in spriteRendererArray)
|
||||
{
|
||||
spriteRender.material = UIColorSchemeManager.Instance.GetUIMaterial(UIMaterial.BaseOpaque);
|
||||
}
|
||||
|
||||
_descriptionPoiBehaviour.transform.localScale = new Vector3(0.85f, 0.85f, 0.85f);
|
||||
_descriptionPoiBehaviour.transform.SetParent(BackgroundMeshRenderer.transform);
|
||||
|
||||
|
||||
// Set margin of the text element
|
||||
var guiTextMargin = GuiText.margin;
|
||||
guiTextMargin.x = push;
|
||||
GuiText.margin = guiTextMargin;
|
||||
_descriptionPoiBehaviour.transform.SetParent(PoiSpacer.transform);
|
||||
_descriptionPoiBehaviour.transform.localPosition = Vector3.zero;
|
||||
|
||||
// Set position of the POI
|
||||
_descriptionPoiBehaviour.transform.localPosition = new Vector3(-0.5f + push, 0f, -0.005f);
|
||||
_descriptionPoiBehaviour.Exhibit = Exhibit;
|
||||
_descriptionPoiBehaviour.ReferencedID = "TITLE:" + Exhibit.ID;
|
||||
|
||||
@@ -119,39 +112,37 @@ namespace RothenburgAR.Exhibition
|
||||
transformLocalRotation.x = 0f;
|
||||
_descriptionPoiBehaviour.transform.localRotation = transformLocalRotation;
|
||||
}
|
||||
|
||||
|
||||
if (_descriptionPoiData == null)
|
||||
{
|
||||
_descriptionPoiData = new PoiData {ID = "TITLE:" + Exhibit.ID};
|
||||
_descriptionPoiData = new PoiData { ID = "TITLE:" + Exhibit.ID };
|
||||
PoiDataManager.Instance.AddPoiData(_descriptionPoiData);
|
||||
|
||||
}
|
||||
_descriptionPoiData.Description = newDescription;
|
||||
}
|
||||
|
||||
private void CreateBorder()
|
||||
private IEnumerator CreateBorder()
|
||||
{
|
||||
yield return null;
|
||||
var borderContainer = new GameObject("BorderContainer");
|
||||
borderContainer.transform.SetParent(BackgroundGo.transform, true);
|
||||
|
||||
borderContainer.transform.localPosition = Vector3.zero;
|
||||
borderContainer.transform.rotation = Quaternion.identity;
|
||||
borderContainer.transform.localScale = Vector3.one;
|
||||
borderContainer.transform.SetParent(Background.transform, false);
|
||||
|
||||
var outlineRenderer = borderContainer.AddComponent<LineRenderer>();
|
||||
outlineRenderer.useWorldSpace = false;
|
||||
outlineRenderer.useWorldSpace = true;
|
||||
outlineRenderer.startWidth = 0.01f;
|
||||
outlineRenderer.endWidth = 0.01f;
|
||||
|
||||
var size = BackgroundGo.GetComponent<MeshFilter>().mesh.bounds.size;
|
||||
|
||||
Vector3[] corners = new Vector3[4];
|
||||
Background.GetComponent<RectTransform>().GetWorldCorners(corners);
|
||||
|
||||
//produces weird seam at begin/end point, so we'll loop it ourselves by drawing back to topLeft and topRight manually
|
||||
outlineRenderer.loop = false;
|
||||
|
||||
Vector3 topLeft = new Vector3(-size.x / 2, 0, -size.y / 2);
|
||||
Vector3 topRight = new Vector3(size.x / 2, 0, -size.y / 2);
|
||||
Vector3 bottomLeft = new Vector3(-size.x / 2, 0, size.y / 2);
|
||||
Vector3 bottomRight = new Vector3(size.x / 2, 0, size.y / 2);
|
||||
Vector3 topLeft = corners[1];
|
||||
Vector3 topRight = corners[2];
|
||||
Vector3 bottomLeft = corners[0];
|
||||
Vector3 bottomRight = corners[3];
|
||||
outlineRenderer.positionCount = 6;
|
||||
outlineRenderer.SetPosition(0, topLeft);
|
||||
outlineRenderer.SetPosition(1, topRight);
|
||||
|
||||
Reference in New Issue
Block a user