Skip to content

Commit

Permalink
Merge pull request #1807 from Microsoft/Stabilization
Browse files Browse the repository at this point in the history
Final merge of Stabilization into master
  • Loading branch information
StephenHodgson authored Mar 8, 2018
2 parents 3dfeab5 + b622af0 commit 168fd6f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 36 deletions.
57 changes: 31 additions & 26 deletions Assets/HoloToolkit-Examples/UX/Prefabs/ButtonTraditional.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@ Prefab:
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1723860127229764}
m_IsPrefabParent: 1
--- !u!1 &1222088547826978
--- !u!1 &1203363007505902
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4130313901698084}
- component: {fileID: 33256254154749082}
- component: {fileID: 23208368517671954}
- component: {fileID: 4737169607854254}
- component: {fileID: 23392110358088574}
- component: {fileID: 102860042799533698}
m_Layer: 0
m_Name: Border
m_Name: 3DTextPrefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1363220036042144
--- !u!1 &1222088547826978
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4579364449369966}
- component: {fileID: 23830137844614850}
- component: {fileID: 102305476173212582}
- component: {fileID: 4130313901698084}
- component: {fileID: 33256254154749082}
- component: {fileID: 23208368517671954}
m_Layer: 0
m_Name: 3DTextPrefab
m_Name: Border
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -105,18 +105,18 @@ Transform:
m_LocalPosition: {x: -0.2367169, y: -0.081, z: 1.953}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4579364449369966}
- {fileID: 4737169607854254}
- {fileID: 4130313901698084}
- {fileID: 4892952885209378}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4579364449369966
--- !u!4 &4737169607854254
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1363220036042144}
m_GameObject: {fileID: 1203363007505902}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.19220805, y: -0.04678178, z: 0.035821557}
m_LocalScale: {x: 0.005, y: 0.005, z: 0.005}
Expand Down Expand Up @@ -146,6 +146,7 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand All @@ -161,6 +162,7 @@ MeshRenderer:
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand All @@ -169,30 +171,32 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23518754739827216
--- !u!23 &23392110358088574
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1788152682178662}
m_GameObject: {fileID: 1203363007505902}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 078f88c13cad1ae4a8004ac6e600f242, type: 2}
- {fileID: 2100000, guid: 1017ef825d041c749bab30bf03aca0d3, 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_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand All @@ -201,30 +205,32 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23830137844614850
--- !u!23 &23518754739827216
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1363220036042144}
m_GameObject: {fileID: 1788152682178662}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 86574c70442309b45be5a1c37a37a40b, type: 3}
- {fileID: 2100000, guid: 078f88c13cad1ae4a8004ac6e600f242, 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: 0
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
Expand Down Expand Up @@ -288,13 +294,13 @@ Animator:
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
--- !u!102 &102305476173212582
--- !u!102 &102860042799533698
TextMesh:
serializedVersion: 3
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1363220036042144}
m_GameObject: {fileID: 1203363007505902}
m_Text: Button
m_OffsetZ: 0
m_CharacterSize: 1
Expand All @@ -320,9 +326,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e77a98cf320fe9340a55eecfe4567ca4, type: 3}
m_Name:
m_EditorClassIdentifier:
FilterTag:
Tag: Default
ButtonState: 4
ButtonPressFilter: 1
RequireGaze: 1
MainCollider: {fileID: 0}
MainRenderer: {fileID: 0}
Expand All @@ -337,6 +342,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 728fec8e9feecf64f933543126cbecae, type: 3}
m_Name:
m_EditorClassIdentifier:
TargetAnimator: {fileID: 95552014740733416}
AnimActions:
- ButtonState: 0
ParamName: State
Expand Down Expand Up @@ -380,4 +386,3 @@ MonoBehaviour:
IntValue: 5
FloatValue: 0
InvalidParam: 0
TargetAnimator: {fileID: 95552014740733416}
18 changes: 8 additions & 10 deletions Assets/HoloToolkit/UX/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Useful common UX controls that you can leverage in your application.



### [Materials](Materials)

Materials used in prefabs
Expand All @@ -12,7 +10,7 @@ Materials used in prefabs

Material for 3DTextPrefab with occlusion support. Requires 3DTextShader.shader

![Default Font material vs 3DTextSegoeUI material](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions06.png)
![Default Font material vs 3DTextSegoeUI material](../../../External/ReadMeImages/TextPrefabInstructions06.png)

### [Prefabs](Prefabs)

Expand All @@ -28,19 +26,19 @@ UI Text Mesh prefab with optimized scaling factor at 2-meter distance. (Please r

**IMPORTANT: Text Prefab uses open source font 'Selawik'. To use Text Prefab with different font, please import font file and follow the instruction below. Below example shows how to use 'Segoe UI' font with Text Prefab.**

![Importing Segoe UI font file](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions01.png)
![Importing Segoe UI font file](../../../External/ReadMeImages/TextPrefabInstructions01.png)

1. Assign font texture to 3DTextSegoeUI.mat material.
![Assigning font texture](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions02.png)
![Assigning font texture](External/ReadMeImages/TextPrefabInstructions02.png)

2. On 3DTextSegoeUI.mat material, select the shader Custom/3DTextShader.shader.
![Assigning shader](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions03.png)
![Assigning shader](../../../External/ReadMeImages/TextPrefabInstructions03.png)

3. Assign Segoe UI font and 3DTextSegoeUI material to the text components in the prefabs.
![Assigning font file and material](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions04.png)
![Assigning font file and material](../../../External/ReadMeImages/TextPrefabInstructions04.png)

4. Follow the same steps for the sample text layout prefabs in [HoloToolkit-Examples\Text](../..//HoloToolkit-Examples/Text)
![Sample layout prefabs](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions05.png)
4. Follow the same steps for the sample text layout prefabs in [HoloToolkit-Examples\Text](../../HoloToolkit-Examples/UX/Prefabs)
![Sample layout prefabs](../../../External/ReadMeImages/TextPrefabInstructions05.png)

**Working with Fonts in Unity**

Expand All @@ -60,7 +58,7 @@ When adding a UI or canvas based Text element to a scene, the size disparity is

**Disclaimer**: The default value of any font may be effected by the texture size of that font or how the font was imported into Unity. These tests were performed based on the default Arial font in Unity, as well as one other imported font.

![Font size with scaling factors](https://github.com/cre8ivepark/HoloToolkit-Unity/blob/master/External/ReadMeImages/TextPrefabInstructions07.png)
![Font size with scaling factors](../../../External/ReadMeImages/TextPrefabInstructions07.png)

### [Scripts](Scripts)

Expand Down

0 comments on commit 168fd6f

Please sign in to comment.