Browse Source

Added localisation example

master
Chris Gregan 9 years ago
parent
commit
30d122a94a
  1. 0
      Assets/FungusExamples/FungusLua.meta
  2. 9
      Assets/FungusExamples/FungusLua/HelloWorld.meta
  3. 70
      Assets/FungusExamples/FungusLua/HelloWorld/HelloWorld.unity
  4. 0
      Assets/FungusExamples/FungusLua/HelloWorld/HelloWorld.unity.meta
  5. 9
      Assets/FungusExamples/FungusLua/Localization.meta
  6. 632
      Assets/FungusExamples/FungusLua/Localization/Localization.unity
  7. 8
      Assets/FungusExamples/FungusLua/Localization/Localization.unity.meta
  8. 7
      Assets/FungusExamples/FungusLua/Localization/stringtable.txt
  9. 8
      Assets/FungusExamples/FungusLua/Localization/stringtable.txt.meta
  10. 0
      Assets/FungusExamples/FungusLua/Narrative.unity
  11. 0
      Assets/FungusExamples/FungusLua/Narrative.unity.meta
  12. 0
      Assets/FungusExamples/FungusLua/Scripts.meta
  13. 0
      Assets/FungusExamples/FungusLua/Scripts/InfoText.cs
  14. 0
      Assets/FungusExamples/FungusLua/Scripts/InfoText.cs.meta
  15. 0
      Assets/FungusExamples/FungusLua/Trigger.unity
  16. 0
      Assets/FungusExamples/FungusLua/Trigger.unity.meta

0
Assets/FungusExamples/Lua.meta → Assets/FungusExamples/FungusLua.meta

9
Assets/FungusExamples/FungusLua/HelloWorld.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5d2609b67f5f74f02b283d112721136b
folderAsset: yes
timeCreated: 1462353529
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

70
Assets/FungusExamples/Lua/HelloWorld.unity → Assets/FungusExamples/FungusLua/HelloWorld/HelloWorld.unity

@ -85,6 +85,54 @@ NavMeshSettings:
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &1314575962
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1314575964}
- 114: {fileID: 1314575963}
m_Layer: 0
m_Name: InfoText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1314575963
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1314575962}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c0cbb63e218a4414a796a60ffe37dd3, type: 3}
m_Name:
m_EditorClassIdentifier:
info: 'A simple example of using a LuaScript object to display "Hello World" by
printing to the console and also by using the say() function.
Create a LuaScript object via Tools > Fungus > Create > LuaScript
Notice that Fungus automatically creates the LuaEnvironment and SayDialog objects
automatically if none are already present in the scene when you run it.'
--- !u!4 &1314575964
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1314575962}
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: 0}
m_RootOrder: 2
--- !u!1 &1524657877
GameObject:
m_ObjectHideFlags: 0
@ -97,7 +145,6 @@ GameObject:
- 92: {fileID: 1524657880}
- 124: {fileID: 1524657879}
- 81: {fileID: 1524657878}
- 114: {fileID: 1524657883}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@ -172,27 +219,6 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &1524657883
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1524657877}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c0cbb63e218a4414a796a60ffe37dd3, type: 3}
m_Name:
m_EditorClassIdentifier:
info: 'A simple example of using a LuaScript object
to display "Hello World" by printing to the
console and also by using the say() function.
Notice that Fungus automatically creates the
LuaEnvironment, SayDialog objects automatically if none are already present.'
--- !u!1 &1590446708
GameObject:
m_ObjectHideFlags: 0

0
Assets/FungusExamples/Lua/HelloWorld.unity.meta → Assets/FungusExamples/FungusLua/HelloWorld/HelloWorld.unity.meta

9
Assets/FungusExamples/FungusLua/Localization.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7f083399d26074b678243198be891623
folderAsset: yes
timeCreated: 1462353649
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

632
Assets/FungusExamples/FungusLua/Localization/Localization.unity

@ -0,0 +1,632 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &27151840
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 27151845}
- 20: {fileID: 27151844}
- 92: {fileID: 27151843}
- 124: {fileID: 27151842}
- 81: {fileID: 27151841}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &27151841
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 27151840}
m_Enabled: 1
--- !u!124 &27151842
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 27151840}
m_Enabled: 1
--- !u!92 &27151843
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 27151840}
m_Enabled: 1
--- !u!20 &27151844
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 27151840}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &27151845
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 27151840}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &295881417
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100640, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 295881420}
- 114: {fileID: 295881419}
- 114: {fileID: 295881418}
m_Layer: 0
m_Name: LuaEnvironment
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &295881418
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11486636, guid: 49031c561e16d4fcf91c12153f8e0b25,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 295881417}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c10f0b861365b42b0928858f7b086ff3, type: 3}
m_Name:
m_EditorClassIdentifier:
fungusModule: 0
activeLanguage: en
stringTables:
- {fileID: 4900000, guid: 2b873932e07a74706a6b54d7ce17a53b, type: 3}
registerTypes:
- {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3}
- {fileID: 4900000, guid: 93fddea8208764a2dbb189cc238aed40, type: 3}
--- !u!114 &295881419
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11493126, guid: 49031c561e16d4fcf91c12153f8e0b25,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 295881417}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
m_Name:
m_EditorClassIdentifier:
remoteDebugger: 0
--- !u!4 &295881420
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 295881417}
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: 0}
m_RootOrder: 1
--- !u!1 &869541708
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 869541712}
- 114: {fileID: 869541711}
- 114: {fileID: 869541710}
- 114: {fileID: 869541709}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &869541709
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 869541708}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ForceModuleActive: 0
--- !u!114 &869541710
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 869541708}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &869541711
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 869541708}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 5
--- !u!4 &869541712
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 869541708}
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: 0}
m_RootOrder: 5
--- !u!1 &931488961
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 931488963}
- 114: {fileID: 931488962}
m_Layer: 0
m_Name: _FungusState
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &931488962
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 931488961}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
selectedFlowchart: {fileID: 1000755631}
--- !u!4 &931488963
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 931488961}
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: 0}
m_RootOrder: 6
--- !u!1 &1000755630
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1000755635}
- 114: {fileID: 1000755631}
- 114: {fileID: 1000755633}
- 114: {fileID: 1000755634}
- 114: {fileID: 1000755632}
m_Layer: 0
m_Name: Flowchart
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1000755631
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1000755630}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
blockViewHeight: 400
zoom: 1
scrollViewRect:
serializedVersion: 2
x: -343
y: -340
width: 1114
height: 859
selectedBlock: {fileID: 1000755633}
selectedCommands:
- {fileID: 1000755632}
variables: []
description:
stepPause: 0
colorCommands: 1
hideComponents: 1
saveSelection: 1
localizationId:
showLineNumbers: 0
hideCommands: []
--- !u!114 &1000755632
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1000755630}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2fab8abf0343545abbfebd9a7b7b34bd, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 1
errorMessage:
indentLevel: 0
logType: 0
logMessage:
stringRef: {fileID: 0}
stringVal: '{$hello_world}'
--- !u!114 &1000755633
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1000755630}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3}
m_Name:
m_EditorClassIdentifier:
nodeRect:
serializedVersion: 2
x: 67
y: 70
width: 120
height: 40
itemId: 0
blockName: Start
description:
eventHandler: {fileID: 1000755634}
commandList:
- {fileID: 1000755632}
--- !u!114 &1000755634
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1000755630}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3}
m_Name:
m_EditorClassIdentifier:
parentBlock: {fileID: 1000755633}
--- !u!4 &1000755635
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1000755630}
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: 0}
m_RootOrder: 3
--- !u!1 &1304857493
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1304857494}
- 114: {fileID: 1304857495}
m_Layer: 0
m_Name: InfoText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1304857494
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1304857493}
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: 0}
m_RootOrder: 4
--- !u!114 &1304857495
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1304857493}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c0cbb63e218a4414a796a60ffe37dd3, type: 3}
m_Name:
m_EditorClassIdentifier:
info: 'This example shows how to use a string table to localize text for different
languages.
A string table JSON file has been added to the LuaUtils component in the LuaEnvironment
object.
The LuaScript object shows how to substitute in a localization string key and
change the active language in Lua.
The Flowchart object demonstrates using the same {$VarName} syntax in Fungus commands
like Say, Menu, Debug Log, etc. to substitute in localized strings.
'
--- !u!1 &1834004033
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 139298, guid: c356764ac08ce4af2806a601a4f1e6e9, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1834004036}
- 114: {fileID: 1834004035}
- 114: {fileID: 1834004034}
m_Layer: 0
m_Name: LuaScript
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1834004034
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11472914, guid: c356764ac08ce4af2806a601a4f1e6e9,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1834004033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 446caeace65234baaacd52095d24f101, type: 3}
m_Name:
m_EditorClassIdentifier:
luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- First we use variable substitution to
-- substitute the localized version of the
-- ''hello_world'' string from the string table
-- Show English version
setlanguage("en")
say("{$hello_world}")
-- Show French version
setlanguage("fr")
say("{$hello_world}")
-- We can also use the sub() function to do the
-- same substitution and return a Lua
-- string variable
-- Show German version
setlanguage("de")
local s = sub("{$hello_world}")
say(s)
'
runAsCoroutine: 1
--- !u!114 &1834004035
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11446228, guid: c356764ac08ce4af2806a601a4f1e6e9,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1834004033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6ee79785811ba49399c1b56d7309e3df, type: 3}
m_Name:
m_EditorClassIdentifier:
executeAfterTime: 1
repeatExecuteTime: 1
repeatEveryTime: 1
executeAfterFrames: 1
repeatExecuteFrame: 1
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
executeMethodName: OnExecute
--- !u!4 &1834004036
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 449874, guid: c356764ac08ce4af2806a601a4f1e6e9, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1834004033}
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: 0}
m_RootOrder: 2

8
Assets/FungusExamples/FungusLua/Localization/Localization.unity.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7ff80aac95a9844bc918c25d2e99516c
timeCreated: 1462353745
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

7
Assets/FungusExamples/FungusLua/Localization/stringtable.txt

@ -0,0 +1,7 @@
{
"hello_world" : {
"en" : "Hello world!",
"fr" : "Bonjour le monde!",
"de" : "Hallo Welt!"
}
}

8
Assets/FungusExamples/FungusLua/Localization/stringtable.txt.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b873932e07a74706a6b54d7ce17a53b
timeCreated: 1462353779
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/FungusExamples/Lua/Narrative.unity → Assets/FungusExamples/FungusLua/Narrative.unity

0
Assets/FungusExamples/Lua/Narrative.unity.meta → Assets/FungusExamples/FungusLua/Narrative.unity.meta

0
Assets/FungusExamples/Lua/Scripts.meta → Assets/FungusExamples/FungusLua/Scripts.meta

0
Assets/FungusExamples/Lua/Scripts/InfoText.cs → Assets/FungusExamples/FungusLua/Scripts/InfoText.cs

0
Assets/FungusExamples/Lua/Scripts/InfoText.cs.meta → Assets/FungusExamples/FungusLua/Scripts/InfoText.cs.meta

0
Assets/FungusExamples/Lua/Trigger.unity → Assets/FungusExamples/FungusLua/Trigger.unity

0
Assets/FungusExamples/Lua/Trigger.unity.meta → Assets/FungusExamples/FungusLua/Trigger.unity.meta

Loading…
Cancel
Save