diff --git a/Assets/Fungus/Scripts/Commands/SetVariable.cs b/Assets/Fungus/Scripts/Commands/SetVariable.cs index f9e7cfe5..d55650e1 100644 --- a/Assets/Fungus/Scripts/Commands/SetVariable.cs +++ b/Assets/Fungus/Scripts/Commands/SetVariable.cs @@ -71,6 +71,20 @@ namespace Fungus #endregion + + + #region Editor caches +#if UNITY_EDITOR + protected override void RefreshVariableCache() + { + base.RefreshVariableCache(); + + if(anyVar != null) + anyVar.RefreshVariableCacheHelper(GetFlowchart(), ref referencedVariables); + } +#endif + #endregion Editor caches + #region backwards compat diff --git a/Assets/Fungus/Scripts/Commands/VariableCondition.cs b/Assets/Fungus/Scripts/Commands/VariableCondition.cs index bf0f64f2..2c64b208 100644 --- a/Assets/Fungus/Scripts/Commands/VariableCondition.cs +++ b/Assets/Fungus/Scripts/Commands/VariableCondition.cs @@ -144,6 +144,24 @@ namespace Fungus } + + #region Editor caches +#if UNITY_EDITOR + protected override void RefreshVariableCache() + { + base.RefreshVariableCache(); + + if (conditions != null) + { + foreach (var item in conditions) + { + item.AnyVar.RefreshVariableCacheHelper(GetFlowchart(), ref referencedVariables); + } + } + } +#endif + #endregion Editor caches + #region backwards compat [HideInInspector] diff --git a/Assets/Fungus/Scripts/Components/Variable.cs b/Assets/Fungus/Scripts/Components/Variable.cs index 66841e1f..9e8b297d 100644 --- a/Assets/Fungus/Scripts/Components/Variable.cs +++ b/Assets/Fungus/Scripts/Components/Variable.cs @@ -161,6 +161,12 @@ namespace Fungus /// Not recommended for direct use, primarily intended for use in editor code. /// public abstract object GetValue(); + + //we are required to be on a flowchart so we provide this as a helper + public virtual Flowchart GetFlowchart() + { + return GetComponent(); + } #endregion } diff --git a/Assets/Fungus/Scripts/Utils/AllVariableTypes.cs b/Assets/Fungus/Scripts/Utils/AllVariableTypes.cs index 79f7dbe0..b95ee372 100644 --- a/Assets/Fungus/Scripts/Utils/AllVariableTypes.cs +++ b/Assets/Fungus/Scripts/Utils/AllVariableTypes.cs @@ -57,6 +57,9 @@ namespace Fungus /// /// New types created need to be added to the list below and also to AllVariableTypes and /// AnyVaraibleAndDataPair + /// + /// Note; when using this in a command ensure that RefreshVariableCache is also handled for + /// string var substitution. /// [System.Serializable] public partial struct AnyVariableData @@ -121,6 +124,9 @@ namespace Fungus /// /// New types created need to be added to the list below and also to AllVariableTypes and /// AnyVariableData + /// + /// Note to ensure use of RefreshVariableCacheHelper in commands, see SetVariable for + /// example. /// [System.Serializable] public class AnyVariableAndDataPair @@ -243,9 +249,17 @@ namespace Fungus (anyVar, setOperator) => anyVar.variable.Apply(setOperator, anyVar.data.spriteData.Value)) }, { typeof(StringVariable), new TypeActions( "stringData", - (anyVar, compareOperator) => {return anyVar.variable.Evaluate(compareOperator, anyVar.data.stringData.Value); }, + (anyVar, compareOperator) => + { + var subbedRHS = anyVar.variable.GetFlowchart().SubstituteVariables(anyVar.data.stringData.Value); + return anyVar.variable.Evaluate(compareOperator, subbedRHS); + }, (anyVar) => anyVar.data.stringData.GetDescription(), - (anyVar, setOperator) => anyVar.variable.Apply(setOperator, anyVar.data.stringData.Value)) }, + (anyVar, setOperator) => + { + var subbedRHS = anyVar.variable.GetFlowchart().SubstituteVariables(anyVar.data.stringData.Value); + anyVar.variable.Apply(setOperator, subbedRHS); + })}, { typeof(TextureVariable), new TypeActions( "textureData", (anyVar, compareOperator) => {return anyVar.variable.Evaluate(compareOperator, anyVar.data.textureData.Value); }, @@ -278,6 +292,17 @@ namespace Fungus return variable == this.variable || data.HasReference(variable); } +#if UNITY_EDITOR + public void RefreshVariableCacheHelper(Flowchart f, ref List referencedVariables) + { + if (variable is StringVariable asStringVar && asStringVar != null && !string.IsNullOrEmpty(asStringVar.Value)) + f.DetermineSubstituteVariables(asStringVar.Value, referencedVariables); + + if (!string.IsNullOrEmpty(data.stringData.Value)) + f.DetermineSubstituteVariables(data.stringData.Value, referencedVariables); + } +#endif + public string GetDataDescription() { TypeActions ta = null; diff --git a/Assets/Tests/String SetVar Concat.unity b/Assets/Tests/String SetVar Concat.unity new file mode 100644 index 00000000..815e8d40 --- /dev/null +++ b/Assets/Tests/String SetVar Concat.unity @@ -0,0 +1,1208 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + 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_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + 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} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &88470254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 88470265} + - component: {fileID: 88470264} + - component: {fileID: 88470263} + - component: {fileID: 88470262} + - component: {fileID: 88470261} + - component: {fileID: 88470260} + - component: {fileID: 88470259} + - component: {fileID: 88470258} + - component: {fileID: 88470257} + - component: {fileID: 88470256} + - component: {fileID: 88470255} + - component: {fileID: 88470268} + - component: {fileID: 88470267} + - component: {fileID: 88470266} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &88470255 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8d1a861c2b31cf8488fd9d576d533474, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + indentLevel: 1 + message: + stringRef: {fileID: 0} + stringVal: String Concat in Set has failed! +--- !u!114 &88470256 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + indentLevel: 0 +--- !u!114 &88470257 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 2 + indentLevel: 0 + anyOrAllConditions: 0 + conditions: + - compareOperator: 1 + anyVar: + variable: {fileID: 88470260} + data: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + collectionData: + collectionRef: {fileID: 0} + collectionVal: {fileID: 0} + collider2DData: + collider2DRef: {fileID: 0} + collider2DVal: {fileID: 0} + colliderData: + colliderRef: {fileID: 0} + colliderVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + floatData: + floatRef: {fileID: 0} + floatVal: 0 + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + integerData: + integerRef: {fileID: 0} + integerVal: 0 + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + matrix4x4Data: + matrix4x4Ref: {fileID: 0} + matrix4x4Val: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + quaternionData: + quaternionRef: {fileID: 0} + quaternionVal: {x: 0, y: 0, z: 0, w: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + rigidbodyData: + rigidbodyRef: {fileID: 0} + rigidbodyVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + stringData: + stringRef: {fileID: 0} + stringVal: Hello, World! + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} + vector4Data: + vector4Ref: {fileID: 0} + vector4Val: {x: 0, y: 0, z: 0, w: 0} + compareOperator: 0 + anyVar: + variable: {fileID: 0} + data: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + collectionData: + collectionRef: {fileID: 0} + collectionVal: {fileID: 0} + collider2DData: + collider2DRef: {fileID: 0} + collider2DVal: {fileID: 0} + colliderData: + colliderRef: {fileID: 0} + colliderVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + floatData: + floatRef: {fileID: 0} + floatVal: 0 + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + integerData: + integerRef: {fileID: 0} + integerVal: 0 + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + matrix4x4Data: + matrix4x4Ref: {fileID: 0} + matrix4x4Val: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + quaternionData: + quaternionRef: {fileID: 0} + quaternionVal: {x: 0, y: 0, z: 0, w: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + rigidbodyData: + rigidbodyRef: {fileID: 0} + rigidbodyVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + stringData: + stringRef: {fileID: 0} + stringVal: + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} + vector4Data: + vector4Ref: {fileID: 0} + vector4Val: {x: 0, y: 0, z: 0, w: 0} + variable: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} +--- !u!114 &88470258 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: VarWorld + value: World +--- !u!114 &88470259 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: VarHello + value: Hello +--- !u!114 &88470260 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4580f28dd8581476b810b38eea2f1316, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: Var + value: +--- !u!114 &88470261 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb77d0ce495044f6e9feb91b31798e8c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + indentLevel: 0 + anyVar: + variable: {fileID: 88470260} + data: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + collectionData: + collectionRef: {fileID: 0} + collectionVal: {fileID: 0} + collider2DData: + collider2DRef: {fileID: 0} + collider2DVal: {fileID: 0} + colliderData: + colliderRef: {fileID: 0} + colliderVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + floatData: + floatRef: {fileID: 0} + floatVal: 0 + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + integerData: + integerRef: {fileID: 0} + integerVal: 0 + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + matrix4x4Data: + matrix4x4Ref: {fileID: 0} + matrix4x4Val: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + quaternionData: + quaternionRef: {fileID: 0} + quaternionVal: {x: 0, y: 0, z: 0, w: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + rigidbodyData: + rigidbodyRef: {fileID: 0} + rigidbodyVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + stringData: + stringRef: {fileID: 0} + stringVal: '{$VarHello}, {$VarWorld}!' + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} + vector4Data: + vector4Ref: {fileID: 0} + vector4Val: {x: 0, y: 0, z: 0, w: 0} + setOperator: 0 + variable: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} +--- !u!114 &88470262 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 88470263} + suppressBlockAutoSelect: 0 + waitForFrames: 1 +--- !u!114 &88470263 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 300 + y: 180 + width: 120 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 0 + blockName: New Block + description: + eventHandler: {fileID: 88470262} + commandList: + - {fileID: 88470261} + - {fileID: 88470257} + - {fileID: 88470255} + - {fileID: 88470267} + - {fileID: 88470268} + - {fileID: 88470266} + - {fileID: 88470256} + suppressAllAutoSelections: 0 +--- !u!114 &88470264 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 + scrollPos: {x: 0, y: -1} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 457 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + selectedBlocks: + - {fileID: 88470263} + selectedCommands: + - {fileID: 88470268} + variables: + - {fileID: 88470260} + - {fileID: 88470259} + - {fileID: 88470258} + description: + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + showLineNumbers: 0 + hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart +--- !u!4 &88470265 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.95579445, y: 1.4909708, z: -1.4648438} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &88470266 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8d1a861c2b31cf8488fd9d576d533474, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 18 + indentLevel: 1 + message: + stringRef: {fileID: 0} + stringVal: String Concat comparison has failed! +--- !u!114 &88470267 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 17 + indentLevel: 0 +--- !u!114 &88470268 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 88470254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 16 + indentLevel: 0 + anyOrAllConditions: 0 + conditions: + - compareOperator: 1 + anyVar: + variable: {fileID: 88470260} + data: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + collectionData: + collectionRef: {fileID: 0} + collectionVal: {fileID: 0} + collider2DData: + collider2DRef: {fileID: 0} + collider2DVal: {fileID: 0} + colliderData: + colliderRef: {fileID: 0} + colliderVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + floatData: + floatRef: {fileID: 0} + floatVal: 0 + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + integerData: + integerRef: {fileID: 0} + integerVal: 0 + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + matrix4x4Data: + matrix4x4Ref: {fileID: 0} + matrix4x4Val: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + quaternionData: + quaternionRef: {fileID: 0} + quaternionVal: {x: 0, y: 0, z: 0, w: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + rigidbodyData: + rigidbodyRef: {fileID: 0} + rigidbodyVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + stringData: + stringRef: {fileID: 0} + stringVal: '{$VarHello}, {$VarWorld}!' + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} + vector4Data: + vector4Ref: {fileID: 0} + vector4Val: {x: 0, y: 0, z: 0, w: 0} + compareOperator: 0 + anyVar: + variable: {fileID: 0} + data: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + collectionData: + collectionRef: {fileID: 0} + collectionVal: {fileID: 0} + collider2DData: + collider2DRef: {fileID: 0} + collider2DVal: {fileID: 0} + colliderData: + colliderRef: {fileID: 0} + colliderVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + floatData: + floatRef: {fileID: 0} + floatVal: 0 + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + integerData: + integerRef: {fileID: 0} + integerVal: 0 + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + matrix4x4Data: + matrix4x4Ref: {fileID: 0} + matrix4x4Val: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + quaternionData: + quaternionRef: {fileID: 0} + quaternionVal: {x: 0, y: 0, z: 0, w: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + rigidbodyData: + rigidbodyRef: {fileID: 0} + rigidbodyVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + stringData: + stringRef: {fileID: 0} + stringVal: + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} + vector4Data: + vector4Ref: {fileID: 0} + vector4Val: {x: 0, y: 0, z: 0, w: 0} + variable: {fileID: 0} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: + animatorData: + animatorRef: {fileID: 0} + animatorVal: {fileID: 0} + audioSourceData: + audioSourceRef: {fileID: 0} + audioSourceVal: {fileID: 0} + colorData: + colorRef: {fileID: 0} + colorVal: {r: 0, g: 0, b: 0, a: 0} + gameObjectData: + gameObjectRef: {fileID: 0} + gameObjectVal: {fileID: 0} + materialData: + materialRef: {fileID: 0} + materialVal: {fileID: 0} + objectData: + objectRef: {fileID: 0} + objectVal: {fileID: 0} + rigidbody2DData: + rigidbody2DRef: {fileID: 0} + rigidbody2DVal: {fileID: 0} + spriteData: + spriteRef: {fileID: 0} + spriteVal: {fileID: 0} + textureData: + textureRef: {fileID: 0} + textureVal: {fileID: 0} + transformData: + transformRef: {fileID: 0} + transformVal: {fileID: 0} + vector2Data: + vector2Ref: {fileID: 0} + vector2Val: {x: 0, y: 0} + vector3Data: + vector3Ref: {fileID: 0} + vector3Val: {x: 0, y: 0, z: 0} +--- !u!1 &593205338 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 593205340} + - component: {fileID: 593205339} + m_Layer: 0 + m_Name: _FungusState + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &593205339 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593205338} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} + m_Name: + m_EditorClassIdentifier: + selectedFlowchart: {fileID: 88470264} +--- !u!4 &593205340 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593205338} + 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 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1068708480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1068708484} + - component: {fileID: 1068708483} + - component: {fileID: 1068708482} + - component: {fileID: 1068708481} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1068708481 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068708480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d49b7c1bcd2e07499844da127be038d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ForceModuleActive: 0 +--- !u!114 &1068708482 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068708480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, 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 &1068708483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068708480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1068708484 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068708480} + 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 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1950618015 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1950618018} + - component: {fileID: 1950618017} + - component: {fileID: 1950618016} + 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 &1950618016 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1950618015} + m_Enabled: 1 +--- !u!20 &1950618017 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1950618015} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + 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: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1950618018 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1950618015} + 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 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Tests/String SetVar Concat.unity.meta b/Assets/Tests/String SetVar Concat.unity.meta new file mode 100644 index 00000000..f83ed317 --- /dev/null +++ b/Assets/Tests/String SetVar Concat.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7cbab126c463cee43a352a5be69ba65c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: