Browse Source

Merge pull request #498 from snozbot/misc-bug-fixes

Misc bug fixes
master
Chris Gregan 9 years ago committed by GitHub
parent
commit
05a5195fdd
  1. 6
      Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs
  2. 6
      Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs
  3. 6
      Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs
  4. 6
      Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs
  5. 6
      Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs
  6. 2
      Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs
  7. 19
      Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs
  8. 14
      Assets/Fungus/Audio/Scripts/MusicController.cs
  9. 6
      Assets/Fungus/Flowchart/Editor/CallEditor.cs
  10. 7
      Assets/Fungus/Flowchart/Scripts/Commands/Call.cs
  11. 2
      Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs
  12. 2
      Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
  13. 18
      Assets/Fungus/Flowchart/Scripts/Flowchart.cs
  14. 2
      Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs
  15. 2
      Assets/Fungus/iTween/Scripts/Commands/StopTween.cs
  16. 8
      Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs
  17. 665
      Assets/Tests/Flow/FlowTests.unity

6
Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs

@ -46,7 +46,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD = "";
protected virtual void OnEnable()
{
@ -56,10 +56,10 @@ namespace Fungus
animatorOLD = null;
}
if (parameterNameOLD != null)
if (parameterNameOLD != "")
{
_parameterName.Value = parameterNameOLD;
parameterNameOLD = null;
parameterNameOLD = "";
}
}

6
Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs

@ -49,7 +49,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD = "";
protected virtual void OnEnable()
{
@ -59,10 +59,10 @@ namespace Fungus
animatorOLD = null;
}
if (parameterNameOLD != null)
if (parameterNameOLD != "")
{
_parameterName.Value = parameterNameOLD;
parameterNameOLD = null;
parameterNameOLD = "";
}
}

6
Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs

@ -49,7 +49,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD = "";
protected virtual void OnEnable()
{
@ -59,10 +59,10 @@ namespace Fungus
animatorOLD = null;
}
if (parameterNameOLD != null)
if (parameterNameOLD != "")
{
_parameterName.Value = parameterNameOLD;
parameterNameOLD = null;
parameterNameOLD = "";
}
}

6
Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs

@ -49,7 +49,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD = "";
protected virtual void OnEnable()
{
@ -59,10 +59,10 @@ namespace Fungus
animatorOLD = null;
}
if (parameterNameOLD != null)
if (parameterNameOLD != "")
{
_parameterName.Value = parameterNameOLD;
parameterNameOLD = null;
parameterNameOLD = "";
}
}

6
Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs

@ -46,7 +46,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("animator")] public Animator animatorOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD;
[HideInInspector] [FormerlySerializedAs("parameterName")] public string parameterNameOLD = "";
protected virtual void OnEnable()
{
@ -56,10 +56,10 @@ namespace Fungus
animatorOLD = null;
}
if (parameterNameOLD != null)
if (parameterNameOLD != "")
{
_parameterName.Value = parameterNameOLD;
parameterNameOLD = null;
parameterNameOLD = "";
}
}

2
Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs

@ -68,7 +68,7 @@
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("SettingsString")] public String SettingsStringOLD;
[HideInInspector] [FormerlySerializedAs("SettingsString")] public String SettingsStringOLD = "";
protected virtual void OnEnable()
{

19
Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs

@ -11,21 +11,32 @@ namespace Fungus
{
[Range(0,1)]
[Tooltip("Global volume level for audio played using Play Music and Play Sound")]
public float volume = 1;
public float volume = 1f;
[Range(0,30)]
[Tooltip("Time to fade between current volume level and target volume level.")]
public float fadeDuration;
public float fadeDuration = 1f;
[Tooltip("Wait until the volume fade has completed before continuing.")]
public bool waitUntilFinished = true;
public override void OnEnter()
{
MusicController musicController = MusicController.GetInstance();
if (musicController != null)
{
musicController.SetAudioVolume(volume, fadeDuration);
musicController.SetAudioVolume(volume, fadeDuration, () => {
if (waitUntilFinished)
{
Continue();
}
});
}
Continue();
if (!waitUntilFinished)
{
Continue();
}
}
public override string GetSummary()

14
Assets/Fungus/Audio/Scripts/MusicController.cs

@ -86,13 +86,14 @@ namespace Fungus
/**
* Fades the game music volume to required level over a period of time.
* @param volume The new music volume value [0..1]
* @param duration The length of time in seconds needed to complete the volume change.
* @param duration The length of time in seconds needed to complete the volume change.
* @param onComplete Delegate function to call when fade completes.
*/
public virtual void SetAudioVolume(float volume, float duration)
public virtual void SetAudioVolume(float volume, float duration, System.Action onComplete)
{
AudioSource audio = GetComponent<AudioSource>();
if (duration == 0f)
if (Mathf.Approximately(duration, 0f))
{
audio.volume = volume;
return;
@ -103,7 +104,12 @@ namespace Fungus
volume,
duration).setOnUpdate( (v) => {
audio.volume = v;
});
}).setOnComplete( () => {
if (onComplete != null)
{
onComplete();
}
});
}
/**

6
Assets/Fungus/Flowchart/Editor/CallEditor.cs

@ -10,7 +10,7 @@ namespace Fungus
{
protected SerializedProperty targetFlowchartProp;
protected SerializedProperty targetBlockProp;
protected SerializedProperty commandIndexProp;
protected SerializedProperty startIndexProp;
protected SerializedProperty callModeProp;
protected virtual void OnEnable()
@ -20,7 +20,7 @@ namespace Fungus
targetFlowchartProp = serializedObject.FindProperty("targetFlowchart");
targetBlockProp = serializedObject.FindProperty("targetBlock");
commandIndexProp = serializedObject.FindProperty("commandIndex");
startIndexProp = serializedObject.FindProperty("startIndex");
callModeProp = serializedObject.FindProperty("callMode");
}
@ -49,7 +49,7 @@ namespace Fungus
new GUIContent("<None>"),
flowchart);
EditorGUILayout.PropertyField(commandIndexProp);
EditorGUILayout.PropertyField(startIndexProp);
}
EditorGUILayout.PropertyField(callModeProp);

7
Assets/Fungus/Flowchart/Scripts/Commands/Call.cs

@ -21,7 +21,8 @@ namespace Fungus
public Block targetBlock;
[Tooltip("Command index to start executing")]
public int commandIndex;
[FormerlySerializedAs("commandIndex")]
public int startIndex;
public enum CallMode
{
@ -67,12 +68,12 @@ namespace Fungus
flowchart.selectedBlock = targetBlock;
}
StartCoroutine(targetBlock.Execute(commandIndex, onComplete));
StartCoroutine(targetBlock.Execute(startIndex, onComplete));
}
else
{
// Execute block in another Flowchart
targetFlowchart.ExecuteBlock(targetBlock, commandIndex, onComplete);
targetFlowchart.ExecuteBlock(targetBlock, startIndex, onComplete);
}
}

2
Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs

@ -43,7 +43,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("sceneName")] public string sceneNameOLD;
[HideInInspector] [FormerlySerializedAs("sceneName")] public string sceneNameOLD = "";
protected virtual void OnEnable()
{

2
Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs

@ -71,7 +71,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("message")] public string messageOLD;
[HideInInspector] [FormerlySerializedAs("message")] public string messageOLD = "";
protected virtual void OnEnable()
{

18
Assets/Fungus/Flowchart/Scripts/Flowchart.cs

@ -1,10 +1,15 @@
/**
* Copyright (c) 2014 Fungus Ltd
* This code is part of the Fungus library (http://fungusgames.com) created by Chris Gregan (http://twitter.com/gofungus).
* It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
*/
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Serialization;
using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
@ -398,7 +403,7 @@ namespace Fungus
* You can use this method in a UI event. e.g. to handle a button click.
* Returns true if the Block started execution.
*/
public virtual bool ExecuteBlock(string blockName)
public virtual void ExecuteBlock(string blockName)
{
Block block = null;
foreach (Block b in GetComponents<Block>())
@ -413,10 +418,13 @@ namespace Fungus
if (block == null)
{
Debug.LogError("Block " + blockName + "does not exist");
return false;
return;
}
return ExecuteBlock(block);
if (!ExecuteBlock(block))
{
Debug.LogWarning("Block " + blockName + "failed to execute");
}
}
/**
@ -485,7 +493,7 @@ namespace Fungus
*/
public static void BroadcastFungusMessage(string messageName)
{
MessageReceived[] eventHandlers = GameObject.FindObjectsOfType<MessageReceived>();
MessageReceived[] eventHandlers = UnityEngine.Object.FindObjectsOfType<MessageReceived>();
foreach (MessageReceived eventHandler in eventHandlers)
{
eventHandler.OnSendFungusMessage(messageName);

2
Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs

@ -43,7 +43,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("languageCode")] public string languageCodeOLD;
[HideInInspector] [FormerlySerializedAs("languageCode")] public string languageCodeOLD = "";
protected virtual void OnEnable()
{

2
Assets/Fungus/iTween/Scripts/Commands/StopTween.cs

@ -22,7 +22,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD;
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD = "";
protected virtual void OnEnable()
{

8
Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs

@ -96,7 +96,7 @@ namespace Fungus
#region Backwards compatibility
[HideInInspector] [FormerlySerializedAs("target")] [FormerlySerializedAs("targetObject")] public GameObject targetObjectOLD;
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD;
[HideInInspector] [FormerlySerializedAs("tweenName")] public string tweenNameOLD = "";
[HideInInspector] [FormerlySerializedAs("duration")] public float durationOLD;
protected virtual void OnEnable()
@ -107,6 +107,12 @@ namespace Fungus
targetObjectOLD = null;
}
if (tweenNameOLD != "")
{
_tweenName.Value = tweenNameOLD;
tweenNameOLD = "";
}
if (durationOLD != default(float))
{
_duration.Value = durationOLD;

665
Assets/Tests/Flow/FlowTests.unity

@ -100,7 +100,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &309986962
MonoBehaviour:
m_ObjectHideFlags: 0
@ -131,10 +131,104 @@ Transform:
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 897339005}
m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!1 &454754099
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 224: {fileID: 454754103}
- 223: {fileID: 454754102}
- 114: {fileID: 454754101}
- 114: {fileID: 454754100}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &454754100
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 454754099}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &454754101
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 454754099}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &454754102
Canvas:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 454754099}
m_Enabled: 1
serializedVersion: 2
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &454754103
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 454754099}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1501994598}
m_Father: {fileID: 1923342102}
m_RootOrder: 1
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, y: 0}
--- !u!1 &765506376
GameObject:
m_ObjectHideFlags: 0
@ -172,9 +266,84 @@ Transform:
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
--- !u!1 &794519584
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 224: {fileID: 794519585}
- 222: {fileID: 794519587}
- 114: {fileID: 794519586}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &794519585
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 794519584}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1501994598}
m_RootOrder: 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!114 &794519586
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 794519584}
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: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Test UI Event
--- !u!222 &794519587
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 794519584}
--- !u!1 &897339004
GameObject:
m_ObjectHideFlags: 0
@ -206,6 +375,7 @@ Transform:
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 309986963}
m_RootOrder: 0
@ -254,7 +424,7 @@ MonoBehaviour:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 897339009}
commandIndex: 1
startIndex: 1
callMode: 0
--- !u!114 &897339009
MonoBehaviour:
@ -353,6 +523,111 @@ MonoBehaviour:
localizationId:
showLineNumbers: 0
hideCommands: []
--- !u!1 &1040991508
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1040991509}
- 114: {fileID: 1040991512}
- 114: {fileID: 1040991511}
- 114: {fileID: 1040991510}
m_Layer: 0
m_Name: Flowchart
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1040991509
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1040991508}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1923342102}
m_RootOrder: 0
--- !u!114 &1040991510
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1040991508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4920f47cde1a84b11ad07b7317568494, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 1
errorMessage:
indentLevel: 0
--- !u!114 &1040991511
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1040991508}
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: DoTest
description:
eventHandler: {fileID: 0}
commandList:
- {fileID: 1040991510}
--- !u!114 &1040991512
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1040991508}
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: 1040991511}
selectedCommands:
- {fileID: 1040991510}
variables: []
description:
stepPause: 0
colorCommands: 1
hideComponents: 1
saveSelection: 1
localizationId:
showLineNumbers: 0
hideCommands: []
--- !u!1 &1220080381
GameObject:
m_ObjectHideFlags: 0
@ -436,9 +711,337 @@ Transform:
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &1501994597
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 224: {fileID: 1501994598}
- 222: {fileID: 1501994601}
- 114: {fileID: 1501994600}
- 114: {fileID: 1501994599}
m_Layer: 5
m_Name: TestUIEventButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1501994598
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1501994597}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 794519585}
m_Father: {fileID: 454754103}
m_RootOrder: 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: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1501994599
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1501994597}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1501994600}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1040991512}
m_MethodName: ExecuteBlock
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: DoTest
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1501994600
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1501994597}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &1501994601
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1501994597}
--- !u!1 &1559165973
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1559165976}
- 114: {fileID: 1559165975}
- 114: {fileID: 1559165974}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1559165974
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1559165973}
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 &1559165975
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1559165973}
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 &1559165976
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1559165973}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
--- !u!1 &1601427680
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 179118, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1601427681}
- 114: {fileID: 1601427686}
- 114: {fileID: 1601427685}
- 114: {fileID: 1601427684}
- 114: {fileID: 1601427683}
- 114: {fileID: 1601427682}
m_Layer: 0
m_Name: Lua
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1601427681
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 466848, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1601427680}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1923342102}
m_RootOrder: 2
--- !u!114 &1601427682
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11437776, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1601427680}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c10f0b861365b42b0928858f7b086ff3, type: 3}
m_Name:
m_EditorClassIdentifier:
fungusModule: 0
activeLanguage: en
stringTables: []
registerTypes:
- {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3}
- {fileID: 4900000, guid: 93fddea8208764a2dbb189cc238aed40, type: 3}
--- !u!114 &1601427683
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11483650, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1601427680}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
m_Name:
m_EditorClassIdentifier:
remoteDebugger: 0
--- !u!114 &1601427684
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11499092, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1601427680}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4cc8a659e950044b69d7c62696c36962, type: 3}
m_Name:
m_EditorClassIdentifier:
allEnvironments: 1
luaEnvironment: {fileID: 1601427683}
tableName:
registerTypes: 1
boundTypes:
- UnityEngine.GameObject, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.PrimitiveType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.Component, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- UnityEngine.SendMessageOptions, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
- UnityEngine.SceneManagement.Scene, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
- UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- UnityEngine.UI.Button, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null
- UnityEngine.EventSystems.PointerEventData, UnityEngine.UI, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null
- UnityEngine.EventSystems.BaseEventData, UnityEngine.UI, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null
boundObjects:
- key: button
obj: {fileID: 1501994597}
component: {fileID: 1501994599}
--- !u!114 &1601427685
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11417560, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1601427680}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 446caeace65234baaacd52095d24f101, type: 3}
m_Name:
m_EditorClassIdentifier:
luaEnvironment: {fileID: 1601427683}
luaFile: {fileID: 0}
luaScript: '-- Fake a button press
button.onClick.Invoke()'
runAsCoroutine: 1
--- !u!114 &1601427686
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11415008, guid: 3ddf9f33ba98e4b31ba4d2b9722bea00,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1601427680}
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!1 &1873336849
GameObject:
m_ObjectHideFlags: 1
@ -466,7 +1069,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
selectedFlowchart: {fileID: 897339012}
selectedFlowchart: {fileID: 1040991512}
--- !u!4 &1873336851
Transform:
m_ObjectHideFlags: 1
@ -476,6 +1079,60 @@ Transform:
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &1923342100
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1923342102}
- 114: {fileID: 1923342101}
m_Layer: 0
m_Name: UnityEventTest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1923342101
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1923342100}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3}
m_Name:
m_EditorClassIdentifier:
timeout: 5
ignored: 0
succeedAfterAllAssertionsAreExecuted: 0
expectException: 0
expectedExceptionList:
succeedWhenExceptionIsThrown: 0
includedPlatforms: -1
platformsToIgnore: []
dynamic: 0
dynamicTypeName:
--- !u!4 &1923342102
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1923342100}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1040991509}
- {fileID: 454754103}
- {fileID: 1601427681}
m_Father: {fileID: 0}
m_RootOrder: 3

Loading…
Cancel
Save