diff --git a/Assets/FungusExamples/InputText.meta b/Assets/FungusExamples/EnterName.meta similarity index 100% rename from Assets/FungusExamples/InputText.meta rename to Assets/FungusExamples/EnterName.meta diff --git a/Assets/FungusExamples/InputText/InputText.unity b/Assets/FungusExamples/EnterName/EnterName.unity similarity index 70% rename from Assets/FungusExamples/InputText/InputText.unity rename to Assets/FungusExamples/EnterName/EnterName.unity index 33ab784e..a32ca7ed 100644 --- a/Assets/FungusExamples/InputText/InputText.unity +++ b/Assets/FungusExamples/EnterName/EnterName.unity @@ -172,6 +172,19 @@ GameObject: - 114: {fileID: 163283986} - 114: {fileID: 163283989} - 114: {fileID: 163283990} + - 114: {fileID: 163283992} + - 114: {fileID: 163283993} + - 114: {fileID: 163283991} + - 114: {fileID: 163283994} + - 114: {fileID: 163283996} + - 114: {fileID: 163283995} + - 114: {fileID: 163283999} + - 114: {fileID: 163283998} + - 114: {fileID: 163283997} + - 114: {fileID: 163284002} + - 114: {fileID: 163284001} + - 114: {fileID: 163284000} + - 114: {fileID: 163284003} m_Layer: 0 m_Name: Flowchart m_TagString: Untagged @@ -199,24 +212,36 @@ MonoBehaviour: zoom: 1 scrollViewRect: serializedVersion: 2 - x: -343 - y: -340 - width: 1114 - height: 859 + x: -378 + y: -354 + width: 1243 + height: 1069 selectedBlock: {fileID: 163283984} - selectedCommands: [] + selectedCommands: + - {fileID: 163284003} variables: - {fileID: 163283985} - description: 'Shows how to read text from a UI input field, + description: 'This example shows how to write to a 3D Text Mesh using - store the value in a string variable, and then use the + the Writer component and a Write command. - string variable in a Say command.' + + It also shows how to read text from a UI input field, + + store the entered value in a string variable, and then use the + + string variable in Write and Say commands. + + + The input field is set to be non interactable once the player + + has entered their name using the Set Interactable command.' stepPause: 0 colorCommands: 1 hideComponents: 1 saveSelection: 1 localizationId: + hideCommands: [] --- !u!114 &163283984 MonoBehaviour: m_ObjectHideFlags: 2 @@ -231,16 +256,21 @@ MonoBehaviour: m_EditorClassIdentifier: nodeRect: serializedVersion: 2 - x: 67 - y: 70 + x: 212 + y: 180 width: 120 height: 40 itemId: 0 blockName: ReadText - description: + description: Handles user clicking the ok button eventHandler: {fileID: 163283990} commandList: - {fileID: 163283988} + - {fileID: 163284003} + - {fileID: 163283994} + - {fileID: 163283999} + - {fileID: 163283998} + - {fileID: 163283997} - {fileID: 163283986} - {fileID: 163283989} --- !u!114 &163283985 @@ -255,7 +285,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: scope: 0 - key: EnteredText + key: PlayerName value: --- !u!114 &163283986 MonoBehaviour: @@ -271,7 +301,7 @@ MonoBehaviour: itemId: 2 errorMessage: indentLevel: 0 - storyText: 'You entered: {$EnteredText}' + storyText: Hi {$PlayerName}, how are you today? description: character: {fileID: 0} portrait: {fileID: 0} @@ -331,7 +361,7 @@ MonoBehaviour: booleanVal: 0 --- !u!114 &163283990 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 163283982} @@ -342,6 +372,263 @@ MonoBehaviour: m_EditorClassIdentifier: parentBlock: {fileID: 163283984} targetButton: {fileID: 373310154} +--- !u!114 &163283991 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad2261dbe44de43a980e6f7c77c88f7f, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 + errorMessage: + indentLevel: 0 + textObject: {fileID: 717539585} + text: + stringRef: {fileID: 0} + stringVal: Hello! Please enter your name + description: + clearText: 1 + waitUntilFinished: 1 + textColor: 0 + setAlpha: + floatRef: {fileID: 0} + floatVal: 1 + setColor: + colorRef: {fileID: 0} + colorVal: {r: 1, g: 1, b: 1, a: 1} +--- !u!114 &163283992 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 60 + y: 60 + width: 120 + height: 40 + itemId: 5 + blockName: Start + description: + eventHandler: {fileID: 163283993} + commandList: + - {fileID: 163283996} + - {fileID: 163283991} + - {fileID: 163283995} +--- !u!114 &163283993 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 163283992} +--- !u!114 &163283994 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad2261dbe44de43a980e6f7c77c88f7f, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 7 + errorMessage: + indentLevel: 0 + textObject: {fileID: 717539585} + text: + stringRef: {fileID: 0} + stringVal: Nice to meet you {$PlayerName} + description: + clearText: 1 + waitUntilFinished: 1 + textColor: 0 + setAlpha: + floatRef: {fileID: 0} + floatVal: 1 + setColor: + colorRef: {fileID: 0} + colorVal: {r: 1, g: 1, b: 1, a: 1} +--- !u!114 &163283995 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbd8c931f22994b9d90e2037fffaa770, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + errorMessage: + indentLevel: 0 + targetGameObject: {fileID: 1538358643} + activeState: + booleanRef: {fileID: 0} + booleanVal: 1 +--- !u!114 &163283996 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbd8c931f22994b9d90e2037fffaa770, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 8 + errorMessage: + indentLevel: 0 + targetGameObject: {fileID: 1538358643} + activeState: + booleanRef: {fileID: 0} + booleanVal: 0 +--- !u!114 &163283997 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbd8c931f22994b9d90e2037fffaa770, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 12 + errorMessage: + indentLevel: 0 + targetGameObject: {fileID: 1538358643} + activeState: + booleanRef: {fileID: 0} + booleanVal: 0 +--- !u!114 &163283998 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 11 + errorMessage: + indentLevel: 0 + duration: 2 +--- !u!114 &163283999 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ab0d0ed4a2ca94c81a230a0ecce6e6e4, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 10 + errorMessage: + indentLevel: 0 + targetObjects: + - {fileID: 1229749171} + - {fileID: 373310152} + interactableState: + booleanRef: {fileID: 0} + booleanVal: 0 +--- !u!114 &163284000 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 050fb9e6e72f442b3b883da8a965bdeb, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 14 + errorMessage: + indentLevel: 0 + targetFlowchart: {fileID: 0} + targetBlock: {fileID: 163283984} + callMode: 0 +--- !u!114 &163284001 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5942d3ed820e745b2beca47228bac126, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 163284002} + targetInputField: {fileID: 1229749173} +--- !u!114 &163284002 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 42 + y: 179 + width: 120 + height: 40 + itemId: 13 + blockName: End Edit + description: 'Handles user pressing + + enter after typing in name' + eventHandler: {fileID: 163284001} + commandList: + - {fileID: 163284000} +--- !u!114 &163284003 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 163283982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78c0367bf08d147bd80b5454de50e9d4, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 15 + errorMessage: + indentLevel: 0 + targetTextObject: {fileID: 749435734} + text: + stringRef: {fileID: 0} + stringVal: 'Player Name: {$PlayerName}' + description: + _textObjectObsolete: {fileID: 0} --- !u!1 &373310152 GameObject: m_ObjectHideFlags: 0 @@ -598,6 +885,98 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 +--- !u!1 &717539585 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 717539588} + - 23: {fileID: 717539587} + - 102: {fileID: 717539586} + - 114: {fileID: 717539589} + m_Layer: 0 + m_Name: TextMesh + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!102 &717539586 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 717539585} + m_Text: Hello World + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 0 + m_Alignment: 0 + m_TabSize: 4 + m_FontSize: 30 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &717539587 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 717539585} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_ImportantGI: 0 + m_AutoUVMaxDistance: .5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!4 &717539588 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 717539585} + m_LocalRotation: {x: -.141357124, y: -.359562516, z: -.00671201246, w: .922327459} + m_LocalPosition: {x: -5.17288876, y: 2.77179241, z: -1.99707866} + m_LocalScale: {x: .35265398, y: .35265395, z: 1.76326978} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 +--- !u!114 &717539589 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 717539585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a676940fce6344af1a70043b089a6c14, type: 3} + m_Name: + m_EditorClassIdentifier: + targetTextObject: {fileID: 0} + writingSpeed: 60 + punctuationPause: .25 + hiddenTextColor: {r: 0, g: .433113754, b: .860294104, a: 1} + writeWholeWords: 0 + forceRichText: 1 --- !u!1 &723295648 GameObject: m_ObjectHideFlags: 0 @@ -657,7 +1036,7 @@ Camera: near clip plane: .300000012 far clip plane: 1000 field of view: 60 - orthographic: 1 + orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: @@ -753,6 +1132,80 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 747531185} +--- !u!1 &749435734 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 749435735} + - 222: {fileID: 749435737} + - 114: {fileID: 749435736} + m_Layer: 5 + m_Name: PlayerNameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &749435735 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 749435734} + 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: 1538358644} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 193, y: -46} + m_SizeDelta: {x: 349, y: 59} + m_Pivot: {x: .5, y: .5} +--- !u!114 &749435736 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 749435734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .903448224, g: 1, b: 0, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Player Name: None + +' +--- !u!222 &749435737 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 749435734} --- !u!1 &974633902 GameObject: m_ObjectHideFlags: 1 @@ -1023,6 +1476,7 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 747531186} + - {fileID: 749435735} m_Father: {fileID: 0} m_RootOrder: 2 m_AnchorMin: {x: 0, y: 0} diff --git a/Assets/FungusExamples/InputText/InputText.unity.meta b/Assets/FungusExamples/EnterName/EnterName.unity.meta similarity index 64% rename from Assets/FungusExamples/InputText/InputText.unity.meta rename to Assets/FungusExamples/EnterName/EnterName.unity.meta index 37b9d7ef..c5a94889 100644 --- a/Assets/FungusExamples/InputText/InputText.unity.meta +++ b/Assets/FungusExamples/EnterName/EnterName.unity.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 5e4fd7512414a443da20c316b2e0c6db -timeCreated: 1440775895 +guid: 1007fbdf3eb3244088015ada3e0bfaa4 +timeCreated: 1442413549 licenseType: Free DefaultImporter: userData: