├── .gitattributes ├── .gitignore ├── Assets ├── Output.meta └── Output │ ├── Changes.txt │ ├── Changes.txt.meta │ ├── EventSystem.meta │ ├── EventSystem │ ├── Editor.meta │ ├── Editor │ │ ├── EditorInternalClassWrapper.cs │ │ ├── EditorInternalClassWrapper.cs.meta │ │ ├── MecanimEventDataTransfer.cs │ │ ├── MecanimEventDataTransfer.cs.meta │ │ ├── MecanimEventEditor.cs │ │ ├── MecanimEventEditor.cs.meta │ │ ├── MecanimEventEditorPopup.cs │ │ ├── MecanimEventEditorPopup.cs.meta │ │ ├── MecanimEventEmitterInspector.cs │ │ ├── MecanimEventEmitterInspector.cs.meta │ │ ├── MecanimEventEmitterWithDataInspector.cs │ │ ├── MecanimEventEmitterWithDataInspector.cs.meta │ │ ├── MecanimEventInspector.cs │ │ └── MecanimEventInspector.cs.meta │ ├── MecanimEvent.cs │ ├── MecanimEvent.cs.meta │ ├── MecanimEventData.cs │ ├── MecanimEventData.cs.meta │ ├── MecanimEventEmitter.cs │ ├── MecanimEventEmitter.cs.meta │ ├── MecanimEventEmitterWithData.cs │ ├── MecanimEventEmitterWithData.cs.meta │ ├── MecanimEventManager.cs │ ├── MecanimEventManager.cs.meta │ ├── MecanimEventSetupHelper.cs │ └── MecanimEventSetupHelper.cs.meta │ ├── Example.meta │ ├── Example │ ├── Animations.meta │ ├── Animations │ │ ├── Idles.fbx │ │ ├── Idles.fbx.meta │ │ ├── IdlesWave.fbx │ │ ├── IdlesWave.fbx.meta │ │ ├── Jump.fbx │ │ ├── Jump.fbx.meta │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── EyesMaterial.mat │ │ │ ├── EyesMaterial.mat.meta │ │ │ ├── SkinMaterial.mat │ │ │ ├── SkinMaterial.mat.meta │ │ │ ├── SuitMaterial.mat │ │ │ ├── SuitMaterial.mat.meta │ │ │ ├── TeethMaterial.mat │ │ │ ├── TeethMaterial.mat.meta │ │ │ ├── TongueMaterial.mat │ │ │ ├── TongueMaterial.mat.meta │ │ │ ├── body_color_map.mat │ │ │ ├── body_color_map.mat.meta │ │ │ ├── eyes_color_map.mat │ │ │ ├── eyes_color_map.mat.meta │ │ │ ├── face_color_map.mat │ │ │ └── face_color_map.mat.meta │ │ ├── Runs.fbx │ │ └── Runs.fbx.meta │ ├── Characters.meta │ ├── Characters │ │ ├── U_Character.meta │ │ └── U_Character │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── U_Char_Eye_DIF.mat │ │ │ ├── U_Char_Eye_DIF.mat.meta │ │ │ ├── U_Char_Eye_DIF.png │ │ │ ├── U_Char_Eye_DIF.png.meta │ │ │ ├── U_Character_Body-DIF.mat │ │ │ ├── U_Character_Body-DIF.mat.meta │ │ │ ├── U_Character_Head-DIF.mat │ │ │ └── U_Character_Head-DIF.mat.meta │ │ │ ├── U_Character_Body-DIF.png │ │ │ ├── U_Character_Body-DIF.png.meta │ │ │ ├── U_Character_Body-NM.png │ │ │ ├── U_Character_Body-NM.png.meta │ │ │ ├── U_Character_Head-DIF.png │ │ │ ├── U_Character_Head-DIF.png.meta │ │ │ ├── U_Character_Head-NM.png │ │ │ ├── U_Character_Head-NM.png.meta │ │ │ ├── U_Character_REF.fbx │ │ │ └── U_Character_REF.fbx.meta │ ├── Controllers.meta │ ├── Controllers │ │ ├── UpperBodyMask.mask │ │ ├── UpperBodyMask.mask.meta │ │ ├── controller(2D).controller │ │ ├── controller(2D).controller.meta │ │ ├── controller.controller │ │ └── controller.controller.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Character.prefab │ │ ├── Character.prefab.meta │ │ ├── EventDataNode.prefab │ │ ├── EventDataNode.prefab.meta │ │ ├── Main Camera.prefab │ │ └── Main Camera.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Example.unity │ │ ├── Example.unity.meta │ │ ├── ExampleJump.unity │ │ └── ExampleJump.unity.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── IdleRunJump.cs │ │ ├── IdleRunJump.cs.meta │ │ ├── IdleRunJumpExample.cs │ │ ├── IdleRunJumpExample.cs.meta │ │ ├── MessageReceiverExample.cs │ │ ├── MessageReceiverExample.cs.meta │ │ ├── MessageReceiverJumpExample.cs │ │ ├── MessageReceiverJumpExample.cs.meta │ │ ├── ThirdPersonCamera.cs │ │ └── ThirdPersonCamera.cs.meta │ ├── Tutorial1.pdf │ ├── Tutorial1.pdf.meta │ ├── Tutorial2.txt │ └── Tutorial2.txt.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.vspscc 62 | .builds 63 | *.dotCover 64 | 65 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 66 | #packages/ 67 | 68 | # Visual C++ cache files 69 | ipch/ 70 | *.aps 71 | *.ncb 72 | *.opensdf 73 | *.sdf 74 | 75 | # Visual Studio profiler 76 | *.psess 77 | *.vsp 78 | 79 | # ReSharper is a .NET coding add-in 80 | _ReSharper* 81 | 82 | # Installshield output folder 83 | [Ee]xpress 84 | 85 | # DocProject is a documentation generator add-in 86 | DocProject/buildhelp/ 87 | DocProject/Help/*.HxT 88 | DocProject/Help/*.HxC 89 | DocProject/Help/*.hhc 90 | DocProject/Help/*.hhk 91 | DocProject/Help/*.hhp 92 | DocProject/Help/Html2 93 | DocProject/Help/html 94 | 95 | # Click-Once directory 96 | publish 97 | 98 | # Others 99 | [Bb]in 100 | [Oo]bj 101 | sql 102 | TestResults 103 | *.Cache 104 | ClientBin 105 | stylecop.* 106 | ~$* 107 | *.dbmdl 108 | Generated_Code #added for RIA/Silverlight projects 109 | 110 | # Backup & report files from converting an old project file to a newer 111 | # Visual Studio version. Backup files are not needed, because we have git ;-) 112 | _UpgradeReport_Files/ 113 | Backup*/ 114 | UpgradeLog*.XML 115 | 116 | 117 | 118 | ############ 119 | ## Windows 120 | ############ 121 | 122 | # Windows image file caches 123 | Thumbs.db 124 | 125 | # Folder config file 126 | Desktop.ini 127 | 128 | 129 | ############# 130 | ## Python 131 | ############# 132 | 133 | *.py[co] 134 | 135 | # Packages 136 | *.egg 137 | *.egg-info 138 | dist 139 | build 140 | eggs 141 | parts 142 | bin 143 | var 144 | sdist 145 | develop-eggs 146 | .installed.cfg 147 | 148 | # Installer logs 149 | pip-log.txt 150 | 151 | # Unit test / coverage reports 152 | .coverage 153 | .tox 154 | 155 | #Translations 156 | *.mo 157 | 158 | #Mr Developer 159 | .mr.developer.cfg 160 | 161 | # Mac crap 162 | .DS_Store 163 | /Library 164 | /Temp 165 | 166 | # Unity 167 | AssetStoreTools* 168 | AssetStoreTools.meta 169 | -------------------------------------------------------------------------------- /Assets/Output.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21165cb20edd1a841a873abb172b41e8 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Changes.txt: -------------------------------------------------------------------------------- 1 | Ver 2.6.9 2 | *Unity2017.2 compatible 3 | 4 | Ver 2.6.8 5 | *Unity5 compatible 6 | 7 | Ver 2.6.7 8 | *Unity4.6 compatible 9 | 10 | Ver 2.6.6 11 | *Unity4.5 compatible 12 | 13 | Ver 2.6.5 14 | *Unity4.3 supported 15 | *MecanimEventEmitterWithData included. 16 | *Enable/Disable an event. 17 | *Editor performance improved. thx to tmcsweeney. 18 | 19 | Ver2.6.1 20 | *Copy & paste all events of a controller or a state. 21 | 22 | Ver2.6 23 | *Revised to be compatible with Unity4.2. 24 | (Unity 4.2 or higher required) 25 | 26 | Ver2.5.1 27 | *Event context. Added a static member - Context - to MecanimEvent class. 28 | 29 | Ver2.5 30 | *A brand new editor view. Much more easy to edit. 31 | *Critical event support what can be used when a event must be fired even current state was interruptted. Only non-loop state works. 32 | *Timeline was rewritten. Event key can be dragged without any problem now. 33 | *Multi data source support 34 | 35 | Ver2.3 36 | *Copy&Paste (in popup window) 37 | 38 | Ver2.2 39 | *Compatible with Unity 4.1. 40 | *Event label shows parameter. 41 | 42 | Ver2.1 43 | *Save last edited controller. 44 | *Event key is no more overlap with timeline thumb. 45 | *Timeline looks more professional now. 46 | *Added a list of events in order to help editing when events get too closed. 47 | *Added boolean type parameter. 48 | 49 | Ver2.0 50 | *Time line is much more fluent now and would work correctly when animation clip is very short. 51 | 52 | Ver1.8 53 | *Fixed profiler sample error. 54 | *Event key is draggable now. 55 | 56 | Ver1.7 57 | *Reduced package size 58 | *Save the reference to AnimatorController instead of its instance id since there is bug in Unity that instance id will occasionally change. 59 | *Non loop state will send events correctly. 60 | *Emit type - default, upward, broadcast - is provided. -------------------------------------------------------------------------------- /Assets/Output/Changes.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 762953d0b2784eb41ab30a4ba4904af5 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8abaae9e3b1c40643bdba31ce65bcbd8 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f46a3a4974406546b8cb0c0b208788b 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/EditorInternalClassWrapper.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Animations; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System; 7 | using System.Reflection; 8 | 9 | 10 | public class AvatarPreviewWrapper { 11 | #region Reflection 12 | 13 | private static Type realType; 14 | 15 | private static ConstructorInfo method_ctor; 16 | private static PropertyInfo property_OnAvatarChangeFunc; 17 | private static PropertyInfo property_IKOnFeet; 18 | private static PropertyInfo property_Animator; 19 | private static PropertyInfo property_PreviewObject; 20 | private static MethodInfo method_DoPreviewSettings; 21 | private static MethodInfo method_OnDestroy; 22 | private static MethodInfo method_DoAvatarPreview; 23 | private static MethodInfo method_ResetPreviewInstance; 24 | 25 | // private static MethodInfo method_CalculatePreviewGameObject; 26 | private static FieldInfo field_timeControl; 27 | 28 | 29 | public static void InitType() { 30 | if (realType == null) { 31 | Assembly assembly = Assembly.GetAssembly(typeof(Editor)); 32 | realType = assembly.GetType("UnityEditor.AvatarPreview"); 33 | 34 | method_ctor = realType.GetConstructor(new Type[] { typeof(Animator), typeof(Motion)}); 35 | property_OnAvatarChangeFunc = realType.GetProperty("OnAvatarChangeFunc"); 36 | property_IKOnFeet = realType.GetProperty("IKOnFeet"); 37 | property_Animator = realType.GetProperty("Animator"); 38 | property_PreviewObject = realType.GetProperty("PreviewObject"); 39 | method_DoPreviewSettings = realType.GetMethod("DoPreviewSettings"); 40 | method_OnDestroy = realType.GetMethod("OnDestroy"); 41 | method_DoAvatarPreview = realType.GetMethod("DoAvatarPreview", new Type[] {typeof(Rect), typeof(GUIStyle)}); 42 | method_ResetPreviewInstance = realType.GetMethod("ResetPreviewInstance"); 43 | // method_CalculatePreviewGameObject = realType.GetMethod("CalculatePreviewGameObject", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); 44 | field_timeControl = realType.GetField("timeControl"); 45 | } 46 | } 47 | 48 | #endregion 49 | 50 | #region Wrapper 51 | 52 | private object instance; 53 | 54 | public delegate void OnAvatarChange(); 55 | 56 | public AvatarPreviewWrapper(Animator previewObjectInScene, Motion objectOnSameAsset) { 57 | InitType(); 58 | 59 | instance = method_ctor.Invoke( new object[] { previewObjectInScene, objectOnSameAsset } ); 60 | } 61 | 62 | public Animator Animator 63 | { 64 | get 65 | { 66 | return property_Animator.GetValue(instance, null) as Animator; 67 | } 68 | } 69 | public bool IKOnFeet { 70 | get { 71 | return (bool)property_IKOnFeet.GetValue(instance, null); 72 | } 73 | } 74 | 75 | public OnAvatarChange OnAvatarChangeFunc { 76 | set { 77 | property_OnAvatarChangeFunc.SetValue(instance, Delegate.CreateDelegate(property_OnAvatarChangeFunc.PropertyType, value.Target, value.Method), null); 78 | } 79 | } 80 | 81 | public GameObject PreviewObject { 82 | get { 83 | return property_PreviewObject.GetValue(instance, null) as GameObject; 84 | } 85 | } 86 | 87 | public void DoPreviewSettings() { 88 | method_DoPreviewSettings.Invoke(instance, null); 89 | } 90 | 91 | public void OnDestroy() { 92 | method_OnDestroy.Invoke(instance, null); 93 | } 94 | 95 | public void DoAvatarPreview(Rect rect, GUIStyle background) { 96 | method_DoAvatarPreview.Invoke(instance, new object[] { rect, background }); 97 | } 98 | 99 | public void ResetPreviewInstance() { 100 | method_ResetPreviewInstance.Invoke(instance, null); 101 | } 102 | 103 | // public static GameObject CalculatePreviewGameobject (Animator selectedAnimator, Motion motion, ModelImporterAnimationType animationType) { 104 | // InitType(); 105 | // return (GameObject)method_CalculatePreviewGameObject.Invoke(null, new object[] { selectedAnimator, motion, animationType }); 106 | // } 107 | 108 | public TimeControlWrapper timeControl { 109 | get { 110 | return new TimeControlWrapper(field_timeControl.GetValue(instance)); 111 | } 112 | } 113 | #endregion 114 | 115 | } 116 | 117 | public class TimeControlWrapper { 118 | private static Type realType; 119 | private object instance; 120 | 121 | private static FieldInfo field_currentTime; 122 | private static FieldInfo field_loop; 123 | private static FieldInfo field_startTime; 124 | private static FieldInfo field_stopTime; 125 | private static MethodInfo method_Update; 126 | private static PropertyInfo property_deltaTime; 127 | private static PropertyInfo property_normalizedTime; 128 | private static PropertyInfo property_playing; 129 | private static PropertyInfo property_nextCurrentTime; 130 | 131 | public static void InitType() { 132 | if (realType == null) { 133 | Assembly assembly = Assembly.GetAssembly(typeof(Editor)); 134 | realType = assembly.GetType("UnityEditor.TimeControl"); 135 | 136 | field_currentTime = realType.GetField("currentTime"); 137 | field_loop = realType.GetField("loop"); 138 | field_startTime = realType.GetField("startTime"); 139 | field_stopTime = realType.GetField("stopTime"); 140 | method_Update = realType.GetMethod("Update"); 141 | property_deltaTime = realType.GetProperty("deltaTime"); 142 | property_normalizedTime = realType.GetProperty("normalizedTime"); 143 | property_playing = realType.GetProperty("playing"); 144 | property_nextCurrentTime = realType.GetProperty("nextCurrentTime"); 145 | } 146 | } 147 | 148 | public TimeControlWrapper(object realTimeControl) { 149 | InitType(); 150 | this.instance = realTimeControl; 151 | } 152 | 153 | public float currentTime { 154 | get { 155 | return (float)field_currentTime.GetValue(instance); 156 | } 157 | set { 158 | field_currentTime.SetValue(instance, value); 159 | } 160 | } 161 | 162 | public bool loop { 163 | get { 164 | return (bool)field_loop.GetValue(instance); 165 | } 166 | set { 167 | field_loop.SetValue(instance, value); 168 | } 169 | } 170 | 171 | public float startTime { 172 | get { 173 | return (float)field_startTime.GetValue(instance); 174 | } 175 | set { 176 | field_startTime.SetValue(instance, value); 177 | } 178 | } 179 | 180 | public float stopTime { 181 | get { 182 | return (float)field_stopTime.GetValue(instance); 183 | } 184 | set { 185 | field_stopTime.SetValue(instance, value); 186 | } 187 | } 188 | 189 | public float deltaTime { 190 | get { 191 | return (float)property_deltaTime.GetValue(instance, null); 192 | } 193 | set { 194 | property_deltaTime.SetValue(instance, value, null); 195 | } 196 | } 197 | 198 | public float normalizedTime { 199 | get { 200 | return (float)property_normalizedTime.GetValue(instance, null); 201 | } 202 | set { 203 | property_normalizedTime.SetValue(instance, value, null); 204 | } 205 | } 206 | 207 | public bool playing { 208 | get { 209 | return (bool)property_playing.GetValue(instance, null); 210 | } 211 | set { 212 | property_playing.SetValue(instance, value, null); 213 | } 214 | } 215 | 216 | public float nextCurrentTime { 217 | set { 218 | property_nextCurrentTime.SetValue(instance, value, null); 219 | } 220 | } 221 | 222 | public void Update() { 223 | method_Update.Invoke(instance, null); 224 | } 225 | } 226 | 227 | public static class HandleUtilityWrapper { 228 | private static Type realType; 229 | private static PropertyInfo s_property_handleWireMaterial; 230 | 231 | private static void InitType() { 232 | if (realType == null) { 233 | Assembly assembly = Assembly.GetAssembly(typeof(Editor)); 234 | realType = assembly.GetType("UnityEditor.HandleUtility"); 235 | 236 | s_property_handleWireMaterial = realType.GetProperty("handleWireMaterial", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); 237 | } 238 | } 239 | 240 | public static Material handleWireMaterial { 241 | get { 242 | InitType(); 243 | return s_property_handleWireMaterial.GetValue(null, null) as Material; 244 | } 245 | } 246 | } 247 | 248 | public static class AnimatorExtension { 249 | private static Type realType; 250 | 251 | private static MethodInfo method_Update; 252 | 253 | public static void InitType() { 254 | if (realType == null) { 255 | realType = typeof(Animator); 256 | 257 | method_Update = realType.GetMethod("Update", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 258 | } 259 | } 260 | 261 | 262 | public static void UpdateWrapper(this Animator animator, float diff) { 263 | InitType(); 264 | 265 | method_Update.Invoke(animator, new object[] { diff }); 266 | } 267 | } 268 | 269 | public static class BlendTreeExtension { 270 | 271 | public static int GetRecursiveBlendParamCount(this BlendTree bt) { 272 | object val = bt.GetType().GetProperty("recursiveBlendParameterCount", BindingFlags.Instance | BindingFlags.GetProperty | BindingFlags.NonPublic | BindingFlags.Public).GetValue(bt, new object[]{}); 273 | return (int)val; 274 | } 275 | public static string GetRecursiveBlendParam(this BlendTree bt, int index) { 276 | object val = bt.GetType().GetMethod("GetRecursiveBlendParameter", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public).Invoke(bt, new object[]{index}); 277 | return (string)val; 278 | } 279 | public static float GetRecursiveBlendParamMax(this BlendTree bt, int index) { 280 | object val = bt.GetType().GetMethod("GetRecursiveBlendParameterMax", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public).Invoke(bt, new object[]{index}); 281 | return (float)val; 282 | } 283 | public static float GetRecursiveBlendParamMin(this BlendTree bt, int index) { 284 | object val = bt.GetType().GetMethod("GetRecursiveBlendParameterMin", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public).Invoke(bt, new object[]{index}); 285 | return (float)val; 286 | } 287 | public static float GetInputBlendVal(this BlendTree bt, string blendValueName) { 288 | object val = bt.GetType().GetMethod("GetInputBlendValue", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public).Invoke(bt, new object[] { blendValueName }); 289 | return (float)val; 290 | } 291 | } 292 | 293 | public static class AnimatorControllerExtension { 294 | 295 | private static Type realType; 296 | private static MethodInfo method_GetEffectiveAnimatorController; 297 | private static FieldInfo field_OnAnimatorControllerDirty; 298 | private static PropertyInfo property_pushUndo; 299 | 300 | public static void InitType() { 301 | if (realType == null) { 302 | realType = typeof(AnimatorController); 303 | 304 | method_GetEffectiveAnimatorController = realType.GetMethod("GetEffectiveAnimatorController", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); 305 | field_OnAnimatorControllerDirty = realType.GetField("OnAnimatorControllerDirty", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 306 | property_pushUndo = realType.GetProperty("pushUndo", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 307 | } 308 | } 309 | 310 | public static void SetPushUndo(this AnimatorController controller, bool val) { 311 | InitType(); 312 | property_pushUndo.SetValue(controller, val, null); 313 | } 314 | 315 | public static AnimatorController GetEffectiveAnimatorController(Animator animator) { 316 | InitType(); 317 | object val = (AnimatorController)(method_GetEffectiveAnimatorController.Invoke(null, new object[] { animator })); 318 | return (AnimatorController)val; 319 | } 320 | 321 | public static void AppendOnAnimatorControllerDirtyCallback(this AnimatorController controller, System.Action callback) { 322 | InitType(); 323 | System.Action oldCallback = (System.Action)field_OnAnimatorControllerDirty.GetValue(controller); 324 | System.Action newCallback = (System.Action)Delegate.Combine(oldCallback, new System.Action(callback)); 325 | 326 | field_OnAnimatorControllerDirty.SetValue(controller, newCallback); 327 | } 328 | 329 | public static void RemoveOnAnimatorControllerDirtyCallback(this AnimatorController controller, System.Action callback) { 330 | InitType(); 331 | System.Action oldCallback = (System.Action)field_OnAnimatorControllerDirty.GetValue(controller); 332 | System.Action newCallback = (System.Action)Delegate.Remove(oldCallback, new System.Action(callback)); 333 | 334 | field_OnAnimatorControllerDirty.SetValue(controller, newCallback); 335 | } 336 | } 337 | 338 | public static class AnimatorStateExtension { 339 | 340 | private static Type realType; 341 | private static PropertyInfo property_pushUndo; 342 | 343 | public static void InitType() { 344 | if (realType == null) 345 | realType = typeof(AnimatorState); 346 | 347 | property_pushUndo = realType.GetProperty("pushUndo", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 348 | } 349 | 350 | public static void SetPushUndo(this AnimatorState controller, bool val) { 351 | InitType(); 352 | property_pushUndo.SetValue(controller, val, null); 353 | } 354 | 355 | public static int GetFullPathHash(this AnimatorState state, AnimatorStateMachine parentSM) 356 | { 357 | List pathElems = new List(); 358 | 359 | if (GetFullPathRecursively(parentSM, state, pathElems)) 360 | { 361 | string fullPath = string.Join(".", pathElems.ToArray()); 362 | return Animator.StringToHash(fullPath); 363 | } 364 | else 365 | { 366 | Debug.LogError("Do not find state path"); 367 | return -1; 368 | } 369 | } 370 | 371 | private static bool GetFullPathRecursively(AnimatorStateMachine parentSM, AnimatorState state, List pathElems) 372 | { 373 | for (int i = 0 ;i < parentSM.states.Length; i++) 374 | { 375 | if (parentSM.states[i].state == state) 376 | { 377 | pathElems.Add(parentSM.name); 378 | pathElems.Add(state.name); 379 | 380 | return true; 381 | } 382 | } 383 | 384 | for (int i = 0; i < parentSM.stateMachines.Length; i++) 385 | { 386 | if (GetFullPathRecursively(parentSM.stateMachines[i].stateMachine, state, pathElems)) 387 | { 388 | pathElems.Insert(0, parentSM.name); 389 | return true; 390 | } 391 | } 392 | 393 | return false; 394 | } 395 | } 396 | 397 | public static class AnimatorStateMachineExtension { 398 | 399 | private static Type realType; 400 | private static PropertyInfo property_pushUndo; 401 | 402 | public static void InitType() { 403 | if (realType == null) 404 | realType = typeof(AnimatorStateMachine); 405 | 406 | property_pushUndo = realType.GetProperty("pushUndo", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 407 | } 408 | 409 | public static void SetPushUndo(this AnimatorStateMachine controller, bool val) { 410 | InitType(); 411 | property_pushUndo.SetValue(controller, val, null); 412 | } 413 | } -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/EditorInternalClassWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b80414ef87a8ba444aad585f121897e9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventDataTransfer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections.Generic; 4 | 5 | public class MecanimEventDataTransfer : EditorWindow { 6 | 7 | private MecanimEventData transferFrom; 8 | private MecanimEventData transferTo; 9 | 10 | private Dictionary toggleTable = new Dictionary(); 11 | 12 | 13 | private Vector2 leftWindowScroll; 14 | private Vector2 rightWindowScroll; 15 | 16 | class DisplayInfo { 17 | public int eventCount = 0; 18 | } 19 | 20 | [MenuItem("Window/Mecanim Event Data Transfer")] 21 | public static void Init() { 22 | EditorWindow.GetWindow(); 23 | } 24 | 25 | void OnGUI() { 26 | 27 | EditorGUILayout.BeginHorizontal(); { 28 | 29 | EditorGUI.BeginChangeCheck(); 30 | 31 | transferFrom = EditorGUILayout.ObjectField("Transfer From", transferFrom, typeof(MecanimEventData), false) as MecanimEventData; 32 | 33 | if (EditorGUI.EndChangeCheck()) { 34 | toggleTable = new Dictionary(); 35 | } 36 | 37 | transferTo = EditorGUILayout.ObjectField("Transfer To", transferTo, typeof(MecanimEventData), false) as MecanimEventData; 38 | 39 | } 40 | EditorGUILayout.EndHorizontal(); 41 | 42 | 43 | EditorGUILayout.BeginHorizontal(); { 44 | 45 | EditorGUILayout.BeginVertical("Window", GUILayout.MaxWidth(position.width/2)); 46 | leftWindowScroll = EditorGUILayout.BeginScrollView(leftWindowScroll); { 47 | 48 | DisplayDataSource(); 49 | 50 | } 51 | EditorGUILayout.EndScrollView(); 52 | EditorGUILayout.EndVertical(); 53 | 54 | EditorGUILayout.BeginVertical("Window", GUILayout.MaxWidth(position.width/2)); 55 | rightWindowScroll = EditorGUILayout.BeginScrollView(rightWindowScroll); { 56 | 57 | DisplayDataDest(); 58 | 59 | } 60 | EditorGUILayout.EndScrollView(); 61 | EditorGUILayout.EndVertical(); 62 | 63 | } 64 | EditorGUILayout.EndHorizontal(); 65 | 66 | 67 | EditorGUILayout.BeginHorizontal(); { 68 | 69 | GUILayout.FlexibleSpace(); 70 | 71 | EditorGUI.BeginDisabledGroup(transferFrom == null || transferTo == null || 72 | transferFrom.GetInstanceID() == transferTo.GetInstanceID()); 73 | 74 | if (GUILayout.Button("Transfer", GUILayout.Width(80), GUILayout.Height(30))) { 75 | Transfer(); 76 | } 77 | 78 | EditorGUI.EndDisabledGroup(); 79 | 80 | if (GUILayout.Button("Cancel", GUILayout.Width(80), GUILayout.Height(30))) { 81 | Close(); 82 | } 83 | } 84 | EditorGUILayout.EndHorizontal(); 85 | } 86 | 87 | void DisplayDataSource() { 88 | 89 | if (transferFrom == null) 90 | return; 91 | 92 | MecanimEventDataEntry[] data = transferFrom.data; 93 | 94 | if (data == null) 95 | return; 96 | 97 | Dictionary controllers = new Dictionary(); 98 | 99 | foreach (MecanimEventDataEntry entry in data) { 100 | 101 | if (entry == null || entry.animatorController == null) 102 | continue; 103 | 104 | if (!controllers.ContainsKey(entry.animatorController)) { 105 | controllers[entry.animatorController] = new DisplayInfo(); 106 | } 107 | 108 | if (entry.events != null) 109 | controllers[entry.animatorController].eventCount += entry.events.Length; 110 | 111 | } 112 | 113 | EditorGUILayout.BeginVertical(); 114 | 115 | 116 | foreach (UnityEngine.Object controller in controllers.Keys) { 117 | 118 | if (!toggleTable.ContainsKey(controller)) { 119 | toggleTable[controller] = false; 120 | } 121 | 122 | EditorGUILayout.BeginHorizontal(); 123 | 124 | toggleTable[controller] = GUILayout.Toggle(toggleTable[controller], controller.name, GUILayout.ExpandWidth(true)); 125 | 126 | GUILayout.Label("("+controllers[controller].eventCount+")", GUILayout.ExpandWidth(false)); 127 | 128 | EditorGUILayout.EndHorizontal(); 129 | 130 | } 131 | 132 | EditorGUILayout.EndVertical(); 133 | } 134 | 135 | void DisplayDataDest() { 136 | 137 | if (transferTo == null) 138 | return; 139 | 140 | MecanimEventDataEntry[] data = transferTo.data; 141 | 142 | if (data == null) 143 | return; 144 | 145 | Dictionary controllers = new Dictionary(); 146 | 147 | foreach (MecanimEventDataEntry entry in data) { 148 | if (entry == null || entry.animatorController == null) 149 | continue; 150 | 151 | if (!controllers.ContainsKey(entry.animatorController)) { 152 | controllers[entry.animatorController] = new DisplayInfo(); 153 | } 154 | 155 | if (entry.events != null) 156 | controllers[entry.animatorController].eventCount += entry.events.Length; 157 | 158 | } 159 | 160 | EditorGUILayout.BeginVertical(); 161 | 162 | 163 | foreach (UnityEngine.Object controller in controllers.Keys) { 164 | 165 | if (!toggleTable.ContainsKey(controller)) { 166 | toggleTable[controller] = false; 167 | } 168 | 169 | EditorGUILayout.BeginHorizontal(); 170 | 171 | if (GUILayout.Button("X", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false))) { 172 | DeleteEntry(controller); 173 | } 174 | 175 | GUILayout.Label(controller.name, GUILayout.ExpandWidth(true)); 176 | 177 | GUILayout.Label("("+controllers[controller].eventCount+")", GUILayout.ExpandWidth(false)); 178 | 179 | EditorGUILayout.EndHorizontal(); 180 | 181 | } 182 | 183 | EditorGUILayout.EndVertical(); 184 | } 185 | 186 | void Transfer() { 187 | 188 | if (transferFrom.data == null || transferFrom.data.Length == 0) 189 | return; 190 | 191 | bool toggleAny = false; 192 | foreach (bool f in toggleTable.Values) { 193 | if (f) { 194 | toggleAny = true; 195 | break; 196 | } 197 | } 198 | if (!toggleAny) 199 | return; 200 | 201 | 202 | 203 | 204 | if (transferTo.data == null) 205 | transferTo.data = new MecanimEventDataEntry[0]; 206 | 207 | List destEntries = new List(transferTo.data); 208 | 209 | for (int i = 0; i < destEntries.Count; ) { 210 | 211 | if (toggleTable.ContainsKey(destEntries[i].animatorController) && 212 | toggleTable[destEntries[i].animatorController] == true) { 213 | 214 | destEntries.RemoveAt(i); 215 | 216 | } 217 | else { 218 | 219 | i++; 220 | 221 | } 222 | } 223 | 224 | foreach (MecanimEventDataEntry srcEntry in transferFrom.data) { 225 | 226 | if (toggleTable.ContainsKey(srcEntry.animatorController) && 227 | toggleTable[srcEntry.animatorController] == true) { 228 | 229 | // copy this entry; 230 | destEntries.Add(new MecanimEventDataEntry(srcEntry)); 231 | } 232 | 233 | } 234 | 235 | transferTo.data = destEntries.ToArray(); 236 | 237 | EditorUtility.SetDirty(transferTo); 238 | 239 | Repaint(); 240 | } 241 | 242 | void DeleteEntry(UnityEngine.Object controller) { 243 | 244 | Undo.RecordObject(transferTo, "Mecanim Event Data"); 245 | 246 | if (transferTo.data == null) 247 | transferTo.data = new MecanimEventDataEntry[0]; 248 | 249 | List destEntries = new List(transferTo.data); 250 | 251 | for (int i = 0; i < destEntries.Count; ) { 252 | 253 | if (destEntries[i] != null && destEntries[i].animatorController == controller) { 254 | 255 | destEntries.RemoveAt(i); 256 | 257 | } 258 | else { 259 | 260 | i++; 261 | 262 | } 263 | } 264 | 265 | transferTo.data = destEntries.ToArray(); 266 | 267 | EditorUtility.SetDirty(transferTo); 268 | Repaint(); 269 | } 270 | } 271 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventDataTransfer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11e44720e0599eb47ab88b8eae8eab79 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f284a59e902b7f9428671140c9b3e699 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEditorPopup.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections.Generic; 4 | 5 | public class MecanimEventEditorPopup : EditorWindow { 6 | private static MecanimEventEditorPopup actived; 7 | 8 | private MecanimEvent eventTemp; 9 | private UnityEditorInternal.ReorderableList conditionList; 10 | private MecanimEvent eventEditing; 11 | private MecanimEventEditor editor; 12 | private KeyValuePair[] availableParameters; 13 | 14 | private GUIContent[] booleanPopup = new GUIContent[] {new GUIContent("False"), new GUIContent("True")}; 15 | 16 | public static MecanimEventEditorPopup Show(MecanimEventEditor editor, MecanimEvent e, KeyValuePair[] availableParameters) { 17 | actived = EditorWindow.GetWindow(false, "Edit Event"); 18 | actived.eventEditing = e; 19 | 20 | actived.eventTemp = new MecanimEvent(e); 21 | actived.editor = editor; 22 | actived.availableParameters = availableParameters; 23 | actived.conditionList = new UnityEditorInternal.ReorderableList(actived.eventTemp.condition.conditions, typeof(EventConditionEntry)); 24 | actived.conditionList.drawElementCallback = new UnityEditorInternal.ReorderableList.ElementCallbackDelegate(actived.DrawConditionsElement); 25 | actived.conditionList.drawHeaderCallback = new UnityEditorInternal.ReorderableList.HeaderCallbackDelegate(actived.DrawConditionsHeader); 26 | return actived; 27 | } 28 | 29 | public static void Destroy() { 30 | if (actived != null) { 31 | actived.Close(); 32 | } 33 | } 34 | 35 | void OnEnable() { 36 | minSize = new Vector2(450, 190); 37 | } 38 | 39 | void OnDestroy() { 40 | actived = null; 41 | } 42 | 43 | void Update() { 44 | minSize = new Vector2(minSize.x, 160 + conditionList.count * conditionList.elementHeight); 45 | } 46 | 47 | void OnGUI() { 48 | EditorGUI.BeginDisabledGroup(!eventTemp.isEnable); { 49 | 50 | EditorGUILayout.BeginHorizontal(); 51 | eventTemp.normalizedTime = Mathf.Clamp(EditorGUILayout.FloatField("Normalized Time", eventTemp.normalizedTime), 0.0f, 1.0f); 52 | 53 | if (GUILayout.Button("Current", GUILayout.MaxWidth(60))) { 54 | eventTemp.normalizedTime = editor.PlaybackTime; 55 | } 56 | 57 | EditorGUILayout.EndHorizontal(); 58 | 59 | eventTemp.functionName = EditorGUILayout.TextField("Message", eventTemp.functionName); 60 | eventTemp.paramType = (MecanimEventParamTypes)EditorGUILayout.EnumPopup("Parameter Type", eventTemp.paramType); 61 | 62 | switch(eventTemp.paramType) { 63 | case MecanimEventParamTypes.Int32: 64 | eventTemp.intParam = EditorGUILayout.IntField("Parameter", eventTemp.intParam); 65 | break; 66 | case MecanimEventParamTypes.Float: 67 | eventTemp.floatParam = EditorGUILayout.FloatField("Parameter", eventTemp.floatParam); 68 | break; 69 | case MecanimEventParamTypes.String: 70 | eventTemp.stringParam = EditorGUILayout.TextField("Parameter", eventTemp.stringParam); 71 | break; 72 | case MecanimEventParamTypes.Boolean: 73 | eventTemp.boolParam = EditorGUILayout.Popup(new GUIContent("Parameter"), eventTemp.boolParam == true ? 1 : 0, booleanPopup) == 1 ? true : false; 74 | break; 75 | } 76 | 77 | GUIContent toggleLabel = new GUIContent("Critical", "A critical event won't be missed even state was interrupted."); 78 | eventTemp.critical = EditorGUILayout.Toggle(toggleLabel, eventTemp.critical); 79 | 80 | if (availableParameters.Length > 0) 81 | conditionList.DoLayoutList(); 82 | else 83 | eventTemp.condition.conditions.Clear(); 84 | 85 | GUILayout.Space(10); 86 | GUILayout.FlexibleSpace(); 87 | 88 | } 89 | EditorGUI.EndDisabledGroup(); 90 | 91 | GUILayout.BeginHorizontal(); 92 | 93 | if (GUILayout.Button("Copy", GUILayout.MinWidth(60))) { 94 | MecanimEventEditor.clipboard = new MecanimEvent(eventTemp); 95 | } 96 | 97 | EditorGUI.BeginDisabledGroup(MecanimEventEditor.clipboard == null); 98 | 99 | if (GUILayout.Button("Paste", GUILayout.MinWidth(60))) { 100 | eventTemp = new MecanimEvent(MecanimEventEditor.clipboard); 101 | } 102 | 103 | EditorGUI.EndDisabledGroup(); 104 | 105 | if (GUILayout.Button(eventTemp.isEnable?"Disable":"Enable")) { 106 | eventTemp.isEnable = !eventTemp.isEnable; 107 | } 108 | 109 | GUILayout.FlexibleSpace(); 110 | GUILayout.Space(20); 111 | 112 | if (GUILayout.Button("Save", GUILayout.MinWidth(80))) { 113 | eventEditing.normalizedTime = eventTemp.normalizedTime; 114 | eventEditing.functionName = eventTemp.functionName; 115 | eventEditing.paramType = eventTemp.paramType; 116 | eventEditing.intParam = eventTemp.intParam; 117 | eventEditing.floatParam = eventTemp.floatParam; 118 | eventEditing.stringParam = eventTemp.stringParam; 119 | eventEditing.boolParam = eventTemp.boolParam; 120 | eventEditing.condition = eventTemp.condition; 121 | eventEditing.critical = eventTemp.critical; 122 | eventEditing.isEnable = eventTemp.isEnable; 123 | Close(); 124 | } 125 | 126 | // GUILayout.Space(20); 127 | // 128 | // if (GUILayout.Button("Delete", GUILayout.MinWidth(80))) { 129 | // editor.DelEvent(eventEditing); 130 | // Close(); 131 | // } 132 | 133 | GUILayout.Space(20); 134 | 135 | if (GUILayout.Button("Cancel", GUILayout.MinWidth(80))) { 136 | Close(); 137 | } 138 | GUILayout.Space(20); 139 | 140 | GUILayout.EndHorizontal(); 141 | GUILayout.Space(10); 142 | } 143 | 144 | private void DrawConditionsElement(Rect rect, int index, bool selected, bool focused) { 145 | EventConditionEntry conditionAtIndex = eventTemp.condition.conditions[index]; 146 | //EditorGUIUtility.LookLikeControls(); 147 | Rect paramRect = new Rect(rect.x, rect.y, rect.width/3, rect.height); 148 | 149 | string[] paramPopup = new string[availableParameters.Length]; 150 | int paramSelected = 0; 151 | 152 | for (int i = 0; i < availableParameters.Length; i++) { 153 | paramPopup[i] = availableParameters[i].Key; 154 | 155 | if (paramPopup[i] == conditionAtIndex.conditionParam) 156 | paramSelected = i; 157 | } 158 | 159 | paramSelected = EditorGUI.Popup(paramRect, paramSelected, paramPopup); 160 | conditionAtIndex.conditionParam = paramPopup[paramSelected]; 161 | 162 | switch(availableParameters[paramSelected].Value) { 163 | case EventConditionParamTypes.Int: 164 | { 165 | conditionAtIndex.conditionParamType = EventConditionParamTypes.Int; 166 | Rect modeRect = new Rect(rect.x+rect.width/3, rect.y, rect.width/3, rect.height); 167 | Rect valueRect = new Rect(rect.x+rect.width*2/3, rect.y, rect.width/3, rect.height-4); 168 | 169 | conditionAtIndex.conditionMode = (EventConditionModes)EditorGUI.EnumPopup(modeRect, conditionAtIndex.conditionMode); 170 | conditionAtIndex.intValue = EditorGUI.IntField(valueRect, conditionAtIndex.intValue); 171 | } 172 | 173 | break; 174 | case EventConditionParamTypes.Float: 175 | { 176 | conditionAtIndex.conditionParamType = EventConditionParamTypes.Float; 177 | Rect modeRect = new Rect(rect.x+rect.width/3, rect.y, rect.width/3, rect.height); 178 | Rect valueRect = new Rect(rect.x+rect.width*2/3, rect.y, rect.width/3, rect.height-4); 179 | 180 | string[] floatConditionMode = new string[] { EventConditionModes.GreaterThan.ToString(), EventConditionModes.LessThan.ToString() }; 181 | int selectMode = conditionAtIndex.conditionMode == EventConditionModes.LessThan ? 1 : 0; 182 | selectMode = EditorGUI.Popup(modeRect, selectMode, floatConditionMode); 183 | conditionAtIndex.conditionMode = selectMode == 0 ? EventConditionModes.GreaterThan : EventConditionModes.LessThan; 184 | conditionAtIndex.floatValue = EditorGUI.FloatField(valueRect, conditionAtIndex.floatValue); 185 | } 186 | break; 187 | case EventConditionParamTypes.Boolean: 188 | { 189 | conditionAtIndex.conditionParamType = EventConditionParamTypes.Boolean; 190 | Rect valueRect = new Rect(rect.x+rect.width/3, rect.y, rect.width*2/3, rect.height-4); 191 | 192 | string[] boolConditionValue = new string[] { "true", "false" }; 193 | conditionAtIndex.conditionMode = EventConditionModes.Equal; 194 | int selectedValue = conditionAtIndex.boolValue ? 0 : 1; 195 | conditionAtIndex.boolValue = EditorGUI.Popup(valueRect, selectedValue, boolConditionValue) == 0 ? true : false; 196 | } 197 | break; 198 | } 199 | } 200 | 201 | private void DrawConditionsHeader(Rect headerRect) 202 | { 203 | //EditorGUIUtility.LookLikeControls(); 204 | GUI.Label(headerRect, new GUIContent("Conditions")); 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEditorPopup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c0a06dd71f3c0840988f45bd41c8292 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEmitterInspector.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Animations; 4 | using System.Collections.Generic; 5 | 6 | [CustomEditor(typeof(MecanimEventEmitter))] 7 | public class MecanimEventEmitterInspector : Editor { 8 | SerializedProperty controller; 9 | SerializedProperty animator; 10 | SerializedProperty emitType; 11 | 12 | void OnEnable() { 13 | controller = serializedObject.FindProperty("animatorController"); 14 | animator = serializedObject.FindProperty("animator"); 15 | emitType = serializedObject.FindProperty("emitType"); 16 | } 17 | 18 | public override void OnInspectorGUI () 19 | { 20 | serializedObject.UpdateIfRequiredOrScript(); 21 | 22 | EditorGUILayout.PropertyField(animator); 23 | 24 | if (animator.objectReferenceValue != null) { 25 | AnimatorController animatorController = AnimatorControllerExtension.GetEffectiveAnimatorController((Animator)animator.objectReferenceValue); 26 | controller.objectReferenceValue = animatorController; 27 | } 28 | else { 29 | controller.objectReferenceValue = null; 30 | } 31 | 32 | EditorGUILayout.ObjectField("AnimatorController", controller.objectReferenceValue, typeof(AnimatorController), false); 33 | 34 | EditorGUILayout.PropertyField(emitType); 35 | 36 | serializedObject.ApplyModifiedProperties(); 37 | } 38 | } -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEmitterInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8540702a5d8b47c4dab35757278cfeb0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEmitterWithDataInspector.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Animations; 4 | //using UnityEditorInternal; 5 | using System.Collections.Generic; 6 | 7 | [CustomEditor(typeof(MecanimEventEmitterWithData))] 8 | public class MecanimEventEmitterWithDataInspector : Editor { 9 | SerializedProperty controller; 10 | SerializedProperty animator; 11 | SerializedProperty emitType; 12 | SerializedProperty data; 13 | 14 | void OnEnable() { 15 | controller = serializedObject.FindProperty("animatorController"); 16 | animator = serializedObject.FindProperty("animator"); 17 | emitType = serializedObject.FindProperty("emitType"); 18 | data = serializedObject.FindProperty("data"); 19 | } 20 | 21 | public override void OnInspectorGUI () 22 | { 23 | serializedObject.UpdateIfRequiredOrScript(); 24 | 25 | EditorGUILayout.PropertyField(animator); 26 | 27 | if (animator.objectReferenceValue != null) { 28 | AnimatorController animatorController = AnimatorControllerExtension.GetEffectiveAnimatorController((Animator)animator.objectReferenceValue); 29 | controller.objectReferenceValue = animatorController; 30 | } 31 | else { 32 | controller.objectReferenceValue = null; 33 | } 34 | 35 | EditorGUILayout.ObjectField("AnimatorController", controller.objectReferenceValue, typeof(AnimatorController), false); 36 | 37 | EditorGUILayout.PropertyField(emitType); 38 | 39 | EditorGUILayout.PropertyField(data); 40 | 41 | serializedObject.ApplyModifiedProperties(); 42 | } 43 | } -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventEmitterWithDataInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f32cc2600058d147a21e6fdedf92154 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventInspector.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Animations; 4 | using System.Collections.Generic; 5 | 6 | 7 | [CustomEditor(typeof(MecanimEventData))] 8 | public class MecanimEventInspector : Editor { 9 | // Controller -> Layer -> State 10 | private Dictionary>>> data; 11 | 12 | void OnEnable() { 13 | LoadData(); 14 | 15 | MecanimEventEditor.eventInspector = this; 16 | } 17 | 18 | void OnDisable() { 19 | //SaveData(); 20 | MecanimEventEditor.eventInspector = null; 21 | 22 | OnPreviewDisable(); 23 | } 24 | 25 | void OnDestroy() { 26 | OnPreviewDestroy(); 27 | } 28 | 29 | public override void OnInspectorGUI () 30 | { 31 | if (GUILayout.Button("Open Event Editor")) { 32 | MecanimEventEditor editor = EditorWindow.GetWindow(); 33 | editor.TargetController = serializedObject.FindProperty("lastEdit").objectReferenceValue; 34 | } 35 | 36 | if (previewedMotion != null && previewedMotion is BlendTree && avatarPreview != null) { 37 | EditorGUILayout.Separator(); 38 | GUILayout.Label("BlendTree Parameter(s)", GUILayout.ExpandWidth(true)); 39 | 40 | BlendTree bt = previewedMotion as BlendTree; 41 | 42 | for (int i = 0; i < bt.GetRecursiveBlendParamCount(); i++) { 43 | float min = bt.GetRecursiveBlendParamMin(i); 44 | float max = bt.GetRecursiveBlendParamMax(i); 45 | 46 | string paramName = bt.GetRecursiveBlendParam(i); 47 | float value = Mathf.Clamp(avatarPreview.Animator.GetFloat(paramName), min, max); 48 | value = EditorGUILayout.Slider(paramName, value, min, max); 49 | avatarPreview.Animator.SetFloat(paramName, value); 50 | } 51 | } 52 | } 53 | 54 | public AnimatorController[] GetControllers() { 55 | return new List(data.Keys).ToArray(); 56 | } 57 | 58 | public void AddController(AnimatorController controller) { 59 | if (!data.ContainsKey(controller)) { 60 | data[controller] = new Dictionary>>(); 61 | } 62 | } 63 | 64 | public MecanimEvent[] GetEvents(AnimatorController controller, int layer, int stateNameHash) { 65 | try { 66 | return data[controller][layer][stateNameHash].ToArray(); 67 | } 68 | catch { 69 | return new MecanimEvent[0]; 70 | } 71 | } 72 | 73 | public void SetEvents(AnimatorController controller, int layer, int stateNameHash, MecanimEvent[] events) { 74 | if (!data.ContainsKey(controller)) { 75 | data[controller] = new Dictionary>>(); 76 | } 77 | 78 | if (!data[controller].ContainsKey(layer)) { 79 | data[controller][layer] = new Dictionary>(); 80 | } 81 | 82 | if (!data[controller][layer].ContainsKey(stateNameHash)) { 83 | data[controller][layer][stateNameHash] = new List(); 84 | } 85 | 86 | data[controller][layer][stateNameHash] = new List(events); 87 | } 88 | 89 | public void InsertEventsCopy(AnimatorController controller, int layer, int stateNameHash, MecanimEvent[] events) { 90 | 91 | List allEvents = new List(GetEvents(controller, layer, stateNameHash)); 92 | 93 | foreach (MecanimEvent e in events) { 94 | allEvents.Add(new MecanimEvent(e)); 95 | } 96 | 97 | SetEvents(controller, layer, stateNameHash, allEvents.ToArray()); 98 | } 99 | 100 | public Dictionary> GetEvents(AnimatorController controller) { 101 | try { 102 | 103 | Dictionary> events = new Dictionary>(); 104 | 105 | foreach(int layer in data[controller].Keys) { 106 | 107 | events[layer] = new Dictionary(); 108 | 109 | foreach (int state in data[controller][layer].Keys) { 110 | 111 | List stateEvents = new List(); 112 | 113 | foreach (MecanimEvent elem in data[controller][layer][state]) { 114 | stateEvents.Add(new MecanimEvent(elem)); 115 | } 116 | 117 | events[layer][state] = stateEvents.ToArray(); 118 | } 119 | } 120 | 121 | return events; 122 | 123 | } 124 | catch { 125 | return new Dictionary>(); 126 | } 127 | } 128 | 129 | public void InsertControllerEventsCopy(AnimatorController controller, Dictionary> events) { 130 | 131 | try { 132 | 133 | foreach (int layer in events.Keys) { 134 | 135 | foreach (int state in events[layer].Keys) { 136 | 137 | InsertEventsCopy(controller, layer, state, events[layer][state]); 138 | 139 | } 140 | } 141 | 142 | } 143 | catch { 144 | 145 | } 146 | 147 | return; 148 | } 149 | 150 | private Motion previewedMotion; 151 | private AvatarPreviewWrapper avatarPreview; 152 | private AnimatorStateMachine stateMachine; 153 | private AnimatorState state; 154 | private AnimatorController controller; 155 | private bool controllerIsDitry; 156 | 157 | private bool PrevIKOnFeet = false; 158 | 159 | public void SetPreviewMotion(Motion motion) { 160 | if (previewedMotion == motion) 161 | return; 162 | 163 | previewedMotion = motion; 164 | 165 | ClearStateMachine(); 166 | 167 | if (avatarPreview == null) 168 | { 169 | avatarPreview = new AvatarPreviewWrapper(null, previewedMotion); 170 | avatarPreview.OnAvatarChangeFunc = this.OnPreviewAvatarChanged; 171 | PrevIKOnFeet = avatarPreview.IKOnFeet; 172 | } 173 | 174 | if (motion != null) 175 | CreateStateMachine(); 176 | 177 | Repaint(); 178 | } 179 | 180 | public float GetPlaybackTime() { 181 | if (avatarPreview != null) 182 | return avatarPreview.timeControl.normalizedTime; 183 | else 184 | return 0; 185 | } 186 | 187 | public void SetPlaybackTime(float time) { 188 | 189 | if (avatarPreview != null) { 190 | avatarPreview.timeControl.nextCurrentTime = Mathf.Lerp(avatarPreview.timeControl.startTime, 191 | avatarPreview.timeControl.stopTime, 192 | time); 193 | } 194 | Repaint(); 195 | } 196 | 197 | public bool IsPlaying() { 198 | return avatarPreview.timeControl.playing; 199 | } 200 | 201 | public void StopPlaying() { 202 | avatarPreview.timeControl.playing = false; 203 | } 204 | 205 | public override bool HasPreviewGUI () { 206 | return true; 207 | } 208 | 209 | public override void OnPreviewSettings () { 210 | if (avatarPreview != null) 211 | avatarPreview.DoPreviewSettings(); 212 | } 213 | 214 | public override void OnInteractivePreviewGUI(Rect r, GUIStyle background) { 215 | if (avatarPreview == null || previewedMotion == null) 216 | return; 217 | 218 | UpdateAvatarState(); 219 | avatarPreview.DoAvatarPreview(r, background); 220 | } 221 | 222 | private void OnPreviewDisable() { 223 | previewedMotion = null; 224 | 225 | ClearStateMachine(); 226 | if (avatarPreview != null) { 227 | avatarPreview.OnDestroy(); 228 | avatarPreview = null; 229 | } 230 | } 231 | 232 | private void OnPreviewDestroy() { 233 | ClearStateMachine(); 234 | if (avatarPreview != null) { 235 | avatarPreview.OnDestroy(); 236 | avatarPreview = null; 237 | } 238 | } 239 | 240 | private void OnPreviewAvatarChanged() { 241 | ResetStateMachine(); 242 | } 243 | 244 | private void CreateStateMachine() { 245 | if (avatarPreview == null || avatarPreview.Animator == null) 246 | return; 247 | 248 | if (controller == null) { 249 | controller = new AnimatorController(); 250 | //controller.hideFlags = HideFlags.DontSave; 251 | controller.SetPushUndo(false); 252 | controller.AddLayer("preview"); 253 | stateMachine = controller.layers[0].stateMachine; 254 | stateMachine.SetPushUndo(false); 255 | 256 | CreateParameters(); 257 | state = stateMachine.AddState("preview"); 258 | state.SetPushUndo(false); 259 | state.motion = previewedMotion; 260 | state.iKOnFeet = this.avatarPreview.IKOnFeet; 261 | state.hideFlags = HideFlags.HideAndDontSave; 262 | controller.hideFlags = HideFlags.HideAndDontSave; 263 | stateMachine.hideFlags = HideFlags.HideAndDontSave; 264 | 265 | AnimatorController.SetAnimatorController(avatarPreview.Animator, controller); 266 | 267 | controller.AppendOnAnimatorControllerDirtyCallback(this.ControllerDitry); 268 | 269 | controllerIsDitry = false; 270 | } 271 | 272 | if (AnimatorControllerExtension.GetEffectiveAnimatorController(avatarPreview.Animator) != this.controller) { 273 | AnimatorController.SetAnimatorController(avatarPreview.Animator, this.controller); 274 | } 275 | 276 | avatarPreview.timeControl.normalizedTime = 0; 277 | } 278 | 279 | private void CreateParameters() { 280 | if (previewedMotion is BlendTree) { 281 | BlendTree blendTree = previewedMotion as BlendTree; 282 | 283 | for (int j = 0; j < blendTree.GetRecursiveBlendParamCount(); j++) { 284 | controller.AddParameter(blendTree.GetRecursiveBlendParam(j), AnimatorControllerParameterType.Float); 285 | } 286 | } 287 | } 288 | 289 | private void ClearStateMachine() { 290 | if (avatarPreview != null && avatarPreview.Animator != null) { 291 | AnimatorController.SetAnimatorController(avatarPreview.Animator, null); 292 | } 293 | 294 | if (this.controller != null) { 295 | controller.RemoveOnAnimatorControllerDirtyCallback(this.ControllerDitry); 296 | } 297 | 298 | Object.DestroyImmediate(this.controller); 299 | //Object.DestroyImmediate(this.stateMachine); 300 | Object.DestroyImmediate(this.state); 301 | stateMachine = null; 302 | controller = null; 303 | state = null; 304 | } 305 | 306 | public void ResetStateMachine() { 307 | ClearStateMachine(); 308 | CreateStateMachine(); 309 | } 310 | 311 | private void ControllerDitry() { 312 | this.controllerIsDitry = true; 313 | } 314 | 315 | private void UpdateAvatarState() { 316 | if (Event.current.type != EventType.Repaint) 317 | return; 318 | 319 | if (avatarPreview.PreviewObject == null || controllerIsDitry) { 320 | 321 | avatarPreview.ResetPreviewInstance(); 322 | 323 | if (avatarPreview.PreviewObject != null) { 324 | ResetStateMachine(); 325 | } 326 | } 327 | 328 | Animator animator = avatarPreview.Animator; 329 | 330 | if (animator != null) { 331 | 332 | if (PrevIKOnFeet != avatarPreview.IKOnFeet) { 333 | 334 | PrevIKOnFeet = avatarPreview.IKOnFeet; 335 | Vector3 rootPosition = avatarPreview.Animator.rootPosition; 336 | Quaternion rootRotation = avatarPreview.Animator.rootRotation; 337 | ResetStateMachine(); 338 | avatarPreview.Animator.UpdateWrapper(avatarPreview.timeControl.currentTime); 339 | avatarPreview.Animator.UpdateWrapper(0f); 340 | avatarPreview.Animator.rootPosition = rootPosition; 341 | avatarPreview.Animator.rootRotation = rootRotation; 342 | } 343 | 344 | if (avatarPreview.Animator != null) { 345 | 346 | BlendTree blendTree = previewedMotion as BlendTree; 347 | 348 | if (blendTree != null) { 349 | 350 | for (int i = 0; i < blendTree.GetRecursiveBlendParamCount(); i++) { 351 | 352 | string recurvieBlendParameter = blendTree.GetRecursiveBlendParam(i); 353 | float inputBlendValue = blendTree.GetInputBlendVal(recurvieBlendParameter); 354 | avatarPreview.Animator.SetFloat(recurvieBlendParameter, inputBlendValue); 355 | } 356 | } 357 | } 358 | 359 | avatarPreview.timeControl.loop = true; 360 | 361 | float length = 1f; 362 | float currentTime = 0f; 363 | if (animator.layerCount > 0) 364 | { 365 | AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0); 366 | length = currentAnimatorStateInfo.length; 367 | currentTime = currentAnimatorStateInfo.normalizedTime; 368 | } 369 | 370 | avatarPreview.timeControl.startTime = 0f; 371 | avatarPreview.timeControl.stopTime = length; 372 | avatarPreview.timeControl.Update(); 373 | 374 | float num3 = this.avatarPreview.timeControl.deltaTime; 375 | if (float.IsInfinity(num3)) 376 | num3 = 0; 377 | 378 | if (!previewedMotion.isLooping) 379 | { 380 | if (currentTime >= 1f) 381 | { 382 | num3 -= length; 383 | } 384 | else 385 | { 386 | if (currentTime < 0f) 387 | { 388 | num3 += length; 389 | } 390 | } 391 | } 392 | 393 | animator.UpdateWrapper(num3); 394 | } 395 | } 396 | 397 | private void LoadData() 398 | { 399 | 400 | MecanimEventData dataSource = target as MecanimEventData; 401 | 402 | data = new Dictionary>>>(); 403 | 404 | if (dataSource.data == null || dataSource.data.Length == 0) 405 | return; 406 | 407 | foreach(MecanimEventDataEntry entry in dataSource.data) { 408 | 409 | AnimatorController animatorController = entry.animatorController as AnimatorController; 410 | 411 | if (animatorController == null) 412 | return; 413 | 414 | if (!data.ContainsKey(animatorController)) 415 | data[animatorController] = new Dictionary>>(); 416 | 417 | if (!data[animatorController].ContainsKey(entry.layer)) { 418 | data[animatorController][entry.layer] = new Dictionary>(); 419 | } 420 | 421 | List events = new List(); 422 | 423 | if (entry.events != null) { 424 | foreach (MecanimEvent e in entry.events) { 425 | 426 | events.Add(new MecanimEvent(e)); 427 | 428 | } 429 | } 430 | 431 | data[animatorController][entry.layer][entry.stateNameHash] = events; 432 | } 433 | } 434 | 435 | public void SaveData() { 436 | 437 | MecanimEventData targetData = target as MecanimEventData; 438 | Undo.RecordObject(target, "Mecanim Event Data"); 439 | 440 | List entries = new List(); 441 | 442 | foreach(AnimatorController controller in data.Keys) { 443 | foreach(int layer in data[controller].Keys) { 444 | foreach(int stateNameHash in data[controller][layer].Keys) { 445 | 446 | if (data[controller][layer][stateNameHash].Count == 0) 447 | continue; 448 | 449 | if (!IsValidState(controller.GetInstanceID(), layer, stateNameHash)) { 450 | continue; 451 | } 452 | 453 | MecanimEventDataEntry entry = new MecanimEventDataEntry(); 454 | entry.animatorController = controller; 455 | entry.layer = layer; 456 | entry.stateNameHash = stateNameHash; 457 | entry.events = data[controller][layer][stateNameHash].ToArray();; 458 | 459 | entries.Add(entry); 460 | } 461 | } 462 | } 463 | 464 | targetData.data = entries.ToArray(); 465 | 466 | EditorUtility.SetDirty(target); 467 | } 468 | 469 | public void SaveLastEditController(UnityEngine.Object controller) { 470 | serializedObject.FindProperty("lastEdit").objectReferenceValue = controller;; 471 | } 472 | 473 | private bool IsValidState(int controllerId, int layer, int stateNameHash) { 474 | if (!IsValidControllerId(controllerId)) 475 | return false; 476 | 477 | if (!IsValidLayer(controllerId, layer)) 478 | return false; 479 | 480 | AnimatorController controller = EditorUtility.InstanceIDToObject(controllerId) as AnimatorController; 481 | AnimatorStateMachine sm; 482 | if (controller.layers[layer].syncedLayerIndex != -1) 483 | { 484 | sm = controller.layers[controller.layers[layer].syncedLayerIndex].stateMachine; 485 | } 486 | else 487 | { 488 | sm = controller.layers[layer].stateMachine; 489 | } 490 | 491 | return FindState(sm, stateNameHash); 492 | } 493 | 494 | 495 | private bool IsValidControllerId(int controllerId) { 496 | AnimatorController controller = EditorUtility.InstanceIDToObject(controllerId) as AnimatorController; 497 | 498 | if (controller == null) 499 | return false; 500 | 501 | return true; 502 | } 503 | 504 | private bool IsValidLayer(int controllerId, int layer) { 505 | AnimatorController controller = EditorUtility.InstanceIDToObject(controllerId) as AnimatorController; 506 | 507 | if (controller == null) 508 | return false; 509 | 510 | if (layer >= 0 && layer < controller.layers.Length) 511 | return true; 512 | else 513 | return false; 514 | } 515 | 516 | private bool FindState(AnimatorStateMachine baseSm, int namehash) { 517 | return FindStateRecursively(baseSm, baseSm, namehash); 518 | } 519 | 520 | private bool FindStateRecursively(AnimatorStateMachine baseSm, AnimatorStateMachine stateMachine, int nameHash) { 521 | 522 | foreach (ChildAnimatorState childState in stateMachine.states) { 523 | if (childState.state.GetFullPathHash(baseSm) == nameHash) 524 | { 525 | return true; 526 | } 527 | } 528 | 529 | foreach (ChildAnimatorStateMachine childStateMachine in stateMachine.stateMachines) { 530 | if (FindStateRecursively(baseSm, childStateMachine.stateMachine, nameHash)) 531 | return true; 532 | } 533 | 534 | return false; 535 | } 536 | } -------------------------------------------------------------------------------- /Assets/Output/EventSystem/Editor/MecanimEventInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fcf814b640a5fd4e91c71b9a400904d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public enum MecanimEventParamTypes { 5 | None, 6 | Int32, 7 | Float, 8 | String, 9 | Boolean, 10 | } 11 | 12 | public enum EventConditionParamTypes { 13 | Int, 14 | Float, 15 | Boolean, 16 | } 17 | 18 | public enum EventConditionModes { 19 | Equal = 0, 20 | NotEqual = 1, 21 | GreaterThan = 2, 22 | LessThan = 3, 23 | GreaterEqualThan = 4, 24 | LessEqualThan = 5, 25 | } 26 | 27 | [System.Serializable] 28 | public class MecanimEvent { 29 | public static EventContext Context { protected set; get; } 30 | 31 | public MecanimEvent() { 32 | condition = new EventCondition(); 33 | } 34 | 35 | public MecanimEvent(MecanimEvent other) { 36 | normalizedTime = other.normalizedTime; 37 | functionName = other.functionName; 38 | paramType = other.paramType; 39 | 40 | switch(paramType) { 41 | case MecanimEventParamTypes.Int32: 42 | intParam = other.intParam; 43 | break; 44 | case MecanimEventParamTypes.Float: 45 | floatParam = other.floatParam; 46 | break; 47 | case MecanimEventParamTypes.String: 48 | stringParam = other.stringParam; 49 | break; 50 | case MecanimEventParamTypes.Boolean: 51 | boolParam = other.boolParam; 52 | break; 53 | } 54 | 55 | condition = new EventCondition(); 56 | condition.conditions = new List(other.condition.conditions); 57 | 58 | critical = other.critical; 59 | 60 | isEnable = other.isEnable; 61 | } 62 | 63 | public string functionName; 64 | public float normalizedTime; 65 | public MecanimEventParamTypes paramType; 66 | 67 | public object parameter { 68 | get { 69 | switch(paramType) { 70 | case MecanimEventParamTypes.Int32: 71 | return intParam; 72 | case MecanimEventParamTypes.Float: 73 | return floatParam; 74 | case MecanimEventParamTypes.String: 75 | return stringParam; 76 | case MecanimEventParamTypes.Boolean: 77 | return boolParam; 78 | default: 79 | return null; 80 | } 81 | } 82 | } 83 | 84 | public int intParam; 85 | public float floatParam; 86 | public string stringParam; 87 | public bool boolParam; 88 | 89 | public EventCondition condition; 90 | public bool critical = false; 91 | 92 | public bool isEnable = true; 93 | 94 | private EventContext context; 95 | 96 | public void SetContext(EventContext context) 97 | { 98 | this.context = context; 99 | this.context.current = this; 100 | } 101 | 102 | public static void SetCurrentContext(MecanimEvent e) 103 | { 104 | MecanimEvent.Context = e.context; 105 | } 106 | } 107 | 108 | [System.Serializable] 109 | public class EventCondition { 110 | public List conditions = new List(); 111 | 112 | public bool Test(Animator animator) { 113 | if (conditions.Count == 0) 114 | return true; 115 | 116 | foreach(EventConditionEntry entry in conditions) { 117 | if (string.IsNullOrEmpty(entry.conditionParam)) 118 | continue; 119 | 120 | switch(entry.conditionParamType) { 121 | case EventConditionParamTypes.Int: 122 | int intTestValue = animator.GetInteger(entry.conditionParam); 123 | switch(entry.conditionMode) { 124 | case EventConditionModes.Equal: 125 | if (intTestValue != entry.intValue) 126 | return false; 127 | 128 | break; 129 | case EventConditionModes.NotEqual: 130 | if (intTestValue == entry.intValue) 131 | return false; 132 | 133 | break; 134 | case EventConditionModes.GreaterThan: 135 | if (intTestValue <= entry.intValue) 136 | return false; 137 | 138 | break; 139 | case EventConditionModes.LessThan: 140 | if (intTestValue >= entry.intValue) 141 | return false; 142 | 143 | break; 144 | case EventConditionModes.GreaterEqualThan: 145 | if (intTestValue < entry.intValue) 146 | return false; 147 | 148 | break; 149 | case EventConditionModes.LessEqualThan: 150 | if (intTestValue > entry.intValue) 151 | return false; 152 | 153 | break; 154 | } 155 | break; 156 | 157 | case EventConditionParamTypes.Float: 158 | float floatTestValue = animator.GetFloat(entry.conditionParam); 159 | 160 | switch(entry.conditionMode) { 161 | case EventConditionModes.GreaterThan: 162 | if (floatTestValue <= entry.floatValue) 163 | return false; 164 | 165 | break; 166 | case EventConditionModes.LessThan: 167 | if (floatTestValue >= entry.floatValue) 168 | return false; 169 | 170 | break; 171 | } 172 | 173 | break; 174 | 175 | case EventConditionParamTypes.Boolean: 176 | bool boolTestValue = animator.GetBool(entry.conditionParam); 177 | 178 | if (boolTestValue != entry.boolValue) 179 | return false; 180 | 181 | break; 182 | } 183 | } 184 | 185 | return true; 186 | } 187 | } 188 | 189 | [System.Serializable] 190 | public class EventConditionEntry { 191 | public string conditionParam; 192 | public EventConditionParamTypes conditionParamType; 193 | public EventConditionModes conditionMode; 194 | public float floatValue; 195 | public int intValue; 196 | public bool boolValue; 197 | } 198 | 199 | public struct EventContext { 200 | public int controllerId; 201 | public int layer; 202 | public int stateHash; 203 | public int tagHash; 204 | public MecanimEvent current; 205 | } -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06ccf156e9282a74097120ac79e55b27 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventData.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Reflection; 4 | 5 | 6 | public class MecanimEventData : MonoBehaviour { 7 | public MecanimEventDataEntry[] data; 8 | 9 | public UnityEngine.Object lastEdit; 10 | } 11 | 12 | [System.Serializable] 13 | public class MecanimEventDataEntry { 14 | public UnityEngine.Object animatorController; 15 | public int layer; 16 | public int stateNameHash; 17 | public MecanimEvent[] events; 18 | 19 | public MecanimEventDataEntry() { 20 | events = new MecanimEvent[0]; 21 | } 22 | 23 | public MecanimEventDataEntry(MecanimEventDataEntry other) { 24 | 25 | this.animatorController = other.animatorController; 26 | this.layer = other.layer; 27 | this.stateNameHash = other.stateNameHash; 28 | 29 | if (other.events == null) 30 | this.events = new MecanimEvent[0]; 31 | else { 32 | this.events = new MecanimEvent[other.events.Length]; 33 | 34 | for (int i = 0; i < this.events.Length; i++) { 35 | 36 | this.events[i] = new MecanimEvent(other.events[i]); 37 | 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30a6360a7e47ce34cb62999cd3a4f5ad 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventEmitter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public enum MecanimEventEmitTypes { 5 | Default, 6 | Upwards, 7 | Broadcast, 8 | } 9 | 10 | public class MecanimEventEmitter : MonoBehaviour { 11 | 12 | public UnityEngine.Object animatorController; 13 | public Animator animator; 14 | public MecanimEventEmitTypes emitType = MecanimEventEmitTypes.Default; 15 | 16 | void Start() { 17 | if (animator == null) { 18 | Debug.LogWarning("Do not find animator component."); 19 | this.enabled = false; 20 | return; 21 | } 22 | 23 | if (animatorController == null) { 24 | Debug.LogWarning("Please assgin animator in editor. Add emitter at runtime is not currently supported."); 25 | this.enabled = false; 26 | return; 27 | } 28 | } 29 | 30 | void Update () { 31 | MecanimEvent[] events = MecanimEventManager.GetEvents(animatorController.GetInstanceID(), animator); 32 | 33 | foreach (MecanimEvent e in events) { 34 | 35 | MecanimEvent.SetCurrentContext(e); 36 | 37 | switch(emitType) 38 | { 39 | case MecanimEventEmitTypes.Upwards: 40 | if (e.paramType != MecanimEventParamTypes.None) 41 | SendMessageUpwards(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); 42 | else 43 | SendMessageUpwards(e.functionName, SendMessageOptions.DontRequireReceiver); 44 | break; 45 | 46 | case MecanimEventEmitTypes.Broadcast: 47 | if (e.paramType != MecanimEventParamTypes.None) 48 | BroadcastMessage(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); 49 | else 50 | BroadcastMessage(e.functionName, SendMessageOptions.DontRequireReceiver); 51 | break; 52 | 53 | default: 54 | if (e.paramType != MecanimEventParamTypes.None) 55 | SendMessage(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); 56 | else 57 | SendMessage(e.functionName, SendMessageOptions.DontRequireReceiver); 58 | break; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventEmitter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b19adf659a2ac70498d118ca11a36f17 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventEmitterWithData.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class MecanimEventEmitterWithData : MonoBehaviour { 6 | 7 | public UnityEngine.Object animatorController; 8 | public Animator animator; 9 | public MecanimEventEmitTypes emitType = MecanimEventEmitTypes.Default; 10 | public MecanimEventData data; 11 | 12 | private Dictionary>>> loadedData; 13 | 14 | private Dictionary> lastStates = new Dictionary>(); 15 | 16 | void Start() { 17 | if (animator == null) { 18 | Debug.LogWarning(string.Format("GameObject:{0} cannot find animator component.",this.transform.name)); 19 | this.enabled = false; 20 | return; 21 | } 22 | 23 | if (animatorController == null) { 24 | Debug.LogWarning("Please assgin animator in editor. Add emitter at runtime is not currently supported."); 25 | this.enabled = false; 26 | return; 27 | } 28 | 29 | if (data == null){ 30 | this.enabled = false; 31 | return; 32 | } 33 | 34 | loadedData = MecanimEventManager.LoadData(data); 35 | } 36 | 37 | void Update () { 38 | MecanimEvent[] events = MecanimEventManager.GetEvents(loadedData, lastStates, animatorController.GetInstanceID(), animator); 39 | 40 | foreach (MecanimEvent e in events) { 41 | 42 | MecanimEvent.SetCurrentContext(e); 43 | 44 | switch(emitType) 45 | { 46 | case MecanimEventEmitTypes.Upwards: 47 | if (e.paramType != MecanimEventParamTypes.None) 48 | SendMessageUpwards(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); 49 | else 50 | SendMessageUpwards(e.functionName, SendMessageOptions.DontRequireReceiver); 51 | break; 52 | 53 | case MecanimEventEmitTypes.Broadcast: 54 | if (e.paramType != MecanimEventParamTypes.None) 55 | BroadcastMessage(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); 56 | else 57 | BroadcastMessage(e.functionName, SendMessageOptions.DontRequireReceiver); 58 | break; 59 | 60 | default: 61 | if (e.paramType != MecanimEventParamTypes.None) 62 | SendMessage(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); 63 | else 64 | SendMessage(e.functionName, SendMessageOptions.DontRequireReceiver); 65 | break; 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventEmitterWithData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8838164af01b824499218e76be89da4c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public static class MecanimEventManager { 5 | private static MecanimEventData[] eventDataSources; 6 | 7 | private static Dictionary>>> globalLoadedData; 8 | 9 | private static Dictionary> globalLastStates = new Dictionary>(); 10 | 11 | 12 | public static void SetEventDataSource(MecanimEventData dataSource) { 13 | if (dataSource != null) { 14 | eventDataSources = new MecanimEventData[1]; 15 | eventDataSources[0] = dataSource; 16 | 17 | LoadGlobalData(); 18 | } 19 | } 20 | 21 | public static void SetEventDataSource(MecanimEventData[] dataSources) { 22 | if (dataSources != null) { 23 | 24 | eventDataSources = dataSources; 25 | 26 | LoadGlobalData(); 27 | } 28 | } 29 | 30 | public static void OnLevelLoaded() { 31 | globalLastStates.Clear(); 32 | } 33 | 34 | public static MecanimEvent[] GetEvents(int animatorControllerId, Animator animator) { 35 | return GetEvents(MecanimEventManager.globalLoadedData, MecanimEventManager.globalLastStates, animatorControllerId, animator); 36 | } 37 | 38 | public static MecanimEvent[] GetEvents(Dictionary>>> contextLoadedData, 39 | Dictionary> contextLastStates, 40 | int animatorControllerId, Animator animator) 41 | { 42 | List allEvents = new List(); 43 | 44 | int animatorHash = animator.GetHashCode(); 45 | if (!contextLastStates.ContainsKey(animatorHash)) 46 | contextLastStates[animatorHash] = new Dictionary(); 47 | 48 | int layerCount = animator.layerCount; 49 | 50 | Dictionary lastLayerState = contextLastStates[animatorHash]; 51 | 52 | for (int layer = 0; layer < layerCount; layer++) { 53 | if (!lastLayerState.ContainsKey(layer)) { 54 | lastLayerState[layer] = new AnimatorStateInfo(); 55 | } 56 | 57 | AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(layer); 58 | 59 | int lastLoop = (int)lastLayerState[layer].normalizedTime; 60 | int currLoop = (int)stateInfo.normalizedTime; 61 | float lastNormalizedTime = lastLayerState[layer].normalizedTime - lastLoop; 62 | float currNormalizedTime = stateInfo.normalizedTime - currLoop; 63 | 64 | if (lastLayerState[layer].fullPathHash == stateInfo.fullPathHash) { 65 | if (stateInfo.loop == true) { 66 | if (lastLoop == currLoop) { 67 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, stateInfo.fullPathHash, stateInfo.tagHash, lastNormalizedTime, currNormalizedTime)); 68 | } 69 | else { 70 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, stateInfo.fullPathHash, stateInfo.tagHash, lastNormalizedTime, 1.00001f)); 71 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, stateInfo.fullPathHash, stateInfo.tagHash, 0.0f, currNormalizedTime)); 72 | } 73 | } 74 | else { 75 | float start = Mathf.Clamp01(lastLayerState[layer].normalizedTime); 76 | float end = Mathf.Clamp01(stateInfo.normalizedTime); 77 | 78 | if (lastLoop == 0 && currLoop == 0) { 79 | if (start != end) 80 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, stateInfo.fullPathHash, stateInfo.tagHash, start, end)); 81 | } 82 | else if (lastLoop == 0 && currLoop > 0) { 83 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, lastLayerState[layer].fullPathHash, lastLayerState[layer].tagHash, start, 1.00001f)); 84 | } 85 | else { 86 | 87 | } 88 | } 89 | } 90 | else { 91 | 92 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, stateInfo.fullPathHash, stateInfo.tagHash, 0.0f, currNormalizedTime)); 93 | 94 | if (!lastLayerState[layer].loop) { 95 | allEvents.AddRange(CollectEvents(contextLoadedData, animator, animatorControllerId, layer, lastLayerState[layer].fullPathHash, lastLayerState[layer].tagHash, lastNormalizedTime, 1.00001f, true)); 96 | } 97 | } 98 | 99 | lastLayerState[layer] = stateInfo; 100 | } 101 | 102 | return allEvents.ToArray(); 103 | } 104 | 105 | private static MecanimEvent[] CollectEvents(Dictionary>>> contextLoadedData, 106 | Animator animator, 107 | int animatorControllerId, 108 | int layer, int nameHash, 109 | int tagHash, 110 | float normalizedTimeStart, 111 | float normalizedTimeEnd, 112 | bool onlyCritical = false) { 113 | List events; 114 | 115 | if (contextLoadedData.ContainsKey(animatorControllerId) && 116 | contextLoadedData[animatorControllerId].ContainsKey(layer) && 117 | contextLoadedData[animatorControllerId][layer].ContainsKey(nameHash)) { 118 | 119 | events = contextLoadedData[animatorControllerId][layer][nameHash]; 120 | } 121 | else { 122 | return new MecanimEvent[0]; 123 | } 124 | 125 | List ret = new List(); 126 | 127 | foreach (MecanimEvent e in events) { 128 | 129 | if (!e.isEnable) 130 | continue; 131 | 132 | if (e.normalizedTime >= normalizedTimeStart && e.normalizedTime < normalizedTimeEnd) { 133 | if (e.condition.Test(animator)) { 134 | 135 | if (onlyCritical && !e.critical) 136 | continue; 137 | 138 | MecanimEvent finalEvent = new MecanimEvent(e); 139 | EventContext context = new EventContext(); 140 | context.controllerId = animatorControllerId; 141 | context.layer = layer; 142 | context.stateHash = nameHash; 143 | context.tagHash = tagHash; 144 | 145 | finalEvent.SetContext(context); 146 | 147 | ret.Add(finalEvent); 148 | } 149 | } 150 | } 151 | 152 | return ret.ToArray(); 153 | } 154 | 155 | private static void LoadGlobalData() { 156 | 157 | if (eventDataSources == null) 158 | return; 159 | 160 | globalLoadedData = new Dictionary>>>(); 161 | 162 | foreach (MecanimEventData dataSource in eventDataSources) { 163 | 164 | if (dataSource == null) 165 | continue; 166 | 167 | MecanimEventDataEntry[] entries = dataSource.data; 168 | 169 | foreach(MecanimEventDataEntry entry in entries) { 170 | int animatorControllerId = entry.animatorController.GetInstanceID(); 171 | 172 | if (!globalLoadedData.ContainsKey(animatorControllerId)) 173 | globalLoadedData[animatorControllerId] = new Dictionary>>(); 174 | 175 | if (!globalLoadedData[animatorControllerId].ContainsKey(entry.layer)) { 176 | globalLoadedData[animatorControllerId][entry.layer] = new Dictionary>(); 177 | } 178 | 179 | globalLoadedData[animatorControllerId][entry.layer][entry.stateNameHash] = new List(entry.events); 180 | } 181 | 182 | } 183 | } 184 | 185 | public static Dictionary>>> LoadData(MecanimEventData data) 186 | { 187 | Dictionary>>> retData = new Dictionary>>>(); 188 | 189 | MecanimEventDataEntry[] entries = data.data; 190 | 191 | foreach(MecanimEventDataEntry entry in entries) { 192 | int animatorControllerId = entry.animatorController.GetInstanceID(); 193 | 194 | if (!retData.ContainsKey(animatorControllerId)) 195 | retData[animatorControllerId] = new Dictionary>>(); 196 | 197 | if (!retData[animatorControllerId].ContainsKey(entry.layer)) { 198 | retData[animatorControllerId][entry.layer] = new Dictionary>(); 199 | } 200 | 201 | retData[animatorControllerId][entry.layer][entry.stateNameHash] = new List(entry.events); 202 | } 203 | 204 | return retData; 205 | } 206 | 207 | } 208 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cd10ceb367b5b247a80373f17d1cac5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventSetupHelper.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class MecanimEventSetupHelper : MonoBehaviour { 5 | public MecanimEventData dataSource; 6 | 7 | public MecanimEventData[] dataSources; 8 | 9 | void Awake() { 10 | if (dataSource == null && (dataSources == null || dataSources.Length == 0)) { 11 | Debug.Log("Please setup data source of event system."); 12 | return; 13 | } 14 | 15 | if (dataSource != null) 16 | MecanimEventManager.SetEventDataSource(dataSource); 17 | else 18 | MecanimEventManager.SetEventDataSource(dataSources); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Output/EventSystem/MecanimEventSetupHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d7e937c2bb40f6409b631cc0f44074b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e6dcce69369d844d854818a802463ce 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 901065fc3752c4759a3d5a70bdd430e0 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Idles.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Animations/Idles.fbx -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/IdlesWave.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Animations/IdlesWave.fbx -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Jump.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Animations/Jump.fbx -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f503e90fb5b0455fb3a812cd08e1eea 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/EyesMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: EyesMaterial 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 0} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: 1, g: 1, b: 1, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/EyesMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61d85804681a74bfbb3d5bd34f9d520e 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/SkinMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: SkinMaterial 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 0} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: 1, g: .793600023, b: .741999984, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/SkinMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b245f976b24d448efaadadd146c9fa7e 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/SuitMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: SuitMaterial 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 0} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: .122000001, g: .122000001, b: .122000001, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/SuitMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66634af4fccab436f9c416e49a8056bd 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/TeethMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: TeethMaterial 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 0} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: 1, g: 1, b: 1, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/TeethMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fd78657da1a7446bb715d937a725ae8 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/TongueMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: TongueMaterial 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 0} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: .5, g: .176999986, b: .176999986, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/TongueMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26f8140631a114959978c0d3342f8cf5 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/body_color_map.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: body_color_map 10 | m_Shader: {fileID: 2, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 2800000, guid: 152f7d9ecfcc59443a15265bb32c8be8, type: 3} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | data: 22 | first: 23 | name: _BumpMap 24 | second: 25 | m_Texture: {fileID: 2800000, guid: b2bbfed00422a404bb1bc18867e0e823, type: 3} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | m_Floats: {} 29 | m_Colors: 30 | data: 31 | first: 32 | name: _Color 33 | second: {r: 1, g: 1, b: 1, a: 1} 34 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/body_color_map.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80680a1b153cf7045a750145a67f9835 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/eyes_color_map.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: eyes_color_map 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 2800000, guid: 5a39d0c1acfa2b54c8585459f5c8ac2f, type: 3} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: 1, g: 1, b: 1, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/eyes_color_map.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12004f2fab0ef064ca2b88b3154dad9a 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/face_color_map.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: face_color_map 10 | m_Shader: {fileID: 2, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 2800000, guid: 5dc4a5349733f72488cdae5089d4eadd, type: 3} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | data: 22 | first: 23 | name: _BumpMap 24 | second: 25 | m_Texture: {fileID: 2800000, guid: 61e5d5b2337bc09478d6e2fef539598f, type: 3} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | m_Floats: {} 29 | m_Colors: 30 | data: 31 | first: 32 | name: _Color 33 | second: {r: 1, g: 1, b: 1, a: 1} 34 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Materials/face_color_map.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb2ae56c03818634fb5fa0c3f4b4a959 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Animations/Runs.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Animations/Runs.fbx -------------------------------------------------------------------------------- /Assets/Output/Example/Characters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb01be0ca98ec4641a598bf259ba21eb 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff48aff1ba9eb4ffaa631f63fc84426c 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2148a962148a44f33b936815fe2358de 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Char_Eye_DIF.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 3 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: U_Char_Eye_DIF 10 | m_Shader: {fileID: 7, guid: 0000000000000000e000000000000000, type: 0} 11 | m_SavedProperties: 12 | serializedVersion: 2 13 | m_TexEnvs: 14 | data: 15 | first: 16 | name: _MainTex 17 | second: 18 | m_Texture: {fileID: 2800000, guid: 1f18d3e23db63a84fa7e5940207b2437, type: 3} 19 | m_Scale: {x: 1, y: 1} 20 | m_Offset: {x: 0, y: 0} 21 | m_Floats: {} 22 | m_Colors: 23 | data: 24 | first: 25 | name: _Color 26 | second: {r: 1, g: 1, b: 1, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Char_Eye_DIF.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1df4fadf17c21d245a75f30ce214801b 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Char_Eye_DIF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Characters/U_Character/Materials/U_Char_Eye_DIF.png -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Char_Eye_DIF.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe656932f0014ab449f59cd2545e503e 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Character_Body-DIF.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: U_Character_Body-DIF 10 | m_Shader: {fileID: 4, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 2800000, guid: a2bca24b3a511d840813f4f13ce9ae2a, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _MainTex: 26 | m_Texture: {fileID: 2800000, guid: 9e3f62e121b9d584f9349b2df9e70c32, type: 3} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | m_Floats: 30 | - _Shininess: 0.17688258 31 | m_Colors: 32 | - _Color: {r: 1, g: 1, b: 1, a: 1} 33 | - _SpecColor: {r: 0.37254903, g: 0.34509805, b: 0.29411766, a: 1} 34 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Character_Body-DIF.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67f217eeebe9dc944a3c59ba03d4427b 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Character_Head-DIF.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: U_Character_Head-DIF 10 | m_Shader: {fileID: 4, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 2800000, guid: 0b54b0e04c279e44e828e5a28308f08a, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _MainTex: 26 | m_Texture: {fileID: 2800000, guid: ee39f3f206cde1c4f9a5d28d533505a6, type: 3} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | m_Floats: 30 | - _Shininess: 0.078125 31 | m_Colors: 32 | - _Color: {r: 1, g: 1, b: 1, a: 1} 33 | - _SpecColor: {r: 0.37254903, g: 0.34509805, b: 0.29411766, a: 1} 34 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/Materials/U_Character_Head-DIF.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7901945ba2c708a418dd8cfcdc585ba8 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Body-DIF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Characters/U_Character/U_Character_Body-DIF.png -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Body-DIF.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e3f62e121b9d584f9349b2df9e70c32 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Body-NM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Characters/U_Character/U_Character_Body-NM.png -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Body-NM.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2bca24b3a511d840813f4f13ce9ae2a 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 1 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Head-DIF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Characters/U_Character/U_Character_Head-DIF.png -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Head-DIF.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee39f3f206cde1c4f9a5d28d533505a6 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Head-NM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Characters/U_Character/U_Character_Head-NM.png -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_Head-NM.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b54b0e04c279e44e828e5a28308f08a 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 1 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Output/Example/Characters/U_Character/U_Character_REF.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Example/Characters/U_Character/U_Character_REF.fbx -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11bbae73d8d8d401ea76bbf9f3b1df80 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers/UpperBodyMask.mask: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!319 &101100000 4 | AvatarMask: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: UpperBodyMask 9 | m_Mask: 00000000000000000000000000000000000000000100000001000000010000000100000000000000000000000100000001000000 10 | m_Elements: [] 11 | -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers/UpperBodyMask.mask.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0587fffd944a8354994d844197aa72e9 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers/controller(2D).controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: controller(2D) 9 | serializedVersion: 5 10 | m_AnimatorParameters: 11 | - m_Name: Speed 12 | m_Type: 1 13 | m_DefaultFloat: 0 14 | m_DefaultInt: 0 15 | m_DefaultBool: 0 16 | m_Controller: {fileID: 9100000} 17 | - m_Name: Direction 18 | m_Type: 1 19 | m_DefaultFloat: 0 20 | m_DefaultInt: 0 21 | m_DefaultBool: 0 22 | m_Controller: {fileID: 9100000} 23 | - m_Name: Jump 24 | m_Type: 4 25 | m_DefaultFloat: 0 26 | m_DefaultInt: 0 27 | m_DefaultBool: 0 28 | m_Controller: {fileID: 9100000} 29 | - m_Name: Hi 30 | m_Type: 4 31 | m_DefaultFloat: 0 32 | m_DefaultInt: 0 33 | m_DefaultBool: 0 34 | m_Controller: {fileID: 9100000} 35 | - m_Name: IntConditionTest 36 | m_Type: 3 37 | m_DefaultFloat: 0 38 | m_DefaultInt: 0 39 | m_DefaultBool: 0 40 | m_Controller: {fileID: 9100000} 41 | m_AnimatorLayers: 42 | - serializedVersion: 5 43 | m_Name: Base Layer 44 | m_StateMachine: {fileID: 110700000} 45 | m_Mask: {fileID: 0} 46 | m_Motions: [] 47 | m_Behaviours: [] 48 | m_BlendingMode: 0 49 | m_SyncedLayerIndex: -1 50 | m_DefaultWeight: 0 51 | m_IKPass: 0 52 | m_SyncedLayerAffectsTiming: 0 53 | m_Controller: {fileID: 9100000} 54 | - serializedVersion: 5 55 | m_Name: Arms Layer 56 | m_StateMachine: {fileID: 110700002} 57 | m_Mask: {fileID: 101100000, guid: 0587fffd944a8354994d844197aa72e9, type: 2} 58 | m_Motions: [] 59 | m_Behaviours: [] 60 | m_BlendingMode: 0 61 | m_SyncedLayerIndex: -1 62 | m_DefaultWeight: 0 63 | m_IKPass: 0 64 | m_SyncedLayerAffectsTiming: 0 65 | m_Controller: {fileID: 9100000} 66 | --- !u!206 &20600000 67 | BlendTree: 68 | m_ObjectHideFlags: 1 69 | m_PrefabParentObject: {fileID: 0} 70 | m_PrefabInternal: {fileID: 0} 71 | m_Name: Blend Tree 72 | m_Childs: 73 | - serializedVersion: 2 74 | m_Motion: {fileID: 7400026, guid: b35bea543177b624b8e504a16956614d, type: 3} 75 | m_Threshold: -1 76 | m_Position: {x: -1, y: 1} 77 | m_TimeScale: 1 78 | m_CycleOffset: 0 79 | m_DirectBlendParameter: 80 | m_Mirror: 0 81 | - serializedVersion: 2 82 | m_Motion: {fileID: 7400024, guid: b35bea543177b624b8e504a16956614d, type: 3} 83 | m_Threshold: 0 84 | m_Position: {x: 0, y: 1} 85 | m_TimeScale: 1 86 | m_CycleOffset: 0 87 | m_DirectBlendParameter: 88 | m_Mirror: 0 89 | - serializedVersion: 2 90 | m_Motion: {fileID: 7400022, guid: b35bea543177b624b8e504a16956614d, type: 3} 91 | m_Threshold: 1 92 | m_Position: {x: 1, y: 1} 93 | m_TimeScale: 1 94 | m_CycleOffset: 0 95 | m_DirectBlendParameter: 96 | m_Mirror: 0 97 | - serializedVersion: 2 98 | m_Motion: {fileID: 7400020, guid: ce448a8080b4e934b8473badd27be402, type: 3} 99 | m_Threshold: 2 100 | m_Position: {x: 0, y: 0} 101 | m_TimeScale: 1 102 | m_CycleOffset: 0 103 | m_DirectBlendParameter: 104 | m_Mirror: 0 105 | m_BlendParameter: Direction 106 | m_BlendParameterY: Speed 107 | m_MinThreshold: -1 108 | m_MaxThreshold: 2 109 | m_UseAutomaticThresholds: 0 110 | m_NormalizedBlendValues: 0 111 | m_BlendType: 2 112 | --- !u!1101 &110100000 113 | AnimatorStateTransition: 114 | m_ObjectHideFlags: 3 115 | m_PrefabParentObject: {fileID: 0} 116 | m_PrefabInternal: {fileID: 0} 117 | m_Name: 118 | m_Conditions: 119 | - m_ConditionMode: 3 120 | m_ConditionEvent: Speed 121 | m_EventTreshold: 0.1 122 | m_DstStateMachine: {fileID: 0} 123 | m_DstState: {fileID: 110287193} 124 | m_Solo: 0 125 | m_Mute: 0 126 | m_IsExit: 0 127 | serializedVersion: 3 128 | m_TransitionDuration: 0.019436263 129 | m_TransitionOffset: 0 130 | m_ExitTime: 0.9 131 | m_HasExitTime: 0 132 | m_HasFixedDuration: 0 133 | m_InterruptionSource: 0 134 | m_OrderedInterruption: 1 135 | m_CanTransitionToSelf: 1 136 | --- !u!1101 &110124237 137 | AnimatorStateTransition: 138 | m_ObjectHideFlags: 3 139 | m_PrefabParentObject: {fileID: 0} 140 | m_PrefabInternal: {fileID: 0} 141 | m_Name: 142 | m_Conditions: 143 | - m_ConditionMode: 1 144 | m_ConditionEvent: Hi 145 | m_EventTreshold: 0 146 | m_DstStateMachine: {fileID: 0} 147 | m_DstState: {fileID: 110231924} 148 | m_Solo: 0 149 | m_Mute: 0 150 | m_IsExit: 0 151 | serializedVersion: 3 152 | m_TransitionDuration: 0.1 153 | m_TransitionOffset: 0 154 | m_ExitTime: 0.9 155 | m_HasExitTime: 0 156 | m_HasFixedDuration: 0 157 | m_InterruptionSource: 0 158 | m_OrderedInterruption: 1 159 | m_CanTransitionToSelf: 1 160 | --- !u!1101 &110125602 161 | AnimatorStateTransition: 162 | m_ObjectHideFlags: 3 163 | m_PrefabParentObject: {fileID: 0} 164 | m_PrefabInternal: {fileID: 0} 165 | m_Name: 166 | m_Conditions: 167 | - m_ConditionMode: 1 168 | m_ConditionEvent: Hi 169 | m_EventTreshold: 0 170 | m_DstStateMachine: {fileID: 0} 171 | m_DstState: {fileID: 110215397} 172 | m_Solo: 0 173 | m_Mute: 0 174 | m_IsExit: 0 175 | serializedVersion: 3 176 | m_TransitionDuration: 0.1 177 | m_TransitionOffset: 0 178 | m_ExitTime: 0.9 179 | m_HasExitTime: 0 180 | m_HasFixedDuration: 0 181 | m_InterruptionSource: 0 182 | m_OrderedInterruption: 1 183 | m_CanTransitionToSelf: 1 184 | --- !u!1101 &110150258 185 | AnimatorStateTransition: 186 | m_ObjectHideFlags: 3 187 | m_PrefabParentObject: {fileID: 0} 188 | m_PrefabInternal: {fileID: 0} 189 | m_Name: 190 | m_Conditions: [] 191 | m_DstStateMachine: {fileID: 0} 192 | m_DstState: {fileID: 110285268} 193 | m_Solo: 0 194 | m_Mute: 0 195 | m_IsExit: 0 196 | serializedVersion: 3 197 | m_TransitionDuration: 0.06880733 198 | m_TransitionOffset: 0 199 | m_ExitTime: 0.93119264 200 | m_HasExitTime: 1 201 | m_HasFixedDuration: 0 202 | m_InterruptionSource: 0 203 | m_OrderedInterruption: 1 204 | m_CanTransitionToSelf: 1 205 | --- !u!1101 &110170435 206 | AnimatorStateTransition: 207 | m_ObjectHideFlags: 3 208 | m_PrefabParentObject: {fileID: 0} 209 | m_PrefabInternal: {fileID: 0} 210 | m_Name: 211 | m_Conditions: [] 212 | m_DstStateMachine: {fileID: 0} 213 | m_DstState: {fileID: 110287193} 214 | m_Solo: 0 215 | m_Mute: 0 216 | m_IsExit: 0 217 | serializedVersion: 3 218 | m_TransitionDuration: 0.041156307 219 | m_TransitionOffset: 0.63821256 220 | m_ExitTime: 0.6705247 221 | m_HasExitTime: 1 222 | m_HasFixedDuration: 0 223 | m_InterruptionSource: 0 224 | m_OrderedInterruption: 1 225 | m_CanTransitionToSelf: 1 226 | --- !u!1101 &110181839 227 | AnimatorStateTransition: 228 | m_ObjectHideFlags: 3 229 | m_PrefabParentObject: {fileID: 0} 230 | m_PrefabInternal: {fileID: 0} 231 | m_Name: 232 | m_Conditions: 233 | - m_ConditionMode: 1 234 | m_ConditionEvent: Jump 235 | m_EventTreshold: 0 236 | m_DstStateMachine: {fileID: 0} 237 | m_DstState: {fileID: 110246486} 238 | m_Solo: 0 239 | m_Mute: 0 240 | m_IsExit: 0 241 | serializedVersion: 3 242 | m_TransitionDuration: 0.021790352 243 | m_TransitionOffset: 0.0089328205 244 | m_ExitTime: 0.9 245 | m_HasExitTime: 0 246 | m_HasFixedDuration: 0 247 | m_InterruptionSource: 0 248 | m_OrderedInterruption: 1 249 | m_CanTransitionToSelf: 1 250 | --- !u!1101 &110192737 251 | AnimatorStateTransition: 252 | m_ObjectHideFlags: 3 253 | m_PrefabParentObject: {fileID: 0} 254 | m_PrefabInternal: {fileID: 0} 255 | m_Name: 256 | m_Conditions: 257 | - m_ConditionMode: 4 258 | m_ConditionEvent: Speed 259 | m_EventTreshold: 0.1 260 | m_DstStateMachine: {fileID: 0} 261 | m_DstState: {fileID: 110200000} 262 | m_Solo: 0 263 | m_Mute: 0 264 | m_IsExit: 0 265 | serializedVersion: 3 266 | m_TransitionDuration: 0.44233668 267 | m_TransitionOffset: 0 268 | m_ExitTime: 0.9 269 | m_HasExitTime: 0 270 | m_HasFixedDuration: 0 271 | m_InterruptionSource: 0 272 | m_OrderedInterruption: 1 273 | m_CanTransitionToSelf: 1 274 | --- !u!1101 &110195122 275 | AnimatorStateTransition: 276 | m_ObjectHideFlags: 3 277 | m_PrefabParentObject: {fileID: 0} 278 | m_PrefabInternal: {fileID: 0} 279 | m_Name: 280 | m_Conditions: [] 281 | m_DstStateMachine: {fileID: 0} 282 | m_DstState: {fileID: 110260110} 283 | m_Solo: 0 284 | m_Mute: 0 285 | m_IsExit: 0 286 | serializedVersion: 3 287 | m_TransitionDuration: 0.06880733 288 | m_TransitionOffset: 0 289 | m_ExitTime: 0.93119264 290 | m_HasExitTime: 1 291 | m_HasFixedDuration: 0 292 | m_InterruptionSource: 0 293 | m_OrderedInterruption: 1 294 | m_CanTransitionToSelf: 1 295 | --- !u!1102 &110200000 296 | AnimatorState: 297 | serializedVersion: 5 298 | m_ObjectHideFlags: 3 299 | m_PrefabParentObject: {fileID: 0} 300 | m_PrefabInternal: {fileID: 0} 301 | m_Name: Idle 302 | m_Speed: 1 303 | m_CycleOffset: 0 304 | m_Transitions: [] 305 | m_StateMachineBehaviours: [] 306 | m_Position: {x: 432, y: 216, z: 0} 307 | m_IKOnFeet: 1 308 | m_WriteDefaultValues: 1 309 | m_Mirror: 0 310 | m_SpeedParameterActive: 0 311 | m_MirrorParameterActive: 0 312 | m_CycleOffsetParameterActive: 0 313 | m_TimeParameterActive: 0 314 | m_Motion: {fileID: 7400014, guid: ce448a8080b4e934b8473badd27be402, type: 3} 315 | m_Tag: 316 | m_SpeedParameter: 317 | m_MirrorParameter: 318 | m_CycleOffsetParameter: 319 | m_TimeParameter: 320 | --- !u!1102 &110215397 321 | AnimatorState: 322 | serializedVersion: 5 323 | m_ObjectHideFlags: 3 324 | m_PrefabParentObject: {fileID: 0} 325 | m_PrefabInternal: {fileID: 0} 326 | m_Name: Wave 327 | m_Speed: 1 328 | m_CycleOffset: 0 329 | m_Transitions: 330 | - {fileID: 110150258} 331 | m_StateMachineBehaviours: [] 332 | m_Position: {x: 297, y: 59, z: 0} 333 | m_IKOnFeet: 1 334 | m_WriteDefaultValues: 1 335 | m_Mirror: 0 336 | m_SpeedParameterActive: 0 337 | m_MirrorParameterActive: 0 338 | m_CycleOffsetParameterActive: 0 339 | m_TimeParameterActive: 0 340 | m_Motion: {fileID: 7400002, guid: c387a0e47b4244f2b86c50372341024a, type: 3} 341 | m_Tag: 342 | m_SpeedParameter: 343 | m_MirrorParameter: 344 | m_CycleOffsetParameter: 345 | m_TimeParameter: 346 | --- !u!1102 &110231924 347 | AnimatorState: 348 | serializedVersion: 5 349 | m_ObjectHideFlags: 3 350 | m_PrefabParentObject: {fileID: 0} 351 | m_PrefabInternal: {fileID: 0} 352 | m_Name: Wave 353 | m_Speed: 1 354 | m_CycleOffset: 0 355 | m_Transitions: [] 356 | m_StateMachineBehaviours: [] 357 | m_Position: {x: 577, y: 69, z: 0} 358 | m_IKOnFeet: 1 359 | m_WriteDefaultValues: 1 360 | m_Mirror: 0 361 | m_SpeedParameterActive: 0 362 | m_MirrorParameterActive: 0 363 | m_CycleOffsetParameterActive: 0 364 | m_TimeParameterActive: 0 365 | m_Motion: {fileID: 7400002, guid: c387a0e47b4244f2b86c50372341024a, type: 3} 366 | m_Tag: 367 | m_SpeedParameter: 368 | m_MirrorParameter: 369 | m_CycleOffsetParameter: 370 | m_TimeParameter: 371 | --- !u!1102 &110246486 372 | AnimatorState: 373 | serializedVersion: 5 374 | m_ObjectHideFlags: 3 375 | m_PrefabParentObject: {fileID: 0} 376 | m_PrefabInternal: {fileID: 0} 377 | m_Name: Jump 378 | m_Speed: 1 379 | m_CycleOffset: 0 380 | m_Transitions: 381 | - {fileID: 110170435} 382 | m_StateMachineBehaviours: [] 383 | m_Position: {x: 432, y: -48, z: 0} 384 | m_IKOnFeet: 1 385 | m_WriteDefaultValues: 1 386 | m_Mirror: 0 387 | m_SpeedParameterActive: 0 388 | m_MirrorParameterActive: 0 389 | m_CycleOffsetParameterActive: 0 390 | m_TimeParameterActive: 0 391 | m_Motion: {fileID: 7400012, guid: cbb67ab5509bfe24dba7db2d65a9632f, type: 3} 392 | m_Tag: 393 | m_SpeedParameter: 394 | m_MirrorParameter: 395 | m_CycleOffsetParameter: 396 | m_TimeParameter: 397 | --- !u!1102 &110260110 398 | AnimatorState: 399 | serializedVersion: 5 400 | m_ObjectHideFlags: 3 401 | m_PrefabParentObject: {fileID: 0} 402 | m_PrefabInternal: {fileID: 0} 403 | m_Name: New State 404 | m_Speed: 1 405 | m_CycleOffset: 0 406 | m_Transitions: [] 407 | m_StateMachineBehaviours: [] 408 | m_Position: {x: 275, y: 157, z: 0} 409 | m_IKOnFeet: 1 410 | m_WriteDefaultValues: 1 411 | m_Mirror: 0 412 | m_SpeedParameterActive: 0 413 | m_MirrorParameterActive: 0 414 | m_CycleOffsetParameterActive: 0 415 | m_TimeParameterActive: 0 416 | m_Motion: {fileID: 0} 417 | m_Tag: 418 | m_SpeedParameter: 419 | m_MirrorParameter: 420 | m_CycleOffsetParameter: 421 | m_TimeParameter: 422 | --- !u!1102 &110285268 423 | AnimatorState: 424 | serializedVersion: 5 425 | m_ObjectHideFlags: 3 426 | m_PrefabParentObject: {fileID: 0} 427 | m_PrefabInternal: {fileID: 0} 428 | m_Name: null state 429 | m_Speed: 1 430 | m_CycleOffset: 0 431 | m_Transitions: 432 | - {fileID: 110125602} 433 | m_StateMachineBehaviours: [] 434 | m_Position: {x: 336, y: -84, z: 0} 435 | m_IKOnFeet: 1 436 | m_WriteDefaultValues: 1 437 | m_Mirror: 0 438 | m_SpeedParameterActive: 0 439 | m_MirrorParameterActive: 0 440 | m_CycleOffsetParameterActive: 0 441 | m_TimeParameterActive: 0 442 | m_Motion: {fileID: 0} 443 | m_Tag: 444 | m_SpeedParameter: 445 | m_MirrorParameter: 446 | m_CycleOffsetParameter: 447 | m_TimeParameter: 448 | --- !u!1102 &110287193 449 | AnimatorState: 450 | serializedVersion: 5 451 | m_ObjectHideFlags: 3 452 | m_PrefabParentObject: {fileID: 0} 453 | m_PrefabInternal: {fileID: 0} 454 | m_Name: Motion 455 | m_Speed: 1 456 | m_CycleOffset: 0 457 | m_Transitions: 458 | - {fileID: 110181839} 459 | m_StateMachineBehaviours: [] 460 | m_Position: {x: 432, y: 84, z: 0} 461 | m_IKOnFeet: 1 462 | m_WriteDefaultValues: 1 463 | m_Mirror: 0 464 | m_SpeedParameterActive: 0 465 | m_MirrorParameterActive: 0 466 | m_CycleOffsetParameterActive: 0 467 | m_TimeParameterActive: 0 468 | m_Motion: {fileID: 20600000} 469 | m_Tag: 470 | m_SpeedParameter: 471 | m_MirrorParameter: 472 | m_CycleOffsetParameter: 473 | m_TimeParameter: 474 | --- !u!1107 &110700000 475 | AnimatorStateMachine: 476 | serializedVersion: 5 477 | m_ObjectHideFlags: 3 478 | m_PrefabParentObject: {fileID: 0} 479 | m_PrefabInternal: {fileID: 0} 480 | m_Name: Base Layer 481 | m_ChildStates: 482 | - serializedVersion: 1 483 | m_State: {fileID: 110287193} 484 | m_Position: {x: 432, y: 84, z: 0} 485 | - serializedVersion: 1 486 | m_State: {fileID: 110246486} 487 | m_Position: {x: 432, y: -48, z: 0} 488 | m_ChildStateMachines: [] 489 | m_AnyStateTransitions: [] 490 | m_EntryTransitions: [] 491 | m_StateMachineTransitions: 492 | - first: {fileID: 110700000} 493 | second: [] 494 | m_StateMachineBehaviours: [] 495 | m_AnyStatePosition: {x: 48, y: 24, z: 0} 496 | m_EntryPosition: {x: 50, y: 120, z: 0} 497 | m_ExitPosition: {x: 800, y: 120, z: 0} 498 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 499 | m_DefaultState: {fileID: 110287193} 500 | --- !u!1107 &110700002 501 | AnimatorStateMachine: 502 | serializedVersion: 5 503 | m_ObjectHideFlags: 1 504 | m_PrefabParentObject: {fileID: 0} 505 | m_PrefabInternal: {fileID: 0} 506 | m_Name: Arms Layer 507 | m_ChildStates: 508 | - serializedVersion: 1 509 | m_State: {fileID: 110285268} 510 | m_Position: {x: 336, y: -84, z: 0} 511 | - serializedVersion: 1 512 | m_State: {fileID: 110215397} 513 | m_Position: {x: 297, y: 59, z: 0} 514 | m_ChildStateMachines: [] 515 | m_AnyStateTransitions: [] 516 | m_EntryTransitions: [] 517 | m_StateMachineTransitions: 518 | - first: {fileID: 110700002} 519 | second: [] 520 | m_StateMachineBehaviours: [] 521 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 522 | m_EntryPosition: {x: 50, y: 120, z: 0} 523 | m_ExitPosition: {x: 800, y: 120, z: 0} 524 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 525 | m_DefaultState: {fileID: 110285268} 526 | --- !u!1107 &110786782 527 | AnimatorStateMachine: 528 | serializedVersion: 5 529 | m_ObjectHideFlags: 1 530 | m_PrefabParentObject: {fileID: 0} 531 | m_PrefabInternal: {fileID: 0} 532 | m_Name: New Layer 533 | m_ChildStates: [] 534 | m_ChildStateMachines: [] 535 | m_AnyStateTransitions: [] 536 | m_EntryTransitions: [] 537 | m_StateMachineTransitions: 538 | - first: {fileID: 110786782} 539 | second: [] 540 | m_StateMachineBehaviours: [] 541 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 542 | m_EntryPosition: {x: 50, y: 120, z: 0} 543 | m_ExitPosition: {x: 800, y: 120, z: 0} 544 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 545 | m_DefaultState: {fileID: 0} 546 | -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers/controller(2D).controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1f5594a6bfeb0b4f97965ff3759272a 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers/controller.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: controller 9 | serializedVersion: 5 10 | m_AnimatorParameters: 11 | - m_Name: Speed 12 | m_Type: 1 13 | m_DefaultFloat: 0 14 | m_DefaultInt: 0 15 | m_DefaultBool: 0 16 | m_Controller: {fileID: 9100000} 17 | - m_Name: Direction 18 | m_Type: 1 19 | m_DefaultFloat: 0 20 | m_DefaultInt: 0 21 | m_DefaultBool: 0 22 | m_Controller: {fileID: 9100000} 23 | - m_Name: Jump 24 | m_Type: 4 25 | m_DefaultFloat: 0 26 | m_DefaultInt: 0 27 | m_DefaultBool: 0 28 | m_Controller: {fileID: 9100000} 29 | - m_Name: Hi 30 | m_Type: 4 31 | m_DefaultFloat: 0 32 | m_DefaultInt: 0 33 | m_DefaultBool: 0 34 | m_Controller: {fileID: 9100000} 35 | - m_Name: IntConditionTest 36 | m_Type: 3 37 | m_DefaultFloat: 0 38 | m_DefaultInt: 0 39 | m_DefaultBool: 0 40 | m_Controller: {fileID: 9100000} 41 | m_AnimatorLayers: 42 | - serializedVersion: 5 43 | m_Name: Base Layer 44 | m_StateMachine: {fileID: 110700000} 45 | m_Mask: {fileID: 0} 46 | m_Motions: [] 47 | m_Behaviours: [] 48 | m_BlendingMode: 0 49 | m_SyncedLayerIndex: -1 50 | m_DefaultWeight: 0 51 | m_IKPass: 0 52 | m_SyncedLayerAffectsTiming: 0 53 | m_Controller: {fileID: 9100000} 54 | - serializedVersion: 5 55 | m_Name: Arms Layer 56 | m_StateMachine: {fileID: 110700002} 57 | m_Mask: {fileID: 0} 58 | m_Motions: [] 59 | m_Behaviours: [] 60 | m_BlendingMode: 0 61 | m_SyncedLayerIndex: -1 62 | m_DefaultWeight: 0 63 | m_IKPass: 0 64 | m_SyncedLayerAffectsTiming: 0 65 | m_Controller: {fileID: 9100000} 66 | --- !u!206 &20600000 67 | BlendTree: 68 | m_ObjectHideFlags: 1 69 | m_PrefabParentObject: {fileID: 0} 70 | m_PrefabInternal: {fileID: 0} 71 | m_Name: Blend Tree 72 | m_Childs: 73 | - serializedVersion: 2 74 | m_Motion: {fileID: 7400026, guid: b35bea543177b624b8e504a16956614d, type: 3} 75 | m_Threshold: -1 76 | m_Position: {x: 0, y: 0} 77 | m_TimeScale: 1 78 | m_CycleOffset: 0 79 | m_DirectBlendParameter: 80 | m_Mirror: 0 81 | - serializedVersion: 2 82 | m_Motion: {fileID: 7400024, guid: b35bea543177b624b8e504a16956614d, type: 3} 83 | m_Threshold: 0 84 | m_Position: {x: 0, y: 0} 85 | m_TimeScale: 1 86 | m_CycleOffset: 0 87 | m_DirectBlendParameter: 88 | m_Mirror: 0 89 | - serializedVersion: 2 90 | m_Motion: {fileID: 7400022, guid: b35bea543177b624b8e504a16956614d, type: 3} 91 | m_Threshold: 1 92 | m_Position: {x: 0, y: 0} 93 | m_TimeScale: 1 94 | m_CycleOffset: 0 95 | m_DirectBlendParameter: 96 | m_Mirror: 0 97 | m_BlendParameter: Direction 98 | m_BlendParameterY: Direction 99 | m_MinThreshold: -1 100 | m_MaxThreshold: 1 101 | m_UseAutomaticThresholds: 0 102 | m_NormalizedBlendValues: 0 103 | m_BlendType: 0 104 | --- !u!1101 &110100000 105 | AnimatorStateTransition: 106 | m_ObjectHideFlags: 3 107 | m_PrefabParentObject: {fileID: 0} 108 | m_PrefabInternal: {fileID: 0} 109 | m_Name: 110 | m_Conditions: 111 | - m_ConditionMode: 3 112 | m_ConditionEvent: Speed 113 | m_EventTreshold: 0.1 114 | m_DstStateMachine: {fileID: 0} 115 | m_DstState: {fileID: 110287193} 116 | m_Solo: 0 117 | m_Mute: 0 118 | m_IsExit: 0 119 | serializedVersion: 3 120 | m_TransitionDuration: 0.019436263 121 | m_TransitionOffset: 0 122 | m_ExitTime: 0.9 123 | m_HasExitTime: 0 124 | m_HasFixedDuration: 0 125 | m_InterruptionSource: 0 126 | m_OrderedInterruption: 1 127 | m_CanTransitionToSelf: 1 128 | --- !u!1101 &110124237 129 | AnimatorStateTransition: 130 | m_ObjectHideFlags: 3 131 | m_PrefabParentObject: {fileID: 0} 132 | m_PrefabInternal: {fileID: 0} 133 | m_Name: 134 | m_Conditions: 135 | - m_ConditionMode: 1 136 | m_ConditionEvent: Hi 137 | m_EventTreshold: 0 138 | m_DstStateMachine: {fileID: 0} 139 | m_DstState: {fileID: 110231924} 140 | m_Solo: 0 141 | m_Mute: 0 142 | m_IsExit: 0 143 | serializedVersion: 3 144 | m_TransitionDuration: 0.1 145 | m_TransitionOffset: 0 146 | m_ExitTime: 0.9 147 | m_HasExitTime: 0 148 | m_HasFixedDuration: 0 149 | m_InterruptionSource: 0 150 | m_OrderedInterruption: 1 151 | m_CanTransitionToSelf: 1 152 | --- !u!1101 &110125602 153 | AnimatorStateTransition: 154 | m_ObjectHideFlags: 3 155 | m_PrefabParentObject: {fileID: 0} 156 | m_PrefabInternal: {fileID: 0} 157 | m_Name: 158 | m_Conditions: 159 | - m_ConditionMode: 1 160 | m_ConditionEvent: Hi 161 | m_EventTreshold: 0 162 | m_DstStateMachine: {fileID: 0} 163 | m_DstState: {fileID: 110215397} 164 | m_Solo: 0 165 | m_Mute: 0 166 | m_IsExit: 0 167 | serializedVersion: 3 168 | m_TransitionDuration: 0.1 169 | m_TransitionOffset: 0 170 | m_ExitTime: 0.9 171 | m_HasExitTime: 0 172 | m_HasFixedDuration: 0 173 | m_InterruptionSource: 0 174 | m_OrderedInterruption: 1 175 | m_CanTransitionToSelf: 1 176 | --- !u!1101 &110150258 177 | AnimatorStateTransition: 178 | m_ObjectHideFlags: 3 179 | m_PrefabParentObject: {fileID: 0} 180 | m_PrefabInternal: {fileID: 0} 181 | m_Name: 182 | m_Conditions: [] 183 | m_DstStateMachine: {fileID: 0} 184 | m_DstState: {fileID: 110285268} 185 | m_Solo: 0 186 | m_Mute: 0 187 | m_IsExit: 0 188 | serializedVersion: 3 189 | m_TransitionDuration: 0.06880733 190 | m_TransitionOffset: 0 191 | m_ExitTime: 0.93119264 192 | m_HasExitTime: 1 193 | m_HasFixedDuration: 0 194 | m_InterruptionSource: 0 195 | m_OrderedInterruption: 1 196 | m_CanTransitionToSelf: 1 197 | --- !u!1101 &110170435 198 | AnimatorStateTransition: 199 | m_ObjectHideFlags: 3 200 | m_PrefabParentObject: {fileID: 0} 201 | m_PrefabInternal: {fileID: 0} 202 | m_Name: 203 | m_Conditions: [] 204 | m_DstStateMachine: {fileID: 0} 205 | m_DstState: {fileID: 110287193} 206 | m_Solo: 0 207 | m_Mute: 0 208 | m_IsExit: 0 209 | serializedVersion: 3 210 | m_TransitionDuration: 0.0974026 211 | m_TransitionOffset: 0.6845211 212 | m_ExitTime: 0.9025974 213 | m_HasExitTime: 1 214 | m_HasFixedDuration: 0 215 | m_InterruptionSource: 0 216 | m_OrderedInterruption: 1 217 | m_CanTransitionToSelf: 1 218 | --- !u!1101 &110181839 219 | AnimatorStateTransition: 220 | m_ObjectHideFlags: 3 221 | m_PrefabParentObject: {fileID: 0} 222 | m_PrefabInternal: {fileID: 0} 223 | m_Name: 224 | m_Conditions: 225 | - m_ConditionMode: 1 226 | m_ConditionEvent: Jump 227 | m_EventTreshold: 0 228 | m_DstStateMachine: {fileID: 0} 229 | m_DstState: {fileID: 110246486} 230 | m_Solo: 0 231 | m_Mute: 0 232 | m_IsExit: 0 233 | serializedVersion: 3 234 | m_TransitionDuration: 0.44233668 235 | m_TransitionOffset: 0.0089328205 236 | m_ExitTime: 0.9 237 | m_HasExitTime: 0 238 | m_HasFixedDuration: 0 239 | m_InterruptionSource: 0 240 | m_OrderedInterruption: 1 241 | m_CanTransitionToSelf: 1 242 | --- !u!1101 &110192737 243 | AnimatorStateTransition: 244 | m_ObjectHideFlags: 3 245 | m_PrefabParentObject: {fileID: 0} 246 | m_PrefabInternal: {fileID: 0} 247 | m_Name: 248 | m_Conditions: 249 | - m_ConditionMode: 4 250 | m_ConditionEvent: Speed 251 | m_EventTreshold: 0.1 252 | m_DstStateMachine: {fileID: 0} 253 | m_DstState: {fileID: 110200000} 254 | m_Solo: 0 255 | m_Mute: 0 256 | m_IsExit: 0 257 | serializedVersion: 3 258 | m_TransitionDuration: 0.44233668 259 | m_TransitionOffset: 0 260 | m_ExitTime: 0.9 261 | m_HasExitTime: 0 262 | m_HasFixedDuration: 0 263 | m_InterruptionSource: 0 264 | m_OrderedInterruption: 1 265 | m_CanTransitionToSelf: 1 266 | --- !u!1101 &110195122 267 | AnimatorStateTransition: 268 | m_ObjectHideFlags: 3 269 | m_PrefabParentObject: {fileID: 0} 270 | m_PrefabInternal: {fileID: 0} 271 | m_Name: 272 | m_Conditions: [] 273 | m_DstStateMachine: {fileID: 0} 274 | m_DstState: {fileID: 110260110} 275 | m_Solo: 0 276 | m_Mute: 0 277 | m_IsExit: 0 278 | serializedVersion: 3 279 | m_TransitionDuration: 0.06880733 280 | m_TransitionOffset: 0 281 | m_ExitTime: 0.93119264 282 | m_HasExitTime: 1 283 | m_HasFixedDuration: 0 284 | m_InterruptionSource: 0 285 | m_OrderedInterruption: 1 286 | m_CanTransitionToSelf: 1 287 | --- !u!1102 &110200000 288 | AnimatorState: 289 | serializedVersion: 5 290 | m_ObjectHideFlags: 3 291 | m_PrefabParentObject: {fileID: 0} 292 | m_PrefabInternal: {fileID: 0} 293 | m_Name: Idle 294 | m_Speed: 1 295 | m_CycleOffset: 0 296 | m_Transitions: 297 | - {fileID: 110100000} 298 | m_StateMachineBehaviours: [] 299 | m_Position: {x: 432, y: 216, z: 0} 300 | m_IKOnFeet: 1 301 | m_WriteDefaultValues: 1 302 | m_Mirror: 0 303 | m_SpeedParameterActive: 0 304 | m_MirrorParameterActive: 0 305 | m_CycleOffsetParameterActive: 0 306 | m_TimeParameterActive: 0 307 | m_Motion: {fileID: 7400014, guid: ce448a8080b4e934b8473badd27be402, type: 3} 308 | m_Tag: 309 | m_SpeedParameter: 310 | m_MirrorParameter: 311 | m_CycleOffsetParameter: 312 | m_TimeParameter: 313 | --- !u!1102 &110215397 314 | AnimatorState: 315 | serializedVersion: 5 316 | m_ObjectHideFlags: 3 317 | m_PrefabParentObject: {fileID: 0} 318 | m_PrefabInternal: {fileID: 0} 319 | m_Name: Wave 320 | m_Speed: 1 321 | m_CycleOffset: 0 322 | m_Transitions: 323 | - {fileID: 110150258} 324 | m_StateMachineBehaviours: [] 325 | m_Position: {x: 300, y: 60, z: 0} 326 | m_IKOnFeet: 1 327 | m_WriteDefaultValues: 1 328 | m_Mirror: 0 329 | m_SpeedParameterActive: 0 330 | m_MirrorParameterActive: 0 331 | m_CycleOffsetParameterActive: 0 332 | m_TimeParameterActive: 0 333 | m_Motion: {fileID: 7400002, guid: c387a0e47b4244f2b86c50372341024a, type: 3} 334 | m_Tag: 335 | m_SpeedParameter: 336 | m_MirrorParameter: 337 | m_CycleOffsetParameter: 338 | m_TimeParameter: 339 | --- !u!1102 &110231924 340 | AnimatorState: 341 | serializedVersion: 5 342 | m_ObjectHideFlags: 3 343 | m_PrefabParentObject: {fileID: 0} 344 | m_PrefabInternal: {fileID: 0} 345 | m_Name: Wave 346 | m_Speed: 1 347 | m_CycleOffset: 0 348 | m_Transitions: [] 349 | m_StateMachineBehaviours: [] 350 | m_Position: {x: 577, y: 69, z: 0} 351 | m_IKOnFeet: 1 352 | m_WriteDefaultValues: 1 353 | m_Mirror: 0 354 | m_SpeedParameterActive: 0 355 | m_MirrorParameterActive: 0 356 | m_CycleOffsetParameterActive: 0 357 | m_TimeParameterActive: 0 358 | m_Motion: {fileID: 7400002, guid: c387a0e47b4244f2b86c50372341024a, type: 3} 359 | m_Tag: 360 | m_SpeedParameter: 361 | m_MirrorParameter: 362 | m_CycleOffsetParameter: 363 | m_TimeParameter: 364 | --- !u!1102 &110246486 365 | AnimatorState: 366 | serializedVersion: 5 367 | m_ObjectHideFlags: 3 368 | m_PrefabParentObject: {fileID: 0} 369 | m_PrefabInternal: {fileID: 0} 370 | m_Name: Jump 371 | m_Speed: 1 372 | m_CycleOffset: 0 373 | m_Transitions: 374 | - {fileID: 110170435} 375 | m_StateMachineBehaviours: [] 376 | m_Position: {x: 432, y: -48, z: 0} 377 | m_IKOnFeet: 1 378 | m_WriteDefaultValues: 1 379 | m_Mirror: 0 380 | m_SpeedParameterActive: 0 381 | m_MirrorParameterActive: 0 382 | m_CycleOffsetParameterActive: 0 383 | m_TimeParameterActive: 0 384 | m_Motion: {fileID: 7400012, guid: cbb67ab5509bfe24dba7db2d65a9632f, type: 3} 385 | m_Tag: 386 | m_SpeedParameter: 387 | m_MirrorParameter: 388 | m_CycleOffsetParameter: 389 | m_TimeParameter: 390 | --- !u!1102 &110260110 391 | AnimatorState: 392 | serializedVersion: 5 393 | m_ObjectHideFlags: 3 394 | m_PrefabParentObject: {fileID: 0} 395 | m_PrefabInternal: {fileID: 0} 396 | m_Name: New State 397 | m_Speed: 1 398 | m_CycleOffset: 0 399 | m_Transitions: [] 400 | m_StateMachineBehaviours: [] 401 | m_Position: {x: 275, y: 157, z: 0} 402 | m_IKOnFeet: 1 403 | m_WriteDefaultValues: 1 404 | m_Mirror: 0 405 | m_SpeedParameterActive: 0 406 | m_MirrorParameterActive: 0 407 | m_CycleOffsetParameterActive: 0 408 | m_TimeParameterActive: 0 409 | m_Motion: {fileID: 0} 410 | m_Tag: 411 | m_SpeedParameter: 412 | m_MirrorParameter: 413 | m_CycleOffsetParameter: 414 | m_TimeParameter: 415 | --- !u!1102 &110285268 416 | AnimatorState: 417 | serializedVersion: 5 418 | m_ObjectHideFlags: 3 419 | m_PrefabParentObject: {fileID: 0} 420 | m_PrefabInternal: {fileID: 0} 421 | m_Name: null state 422 | m_Speed: 1 423 | m_CycleOffset: 0 424 | m_Transitions: 425 | - {fileID: 110125602} 426 | m_StateMachineBehaviours: [] 427 | m_Position: {x: 336, y: -84, z: 0} 428 | m_IKOnFeet: 1 429 | m_WriteDefaultValues: 1 430 | m_Mirror: 0 431 | m_SpeedParameterActive: 0 432 | m_MirrorParameterActive: 0 433 | m_CycleOffsetParameterActive: 0 434 | m_TimeParameterActive: 0 435 | m_Motion: {fileID: 0} 436 | m_Tag: 437 | m_SpeedParameter: 438 | m_MirrorParameter: 439 | m_CycleOffsetParameter: 440 | m_TimeParameter: 441 | --- !u!1102 &110287193 442 | AnimatorState: 443 | serializedVersion: 5 444 | m_ObjectHideFlags: 3 445 | m_PrefabParentObject: {fileID: 0} 446 | m_PrefabInternal: {fileID: 0} 447 | m_Name: Run 448 | m_Speed: 1 449 | m_CycleOffset: 0 450 | m_Transitions: 451 | - {fileID: 110192737} 452 | - {fileID: 110181839} 453 | m_StateMachineBehaviours: [] 454 | m_Position: {x: 432, y: 84, z: 0} 455 | m_IKOnFeet: 1 456 | m_WriteDefaultValues: 1 457 | m_Mirror: 0 458 | m_SpeedParameterActive: 0 459 | m_MirrorParameterActive: 0 460 | m_CycleOffsetParameterActive: 0 461 | m_TimeParameterActive: 0 462 | m_Motion: {fileID: 20600000} 463 | m_Tag: 464 | m_SpeedParameter: 465 | m_MirrorParameter: 466 | m_CycleOffsetParameter: 467 | m_TimeParameter: 468 | --- !u!1107 &110700000 469 | AnimatorStateMachine: 470 | serializedVersion: 5 471 | m_ObjectHideFlags: 3 472 | m_PrefabParentObject: {fileID: 0} 473 | m_PrefabInternal: {fileID: 0} 474 | m_Name: Base Layer 475 | m_ChildStates: 476 | - serializedVersion: 1 477 | m_State: {fileID: 110200000} 478 | m_Position: {x: 432, y: 216, z: 0} 479 | - serializedVersion: 1 480 | m_State: {fileID: 110287193} 481 | m_Position: {x: 432, y: 84, z: 0} 482 | - serializedVersion: 1 483 | m_State: {fileID: 110246486} 484 | m_Position: {x: 432, y: -48, z: 0} 485 | m_ChildStateMachines: [] 486 | m_AnyStateTransitions: [] 487 | m_EntryTransitions: [] 488 | m_StateMachineTransitions: 489 | - first: {fileID: 110700000} 490 | second: [] 491 | - first: {fileID: 0} 492 | second: [] 493 | m_StateMachineBehaviours: [] 494 | m_AnyStatePosition: {x: 48, y: 24, z: 0} 495 | m_EntryPosition: {x: 50, y: 120, z: 0} 496 | m_ExitPosition: {x: 800, y: 120, z: 0} 497 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 498 | m_DefaultState: {fileID: 110200000} 499 | --- !u!1107 &110700002 500 | AnimatorStateMachine: 501 | serializedVersion: 5 502 | m_ObjectHideFlags: 1 503 | m_PrefabParentObject: {fileID: 0} 504 | m_PrefabInternal: {fileID: 0} 505 | m_Name: Arms Layer 506 | m_ChildStates: 507 | - serializedVersion: 1 508 | m_State: {fileID: 110285268} 509 | m_Position: {x: 336, y: -84, z: 0} 510 | - serializedVersion: 1 511 | m_State: {fileID: 110215397} 512 | m_Position: {x: 300, y: 60, z: 0} 513 | m_ChildStateMachines: [] 514 | m_AnyStateTransitions: [] 515 | m_EntryTransitions: [] 516 | m_StateMachineTransitions: 517 | - first: {fileID: 110700002} 518 | second: [] 519 | m_StateMachineBehaviours: [] 520 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 521 | m_EntryPosition: {x: 50, y: 120, z: 0} 522 | m_ExitPosition: {x: 800, y: 120, z: 0} 523 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 524 | m_DefaultState: {fileID: 110285268} 525 | --- !u!1107 &110770124 526 | AnimatorStateMachine: 527 | serializedVersion: 5 528 | m_ObjectHideFlags: 1 529 | m_PrefabParentObject: {fileID: 0} 530 | m_PrefabInternal: {fileID: 0} 531 | m_Name: New Layer 532 | m_ChildStates: [] 533 | m_ChildStateMachines: [] 534 | m_AnyStateTransitions: [] 535 | m_EntryTransitions: [] 536 | m_StateMachineTransitions: 537 | - first: {fileID: 110770124} 538 | second: [] 539 | m_StateMachineBehaviours: [] 540 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 541 | m_EntryPosition: {x: 50, y: 120, z: 0} 542 | m_ExitPosition: {x: 800, y: 120, z: 0} 543 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 544 | m_DefaultState: {fileID: 0} 545 | -------------------------------------------------------------------------------- /Assets/Output/Example/Controllers/controller.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 042914e107241244896b36a14ff15f88 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06c212c35cefb4c9abf13e1e8ef1e0d9 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Prefabs/Character.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f224da07fd800945a5b636396695d63 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Prefabs/EventDataNode.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 5 9 | m_Component: 10 | - component: {fileID: 400000} 11 | - component: {fileID: 11400000} 12 | m_Layer: 0 13 | m_Name: EventDataNode 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &400000 20 | Transform: 21 | m_ObjectHideFlags: 1 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | m_GameObject: {fileID: 100000} 25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 26 | m_LocalPosition: {x: -15.299771, y: 0.8926487, z: -2.0670526} 27 | m_LocalScale: {x: 1, y: 1, z: 1} 28 | m_Children: [] 29 | m_Father: {fileID: 0} 30 | m_RootOrder: 0 31 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 32 | --- !u!114 &11400000 33 | MonoBehaviour: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 100000} 38 | m_Enabled: 1 39 | m_EditorHideFlags: 0 40 | m_Script: {fileID: 11500000, guid: 30a6360a7e47ce34cb62999cd3a4f5ad, type: 3} 41 | m_Name: 42 | m_EditorClassIdentifier: 43 | data: 44 | - animatorController: {fileID: 9100000, guid: 042914e107241244896b36a14ff15f88, 45 | type: 2} 46 | layer: 0 47 | stateNameHash: 1432961145 48 | events: 49 | - functionName: OnIdleUpdate 50 | normalizedTime: 0 51 | paramType: 2 52 | intParam: 0 53 | floatParam: 3.1415925 54 | stringParam: 55 | boolParam: 0 56 | condition: 57 | conditions: [] 58 | critical: 0 59 | isEnable: 1 60 | - animatorController: {fileID: 9100000, guid: 042914e107241244896b36a14ff15f88, 61 | type: 2} 62 | layer: 0 63 | stateNameHash: -827840423 64 | events: 65 | - functionName: OnLeftFootGrounded 66 | normalizedTime: 0.60048723 67 | paramType: 1 68 | intParam: -1 69 | floatParam: 0 70 | stringParam: 71 | boolParam: 0 72 | condition: 73 | conditions: [] 74 | critical: 0 75 | isEnable: 1 76 | - functionName: OnRightFootGrounded 77 | normalizedTime: 0.94640684 78 | paramType: 1 79 | intParam: 1 80 | floatParam: 0 81 | stringParam: 82 | boolParam: 0 83 | condition: 84 | conditions: [] 85 | critical: 0 86 | isEnable: 1 87 | - animatorController: {fileID: 9100000, guid: 042914e107241244896b36a14ff15f88, 88 | type: 2} 89 | layer: 0 90 | stateNameHash: 788460410 91 | events: 92 | - functionName: OnJumpStarted 93 | normalizedTime: 0.30816078 94 | paramType: 4 95 | intParam: 0 96 | floatParam: 0 97 | stringParam: 98 | boolParam: 0 99 | condition: 100 | conditions: [] 101 | critical: 0 102 | isEnable: 1 103 | - functionName: OnJumpGrounded 104 | normalizedTime: 0.48945147 105 | paramType: 3 106 | intParam: 0 107 | floatParam: 0 108 | stringParam: OK 109 | boolParam: 0 110 | condition: 111 | conditions: [] 112 | critical: 0 113 | isEnable: 1 114 | - functionName: JumpEndCritical 115 | normalizedTime: 0.6329114 116 | paramType: 0 117 | intParam: 0 118 | floatParam: 0 119 | stringParam: 120 | boolParam: 0 121 | condition: 122 | conditions: [] 123 | critical: 1 124 | isEnable: 1 125 | lastEdit: {fileID: 9100000, guid: c1f5594a6bfeb0b4f97965ff3759272a, type: 2} 126 | --- !u!1001 &100100000 127 | Prefab: 128 | m_ObjectHideFlags: 1 129 | serializedVersion: 2 130 | m_Modification: 131 | m_TransformParent: {fileID: 0} 132 | m_Modifications: [] 133 | m_RemovedComponents: [] 134 | m_ParentPrefab: {fileID: 0} 135 | m_RootGameObject: {fileID: 100000} 136 | m_IsPrefabParent: 1 137 | -------------------------------------------------------------------------------- /Assets/Output/Example/Prefabs/EventDataNode.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e08e092d5f0fe740b95e0a6975944fc 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Prefabs/Main Camera.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 5 9 | m_Component: 10 | - component: {fileID: 400000} 11 | - component: {fileID: 2000000} 12 | - component: {fileID: 9200000} 13 | - component: {fileID: 12400000} 14 | - component: {fileID: 8100000} 15 | - component: {fileID: 11400000} 16 | - component: {fileID: 11400002} 17 | m_Layer: 0 18 | m_Name: Main Camera 19 | m_TagString: MainCamera 20 | m_Icon: {fileID: 0} 21 | m_NavMeshLayer: 0 22 | m_StaticEditorFlags: 0 23 | m_IsActive: 1 24 | --- !u!4 &400000 25 | Transform: 26 | m_ObjectHideFlags: 1 27 | m_PrefabParentObject: {fileID: 0} 28 | m_PrefabInternal: {fileID: 100100000} 29 | m_GameObject: {fileID: 100000} 30 | m_LocalRotation: {x: 0.14854892, y: 0.52424365, z: -0.09342712, w: 0.83329064} 31 | m_LocalPosition: {x: -31.777897, y: 8.532151, z: -19.308655} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!20 &2000000 38 | Camera: 39 | m_ObjectHideFlags: 1 40 | m_PrefabParentObject: {fileID: 0} 41 | m_PrefabInternal: {fileID: 100100000} 42 | m_GameObject: {fileID: 100000} 43 | m_Enabled: 1 44 | serializedVersion: 2 45 | m_ClearFlags: 1 46 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 47 | m_NormalizedViewPortRect: 48 | serializedVersion: 2 49 | x: 0 50 | y: 0 51 | width: 1 52 | height: 1 53 | near clip plane: 0.3 54 | far clip plane: 1000 55 | field of view: 60 56 | orthographic: 0 57 | orthographic size: 100 58 | m_Depth: -1 59 | m_CullingMask: 60 | serializedVersion: 2 61 | m_Bits: 4294967295 62 | m_RenderingPath: -1 63 | m_TargetTexture: {fileID: 0} 64 | m_TargetDisplay: 0 65 | m_TargetEye: 3 66 | m_HDR: 0 67 | m_AllowMSAA: 1 68 | m_ForceIntoRT: 0 69 | m_OcclusionCulling: 1 70 | m_StereoConvergence: 10 71 | m_StereoSeparation: 0.022 72 | --- !u!81 &8100000 73 | AudioListener: 74 | m_ObjectHideFlags: 1 75 | m_PrefabParentObject: {fileID: 0} 76 | m_PrefabInternal: {fileID: 100100000} 77 | m_GameObject: {fileID: 100000} 78 | m_Enabled: 1 79 | --- !u!92 &9200000 80 | Behaviour: 81 | m_ObjectHideFlags: 1 82 | m_PrefabParentObject: {fileID: 0} 83 | m_PrefabInternal: {fileID: 100100000} 84 | m_GameObject: {fileID: 100000} 85 | m_Enabled: 1 86 | --- !u!114 &11400000 87 | MonoBehaviour: 88 | m_ObjectHideFlags: 1 89 | m_PrefabParentObject: {fileID: 0} 90 | m_PrefabInternal: {fileID: 100100000} 91 | m_GameObject: {fileID: 100000} 92 | m_Enabled: 1 93 | m_EditorHideFlags: 0 94 | m_Script: {fileID: 11500000, guid: 32c8fa2dc8dc24838986e31aaa0b16be, type: 3} 95 | m_Name: 96 | m_EditorClassIdentifier: 97 | distanceAway: 4 98 | distanceUp: 4 99 | smooth: 3 100 | --- !u!114 &11400002 101 | MonoBehaviour: 102 | m_ObjectHideFlags: 1 103 | m_PrefabParentObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 100000} 106 | m_Enabled: 1 107 | m_EditorHideFlags: 0 108 | m_Script: {fileID: 11500000, guid: 6d7e937c2bb40f6409b631cc0f44074b, type: 3} 109 | m_Name: 110 | m_EditorClassIdentifier: 111 | dataSource: {fileID: 11400000, guid: 4e08e092d5f0fe740b95e0a6975944fc, type: 2} 112 | dataSources: [] 113 | --- !u!124 &12400000 114 | Behaviour: 115 | m_ObjectHideFlags: 1 116 | m_PrefabParentObject: {fileID: 0} 117 | m_PrefabInternal: {fileID: 100100000} 118 | m_GameObject: {fileID: 100000} 119 | m_Enabled: 1 120 | --- !u!1001 &100100000 121 | Prefab: 122 | m_ObjectHideFlags: 1 123 | serializedVersion: 2 124 | m_Modification: 125 | m_TransformParent: {fileID: 0} 126 | m_Modifications: [] 127 | m_RemovedComponents: [] 128 | m_ParentPrefab: {fileID: 0} 129 | m_RootGameObject: {fileID: 100000} 130 | m_IsPrefabParent: 1 131 | -------------------------------------------------------------------------------- /Assets/Output/Example/Prefabs/Main Camera.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f8d2ef94975d4ebb8995c2ebe18da88 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7b31c35b7d9c49678cf1a07858c4041 3 | folderAsset: yes 4 | timeCreated: 1452804359 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scenes/Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6a690004127dfa478de722e47aa40ff 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scenes/ExampleJump.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0ebfc49dac2b447ba66d8a149b0c48d 3 | timeCreated: 1452804378 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc54fe9efe8843448abee637a115ad42 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/IdleRunJump.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class IdleRunJump : MonoBehaviour { 5 | 6 | 7 | protected Animator animator; 8 | public float DirectionDampTime = .25f; 9 | public bool ApplyGravity = true; 10 | 11 | // Use this for initialization 12 | void Start () 13 | { 14 | animator = GetComponent(); 15 | 16 | if(animator.layerCount >= 2) 17 | animator.SetLayerWeight(1, 1); 18 | } 19 | 20 | // Update is called once per frame 21 | void Update () 22 | { 23 | 24 | if (animator) 25 | { 26 | AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0); 27 | 28 | if (stateInfo.IsName("Base Layer.Motion")) 29 | { 30 | if (Input.GetButton("Fire1") || Input.GetKey(KeyCode.Space)) animator.SetBool("Jump", true); 31 | } 32 | else 33 | { 34 | animator.SetBool("Jump", false); 35 | } 36 | 37 | if(Input.GetButtonDown("Fire2") && animator.layerCount >= 2) 38 | { 39 | animator.SetBool("Hi", !animator.GetBool("Hi")); 40 | } 41 | 42 | 43 | float h = Input.GetAxis("Horizontal"); 44 | float v = Input.GetAxis("Vertical"); 45 | 46 | animator.SetFloat("Speed", h*h+v*v); 47 | animator.SetFloat("Direction", h, DirectionDampTime, Time.deltaTime); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/IdleRunJump.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c026a26bfd98f3e4fa9c736a173aaa79 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/IdleRunJumpExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class IdleRunJumpExample : MonoBehaviour { 5 | 6 | 7 | protected Animator animator; 8 | public float DirectionDampTime = .25f; 9 | public bool ApplyGravity = true; 10 | 11 | // Use this for initialization 12 | void Start () 13 | { 14 | animator = GetComponent(); 15 | 16 | if(animator.layerCount >= 2) 17 | animator.SetLayerWeight(1, 1); 18 | } 19 | 20 | // Update is called once per frame 21 | void Update () 22 | { 23 | 24 | if (animator) 25 | { 26 | if (Input.GetButton("Fire1") || Input.GetKey(KeyCode.Space)) 27 | { 28 | animator.SetBool("Jump", true); 29 | } 30 | 31 | if(Input.GetButtonDown("Fire2") && animator.layerCount >= 2) 32 | { 33 | animator.SetBool("Hi", !animator.GetBool("Hi")); 34 | } 35 | 36 | 37 | float h = Input.GetAxis("Horizontal"); 38 | float v = Input.GetAxis("Vertical"); 39 | 40 | animator.SetFloat("Speed", h*h+v*v); 41 | animator.SetFloat("Direction", h, DirectionDampTime, Time.deltaTime); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/IdleRunJumpExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ca1df0a6d8e74724ba07a242771fb73 3 | timeCreated: 1452804488 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/MessageReceiverExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class MessageReceiverExample : MonoBehaviour { 5 | string msg; 6 | 7 | void OnIdleUpdate(float param) { 8 | msg = string.Format("OnIdleUpdate received with parameter: {0} {1}", param.GetType(), param); 9 | 10 | // You can also get event context by accessing ... 11 | // MecanimEvent.Context 12 | 13 | //Debug.Log(MecanimEvent.Context.stateHash); 14 | } 15 | 16 | void OnLeftFootGrounded(int param) { 17 | msg = string.Format("OnLeftFootGrounded received with parameter: {0} {1}", param.GetType(), param); 18 | } 19 | 20 | void OnRightFootGrounded(int param) { 21 | msg = string.Format("OnRightFootGrounded received with parameter: {0} {1}", param.GetType(), param); 22 | } 23 | 24 | void OnJumpGrounded(string param) { 25 | msg = string.Format("OnJumpGrounded received with parameter: {0} {1}", param.GetType(), param); 26 | } 27 | 28 | void OnJumpStarted(bool param) { 29 | msg = string.Format("OnJumpGrounded received with parameter: {0} {1}", param.GetType(), param); 30 | } 31 | 32 | void JumpEndCritical() { 33 | msg = string.Format("JumpEndCritical received with no parameter"); 34 | } 35 | 36 | void OnWaved() { 37 | msg = string.Format("OnWaved received"); 38 | } 39 | 40 | void OnGUI() { 41 | GUI.Label(new Rect(20,40,600,20), msg); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/MessageReceiverExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b92d833f1fae2d441baf0a8e48ca4f2b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/MessageReceiverJumpExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class MessageReceiverJumpExample : MonoBehaviour { 5 | string msg; 6 | protected Animator animator; 7 | 8 | // Use this for initialization 9 | void Start () 10 | { 11 | animator = GetComponent(); 12 | } 13 | void OnIdleUpdate(float param) { 14 | msg = string.Format("OnIdleUpdate received with parameter: {0} {1}", param.GetType(), param); 15 | 16 | // You can also get event context by accessing ... 17 | // MecanimEvent.Context 18 | 19 | //Debug.Log(MecanimEvent.Context.stateHash); 20 | } 21 | 22 | void OnLeftFootGrounded(int param) { 23 | msg = string.Format("OnLeftFootGrounded received with parameter: {0} {1}", param.GetType(), param); 24 | } 25 | 26 | void OnRightFootGrounded(int param) { 27 | msg = string.Format("OnRightFootGrounded received with parameter: {0} {1}", param.GetType(), param); 28 | } 29 | 30 | void OnJumpGrounded(string param) { 31 | msg = string.Format("OnJumpGrounded received with parameter: {0} {1}", param.GetType(), param); 32 | } 33 | 34 | void OnJumpStarted(bool param) { 35 | msg = string.Format("OnJumpGrounded received with parameter: {0} {1}", param.GetType(), param); 36 | } 37 | 38 | void JumpEndCritical() { 39 | msg = string.Format("JumpEndCritical received with no parameter"); 40 | if(animator!=null) 41 | { 42 | animator.SetBool("Jump", false); 43 | } 44 | } 45 | 46 | void OnWaved() { 47 | msg = string.Format("OnWaved received"); 48 | } 49 | 50 | void OnGUI() { 51 | GUI.Label(new Rect(20,40,600,20), msg); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/MessageReceiverJumpExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67b63e48efd7541a4881345a65eb2c89 3 | timeCreated: 1452804403 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/ThirdPersonCamera.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ThirdPersonCamera : MonoBehaviour 5 | { 6 | public float distanceAway; // distance from the back of the craft 7 | public float distanceUp; // distance above the craft 8 | public float smooth; // how smooth the camera movement is 9 | 10 | private GameObject hovercraft; // to store the hovercraft 11 | private Vector3 targetPosition; // the position the camera is trying to be in 12 | 13 | Transform follow; 14 | 15 | void Start(){ 16 | follow = GameObject.FindWithTag ("Player").transform; 17 | } 18 | 19 | void LateUpdate () 20 | { 21 | // setting the target position to be the correct offset from the hovercraft 22 | targetPosition = follow.position + Vector3.up * distanceUp - follow.forward * distanceAway; 23 | 24 | // making a smooth transition between it's current position and the position it wants to be in 25 | transform.position = Vector3.Lerp(transform.position, targetPosition, Time.deltaTime * smooth); 26 | 27 | // make sure the camera is looking the right way! 28 | transform.LookAt(follow); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/Output/Example/Scripts/ThirdPersonCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32c8fa2dc8dc24838986e31aaa0b16be 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 100 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Output/Tutorial1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ginurx/MecanimEventSystem/4dae50f594c29d5de788d7060a2835cacb936cb7/Assets/Output/Tutorial1.pdf -------------------------------------------------------------------------------- /Assets/Output/Tutorial1.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 179006e508f2d204a944e2515828a475 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Output/Tutorial2.txt: -------------------------------------------------------------------------------- 1 | Introduce of MecanimEventEmitterWithData 2 | 3 | MecanimEventEmitterWithData reads data from its data field in inspector. 4 | While MecanimEventEmitter reads global data which was configured by a gameobject attached MecanimEventSetupHelper. 5 | 6 | With the help of MecanimEventEmitterWithData you can create event data node for each emitter 7 | so that a character can be packed with its controller and event data into one bundle. 8 | 9 | 10 | -------------------------------------------------------------------------------- /Assets/Output/Tutorial2.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f0b3e8825744a64ebdda61553ecb891 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Qin Zhuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | m_AutoSyncTransforms: 1 21 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 0 11 | m_SpritePackerPaddingPower: 1 12 | m_EtcTextureCompressorBehavior: 1 13 | m_EtcTextureFastCompressor: 1 14 | m_EtcTextureNormalCompressor: 2 15 | m_EtcTextureBestCompressor: 4 16 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 17 | m_ProjectGenerationRootNamespace: 18 | m_UserGeneratedProjectSuffix: 19 | m_CollabEditorSettings: 20 | inProgressEnabled: 1 21 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | productGUID: 26a3dad97e8adc64f98c33721a265aff 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | defaultScreenOrientation: 4 11 | targetDevice: 2 12 | useOnDemandResources: 0 13 | accelerometerFrequency: 60 14 | companyName: DefaultCompany 15 | productName: MecanimEventSystem 16 | defaultCursor: {fileID: 0} 17 | cursorHotspot: {x: 0, y: 0} 18 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 19 | m_ShowUnitySplashScreen: 1 20 | m_ShowUnitySplashLogo: 1 21 | m_SplashScreenOverlayOpacity: 1 22 | m_SplashScreenAnimation: 1 23 | m_SplashScreenLogoStyle: 1 24 | m_SplashScreenDrawMode: 0 25 | m_SplashScreenBackgroundAnimationZoom: 1 26 | m_SplashScreenLogoAnimationZoom: 1 27 | m_SplashScreenBackgroundLandscapeAspect: 1 28 | m_SplashScreenBackgroundPortraitAspect: 1 29 | m_SplashScreenBackgroundLandscapeUvs: 30 | serializedVersion: 2 31 | x: 0 32 | y: 0 33 | width: 1 34 | height: 1 35 | m_SplashScreenBackgroundPortraitUvs: 36 | serializedVersion: 2 37 | x: 0 38 | y: 0 39 | width: 1 40 | height: 1 41 | m_SplashScreenLogos: [] 42 | m_VirtualRealitySplashScreen: {fileID: 0} 43 | m_HolographicTrackingLossScreen: {fileID: 0} 44 | defaultScreenWidth: 1024 45 | defaultScreenHeight: 768 46 | defaultScreenWidthWeb: 960 47 | defaultScreenHeightWeb: 600 48 | m_StereoRenderingPath: 0 49 | m_ActiveColorSpace: 0 50 | m_MTRendering: 1 51 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 52 | iosShowActivityIndicatorOnLoading: -1 53 | androidShowActivityIndicatorOnLoading: -1 54 | tizenShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | disableDepthAndStencilBuffers: 0 65 | androidBlitType: 0 66 | defaultIsFullScreen: 1 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 0 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 1 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | metalFramebufferOnly: 0 99 | n3dsDisableStereoscopicView: 0 100 | n3dsEnableSharedListOpt: 1 101 | n3dsEnableVSync: 0 102 | ignoreAlphaClear: 0 103 | xboxOneResolution: 0 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | videoMemoryForVertexBuffers: 0 109 | psp2PowerMode: 0 110 | psp2AcquireBGM: 1 111 | wiiUTVResolution: 0 112 | wiiUGamePadMSAA: 1 113 | wiiUSupportsNunchuk: 0 114 | wiiUSupportsClassicController: 0 115 | wiiUSupportsBalanceBoard: 0 116 | wiiUSupportsMotionPlus: 0 117 | wiiUSupportsProController: 0 118 | wiiUAllowScreenCapture: 1 119 | wiiUControllerCount: 0 120 | m_SupportedAspectRatios: 121 | 4:3: 1 122 | 5:4: 1 123 | 16:10: 1 124 | 16:9: 1 125 | Others: 1 126 | bundleVersion: 1.0 127 | preloadedAssets: [] 128 | metroInputSource: 0 129 | m_HolographicPauseOnTrackingLoss: 1 130 | xboxOneDisableKinectGpuReservation: 0 131 | xboxOneEnable7thCore: 0 132 | vrSettings: 133 | cardboard: 134 | depthFormat: 0 135 | enableTransitionView: 0 136 | daydream: 137 | depthFormat: 0 138 | useSustainedPerformanceMode: 0 139 | enableVideoLayer: 0 140 | useProtectedVideoMemory: 0 141 | hololens: 142 | depthFormat: 1 143 | protectGraphicsMemory: 0 144 | useHDRDisplay: 0 145 | m_ColorGamuts: 00000000 146 | targetPixelDensity: 0 147 | resolutionScalingMode: 0 148 | androidSupportedAspectRatio: 1 149 | androidMaxAspectRatio: 2.1 150 | applicationIdentifier: {} 151 | buildNumber: {} 152 | AndroidBundleVersionCode: 1 153 | AndroidMinSdkVersion: 16 154 | AndroidTargetSdkVersion: 0 155 | AndroidPreferredInstallLocation: 1 156 | aotOptions: 157 | stripEngineCode: 1 158 | iPhoneStrippingLevel: 0 159 | iPhoneScriptCallOptimization: 0 160 | ForceInternetPermission: 0 161 | ForceSDCardPermission: 0 162 | CreateWallpaper: 0 163 | APKExpansionFiles: 0 164 | keepLoadedShadersAlive: 0 165 | StripUnusedMeshComponents: 0 166 | VertexChannelCompressionMask: 167 | serializedVersion: 2 168 | m_Bits: 238 169 | iPhoneSdkVersion: 988 170 | iOSTargetOSVersionString: 7.0 171 | tvOSSdkVersion: 0 172 | tvOSRequireExtendedGameController: 0 173 | tvOSTargetOSVersionString: 9.0 174 | uIPrerenderedIcon: 0 175 | uIRequiresPersistentWiFi: 0 176 | uIRequiresFullScreen: 1 177 | uIStatusBarHidden: 1 178 | uIExitOnSuspend: 0 179 | uIStatusBarStyle: 0 180 | iPhoneSplashScreen: {fileID: 0} 181 | iPhoneHighResSplashScreen: {fileID: 0} 182 | iPhoneTallHighResSplashScreen: {fileID: 0} 183 | iPhone47inSplashScreen: {fileID: 0} 184 | iPhone55inPortraitSplashScreen: {fileID: 0} 185 | iPhone55inLandscapeSplashScreen: {fileID: 0} 186 | iPadPortraitSplashScreen: {fileID: 0} 187 | iPadHighResPortraitSplashScreen: {fileID: 0} 188 | iPadLandscapeSplashScreen: {fileID: 0} 189 | iPadHighResLandscapeSplashScreen: {fileID: 0} 190 | appleTVSplashScreen: {fileID: 0} 191 | tvOSSmallIconLayers: [] 192 | tvOSLargeIconLayers: [] 193 | tvOSTopShelfImageLayers: [] 194 | tvOSTopShelfImageWideLayers: [] 195 | iOSLaunchScreenType: 0 196 | iOSLaunchScreenPortrait: {fileID: 0} 197 | iOSLaunchScreenLandscape: {fileID: 0} 198 | iOSLaunchScreenBackgroundColor: 199 | serializedVersion: 2 200 | rgba: 0 201 | iOSLaunchScreenFillPct: 100 202 | iOSLaunchScreenSize: 100 203 | iOSLaunchScreenCustomXibPath: 204 | iOSLaunchScreeniPadType: 0 205 | iOSLaunchScreeniPadImage: {fileID: 0} 206 | iOSLaunchScreeniPadBackgroundColor: 207 | serializedVersion: 2 208 | rgba: 0 209 | iOSLaunchScreeniPadFillPct: 100 210 | iOSLaunchScreeniPadSize: 100 211 | iOSLaunchScreeniPadCustomXibPath: 212 | iOSDeviceRequirements: [] 213 | iOSURLSchemes: [] 214 | iOSBackgroundModes: 0 215 | iOSMetalForceHardShadows: 0 216 | metalEditorSupport: 1 217 | metalAPIValidation: 1 218 | iOSRenderExtraFrameOnPause: 0 219 | appleDeveloperTeamID: 220 | iOSManualSigningProvisioningProfileID: 221 | tvOSManualSigningProvisioningProfileID: 222 | appleEnableAutomaticSigning: 0 223 | AndroidTargetDevice: 0 224 | AndroidSplashScreenScale: 0 225 | androidSplashScreen: {fileID: 0} 226 | AndroidKeystoreName: 227 | AndroidKeyaliasName: 228 | AndroidTVCompatibility: 1 229 | AndroidIsGame: 1 230 | AndroidEnableTango: 0 231 | androidEnableBanner: 1 232 | androidUseLowAccuracyLocation: 0 233 | m_AndroidBanners: 234 | - width: 320 235 | height: 180 236 | banner: {fileID: 0} 237 | androidGamepadSupportLevel: 0 238 | resolutionDialogBanner: {fileID: 0} 239 | m_BuildTargetIcons: [] 240 | m_BuildTargetBatching: [] 241 | m_BuildTargetGraphicsAPIs: [] 242 | m_BuildTargetVRSettings: [] 243 | m_BuildTargetEnableVuforiaSettings: [] 244 | openGLRequireES31: 0 245 | openGLRequireES31AEP: 0 246 | m_TemplateCustomTags: {} 247 | mobileMTRendering: 248 | Android: 1 249 | iPhone: 1 250 | tvOS: 1 251 | wiiUTitleID: 0005000011000000 252 | wiiUGroupID: 00010000 253 | wiiUCommonSaveSize: 4096 254 | wiiUAccountSaveSize: 2048 255 | wiiUOlvAccessKey: 0 256 | wiiUTinCode: 0 257 | wiiUJoinGameId: 0 258 | wiiUJoinGameModeMask: 0000000000000000 259 | wiiUCommonBossSize: 0 260 | wiiUAccountBossSize: 0 261 | wiiUAddOnUniqueIDs: [] 262 | wiiUMainThreadStackSize: 3072 263 | wiiULoaderThreadStackSize: 1024 264 | wiiUSystemHeapSize: 128 265 | wiiUTVStartupScreen: {fileID: 0} 266 | wiiUGamePadStartupScreen: {fileID: 0} 267 | wiiUDrcBufferDisabled: 0 268 | wiiUProfilerLibPath: 269 | playModeTestRunnerEnabled: 0 270 | actionOnDotNetUnhandledException: 1 271 | enableInternalProfiler: 0 272 | logObjCUncaughtExceptions: 1 273 | enableCrashReportAPI: 0 274 | cameraUsageDescription: 275 | locationUsageDescription: 276 | microphoneUsageDescription: 277 | switchNetLibKey: 278 | switchSocketMemoryPoolSize: 6144 279 | switchSocketAllocatorPoolSize: 128 280 | switchSocketConcurrencyLimit: 14 281 | switchScreenResolutionBehavior: 2 282 | switchUseCPUProfiler: 0 283 | switchApplicationID: 0x01004b9000490000 284 | switchNSODependencies: 285 | switchTitleNames_0: 286 | switchTitleNames_1: 287 | switchTitleNames_2: 288 | switchTitleNames_3: 289 | switchTitleNames_4: 290 | switchTitleNames_5: 291 | switchTitleNames_6: 292 | switchTitleNames_7: 293 | switchTitleNames_8: 294 | switchTitleNames_9: 295 | switchTitleNames_10: 296 | switchTitleNames_11: 297 | switchPublisherNames_0: 298 | switchPublisherNames_1: 299 | switchPublisherNames_2: 300 | switchPublisherNames_3: 301 | switchPublisherNames_4: 302 | switchPublisherNames_5: 303 | switchPublisherNames_6: 304 | switchPublisherNames_7: 305 | switchPublisherNames_8: 306 | switchPublisherNames_9: 307 | switchPublisherNames_10: 308 | switchPublisherNames_11: 309 | switchIcons_0: {fileID: 0} 310 | switchIcons_1: {fileID: 0} 311 | switchIcons_2: {fileID: 0} 312 | switchIcons_3: {fileID: 0} 313 | switchIcons_4: {fileID: 0} 314 | switchIcons_5: {fileID: 0} 315 | switchIcons_6: {fileID: 0} 316 | switchIcons_7: {fileID: 0} 317 | switchIcons_8: {fileID: 0} 318 | switchIcons_9: {fileID: 0} 319 | switchIcons_10: {fileID: 0} 320 | switchIcons_11: {fileID: 0} 321 | switchSmallIcons_0: {fileID: 0} 322 | switchSmallIcons_1: {fileID: 0} 323 | switchSmallIcons_2: {fileID: 0} 324 | switchSmallIcons_3: {fileID: 0} 325 | switchSmallIcons_4: {fileID: 0} 326 | switchSmallIcons_5: {fileID: 0} 327 | switchSmallIcons_6: {fileID: 0} 328 | switchSmallIcons_7: {fileID: 0} 329 | switchSmallIcons_8: {fileID: 0} 330 | switchSmallIcons_9: {fileID: 0} 331 | switchSmallIcons_10: {fileID: 0} 332 | switchSmallIcons_11: {fileID: 0} 333 | switchManualHTML: 334 | switchAccessibleURLs: 335 | switchLegalInformation: 336 | switchMainThreadStackSize: 1048576 337 | switchPresenceGroupId: 338 | switchLogoHandling: 0 339 | switchReleaseVersion: 0 340 | switchDisplayVersion: 1.0.0 341 | switchStartupUserAccount: 0 342 | switchTouchScreenUsage: 0 343 | switchSupportedLanguagesMask: 0 344 | switchLogoType: 0 345 | switchApplicationErrorCodeCategory: 346 | switchUserAccountSaveDataSize: 0 347 | switchUserAccountSaveDataJournalSize: 0 348 | switchApplicationAttribute: 0 349 | switchCardSpecSize: -1 350 | switchCardSpecClock: -1 351 | switchRatingsMask: 0 352 | switchRatingsInt_0: 0 353 | switchRatingsInt_1: 0 354 | switchRatingsInt_2: 0 355 | switchRatingsInt_3: 0 356 | switchRatingsInt_4: 0 357 | switchRatingsInt_5: 0 358 | switchRatingsInt_6: 0 359 | switchRatingsInt_7: 0 360 | switchRatingsInt_8: 0 361 | switchRatingsInt_9: 0 362 | switchRatingsInt_10: 0 363 | switchRatingsInt_11: 0 364 | switchLocalCommunicationIds_0: 365 | switchLocalCommunicationIds_1: 366 | switchLocalCommunicationIds_2: 367 | switchLocalCommunicationIds_3: 368 | switchLocalCommunicationIds_4: 369 | switchLocalCommunicationIds_5: 370 | switchLocalCommunicationIds_6: 371 | switchLocalCommunicationIds_7: 372 | switchParentalControl: 0 373 | switchAllowsScreenshot: 1 374 | switchDataLossConfirmation: 0 375 | switchSupportedNpadStyles: 3 376 | switchSocketConfigEnabled: 0 377 | switchTcpInitialSendBufferSize: 32 378 | switchTcpInitialReceiveBufferSize: 64 379 | switchTcpAutoSendBufferSizeMax: 256 380 | switchTcpAutoReceiveBufferSizeMax: 256 381 | switchUdpSendBufferSize: 9 382 | switchUdpReceiveBufferSize: 42 383 | switchSocketBufferEfficiency: 4 384 | switchSocketInitializeEnabled: 1 385 | switchNetworkInterfaceManagerInitializeEnabled: 1 386 | switchPlayerConnectionEnabled: 1 387 | ps4NPAgeRating: 12 388 | ps4NPTitleSecret: 389 | ps4NPTrophyPackPath: 390 | ps4ParentalLevel: 11 391 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 392 | ps4Category: 0 393 | ps4MasterVersion: 01.00 394 | ps4AppVersion: 01.00 395 | ps4AppType: 0 396 | ps4ParamSfxPath: 397 | ps4VideoOutPixelFormat: 0 398 | ps4VideoOutInitialWidth: 1920 399 | ps4VideoOutBaseModeInitialWidth: 1920 400 | ps4VideoOutReprojectionRate: 60 401 | ps4PronunciationXMLPath: 402 | ps4PronunciationSIGPath: 403 | ps4BackgroundImagePath: 404 | ps4StartupImagePath: 405 | ps4SaveDataImagePath: 406 | ps4SdkOverride: 407 | ps4BGMPath: 408 | ps4ShareFilePath: 409 | ps4ShareOverlayImagePath: 410 | ps4PrivacyGuardImagePath: 411 | ps4NPtitleDatPath: 412 | ps4RemotePlayKeyAssignment: -1 413 | ps4RemotePlayKeyMappingDir: 414 | ps4PlayTogetherPlayerCount: 0 415 | ps4EnterButtonAssignment: 1 416 | ps4ApplicationParam1: 0 417 | ps4ApplicationParam2: 0 418 | ps4ApplicationParam3: 0 419 | ps4ApplicationParam4: 0 420 | ps4DownloadDataSize: 0 421 | ps4GarlicHeapSize: 2048 422 | ps4ProGarlicHeapSize: 2560 423 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 424 | ps4pnSessions: 1 425 | ps4pnPresence: 1 426 | ps4pnFriends: 1 427 | ps4pnGameCustomData: 1 428 | playerPrefsSupport: 0 429 | restrictedAudioUsageRights: 0 430 | ps4UseResolutionFallback: 0 431 | ps4ReprojectionSupport: 0 432 | ps4UseAudio3dBackend: 0 433 | ps4SocialScreenEnabled: 0 434 | ps4ScriptOptimizationLevel: 0 435 | ps4Audio3dVirtualSpeakerCount: 14 436 | ps4attribCpuUsage: 0 437 | ps4PatchPkgPath: 438 | ps4PatchLatestPkgPath: 439 | ps4PatchChangeinfoPath: 440 | ps4PatchDayOne: 0 441 | ps4attribUserManagement: 0 442 | ps4attribMoveSupport: 0 443 | ps4attrib3DSupport: 0 444 | ps4attribShareSupport: 0 445 | ps4attribExclusiveVR: 0 446 | ps4disableAutoHideSplash: 0 447 | ps4videoRecordingFeaturesUsed: 0 448 | ps4contentSearchFeaturesUsed: 0 449 | ps4attribEyeToEyeDistanceSettingVR: 0 450 | ps4IncludedModules: [] 451 | monoEnv: 452 | psp2Splashimage: {fileID: 0} 453 | psp2NPTrophyPackPath: 454 | psp2NPSupportGBMorGJP: 0 455 | psp2NPAgeRating: 12 456 | psp2NPTitleDatPath: 457 | psp2NPCommsID: 458 | psp2NPCommunicationsID: 459 | psp2NPCommsPassphrase: 460 | psp2NPCommsSig: 461 | psp2ParamSfxPath: 462 | psp2ManualPath: 463 | psp2LiveAreaGatePath: 464 | psp2LiveAreaBackroundPath: 465 | psp2LiveAreaPath: 466 | psp2LiveAreaTrialPath: 467 | psp2PatchChangeInfoPath: 468 | psp2PatchOriginalPackage: 469 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 470 | psp2KeystoneFile: 471 | psp2MemoryExpansionMode: 0 472 | psp2DRMType: 0 473 | psp2StorageType: 0 474 | psp2MediaCapacity: 0 475 | psp2DLCConfigPath: 476 | psp2ThumbnailPath: 477 | psp2BackgroundPath: 478 | psp2SoundPath: 479 | psp2TrophyCommId: 480 | psp2TrophyPackagePath: 481 | psp2PackagedResourcesPath: 482 | psp2SaveDataQuota: 10240 483 | psp2ParentalLevel: 1 484 | psp2ShortTitle: Not Set 485 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 486 | psp2Category: 0 487 | psp2MasterVersion: 01.00 488 | psp2AppVersion: 01.00 489 | psp2TVBootMode: 0 490 | psp2EnterButtonAssignment: 2 491 | psp2TVDisableEmu: 0 492 | psp2AllowTwitterDialog: 1 493 | psp2Upgradable: 0 494 | psp2HealthWarning: 0 495 | psp2UseLibLocation: 0 496 | psp2InfoBarOnStartup: 0 497 | psp2InfoBarColor: 0 498 | psp2ScriptOptimizationLevel: 0 499 | psmSplashimage: {fileID: 0} 500 | splashScreenBackgroundSourceLandscape: {fileID: 0} 501 | splashScreenBackgroundSourcePortrait: {fileID: 0} 502 | spritePackerPolicy: 503 | webGLMemorySize: 256 504 | webGLExceptionSupport: 1 505 | webGLNameFilesAsHashes: 0 506 | webGLDataCaching: 0 507 | webGLDebugSymbols: 0 508 | webGLEmscriptenArgs: 509 | webGLModulesDirectory: 510 | webGLTemplate: APPLICATION:Default 511 | webGLAnalyzeBuildSize: 0 512 | webGLUseEmbeddedResources: 0 513 | webGLUseWasm: 0 514 | webGLCompressionFormat: 1 515 | scriptingDefineSymbols: {} 516 | platformArchitecture: {} 517 | scriptingBackend: {} 518 | incrementalIl2cppBuild: {} 519 | additionalIl2CppArgs: 520 | scriptingRuntimeVersion: 0 521 | apiCompatibilityLevelPerPlatform: {} 522 | m_RenderingPath: 1 523 | m_MobileRenderingPath: 1 524 | metroPackageName: MecanimEventSystem 525 | metroPackageVersion: 526 | metroCertificatePath: 527 | metroCertificatePassword: 528 | metroCertificateSubject: 529 | metroCertificateIssuer: 530 | metroCertificateNotAfter: 0000000000000000 531 | metroApplicationDescription: MecanimEventSystem 532 | wsaImages: {} 533 | metroTileShortName: 534 | metroCommandLineArgsFile: 535 | metroTileShowName: 0 536 | metroMediumTileShowName: 0 537 | metroLargeTileShowName: 0 538 | metroWideTileShowName: 0 539 | metroDefaultTileSize: 1 540 | metroTileForegroundText: 2 541 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 542 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 543 | a: 1} 544 | metroSplashScreenUseBackgroundColor: 0 545 | platformCapabilities: {} 546 | metroFTAName: 547 | metroFTAFileTypes: [] 548 | metroProtocolName: 549 | metroCompilationOverrides: 1 550 | tizenProductDescription: 551 | tizenProductURL: 552 | tizenSigningProfileName: 553 | tizenGPSPermissions: 0 554 | tizenMicrophonePermissions: 0 555 | tizenDeploymentTarget: 556 | tizenDeploymentTargetType: -1 557 | tizenMinOSVersion: 1 558 | n3dsUseExtSaveData: 0 559 | n3dsCompressStaticMem: 1 560 | n3dsExtSaveDataNumber: 0x12345 561 | n3dsStackSize: 131072 562 | n3dsTargetPlatform: 2 563 | n3dsRegion: 7 564 | n3dsMediaSize: 0 565 | n3dsLogoStyle: 3 566 | n3dsTitle: GameName 567 | n3dsProductCode: 568 | n3dsApplicationId: 0xFF3FF 569 | stvDeviceAddress: 570 | stvProductDescription: 571 | stvProductAuthor: 572 | stvProductAuthorEmail: 573 | stvProductLink: 574 | stvProductCategory: 0 575 | XboxOneProductId: 576 | XboxOneUpdateKey: 577 | XboxOneSandboxId: 578 | XboxOneContentId: 579 | XboxOneTitleId: 580 | XboxOneSCId: 581 | XboxOneGameOsOverridePath: 582 | XboxOnePackagingOverridePath: 583 | XboxOneAppManifestOverridePath: 584 | XboxOnePackageEncryption: 0 585 | XboxOnePackageUpdateGranularity: 2 586 | XboxOneDescription: 587 | XboxOneLanguage: 588 | - enus 589 | XboxOneCapability: [] 590 | XboxOneGameRating: {} 591 | XboxOneIsContentPackage: 0 592 | XboxOneEnableGPUVariability: 0 593 | XboxOneSockets: {} 594 | XboxOneSplashScreen: {fileID: 0} 595 | XboxOneAllowedProductIds: [] 596 | XboxOnePersistentLocalStorageSize: 0 597 | xboxOneScriptCompiler: 0 598 | vrEditorSettings: 599 | daydream: 600 | daydreamIconForeground: {fileID: 0} 601 | daydreamIconBackground: {fileID: 0} 602 | cloudServicesEnabled: {} 603 | facebookSdkVersion: 7.9.4 604 | apiCompatibilityLevel: 2 605 | cloudProjectId: 606 | projectName: 607 | organizationId: 608 | cloudEnabled: 0 609 | enableNativePlatformBackendsForNewInputSystem: 0 610 | disableOldInputManagerSupport: 0 611 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.2.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Samsung TV: 2 185 | Standalone: 5 186 | Tizen: 2 187 | WebGL: 3 188 | WiiU: 5 189 | Windows Store Apps: 5 190 | XboxOne: 5 191 | iPhone: 2 192 | tvOS: 2 193 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MecanimEventSystem 2 | 3 | This is an event system for Unity's Mecanim animation system. 4 | It had been developed as soon as Mecanim was published in Unity4. 5 | 6 | # Update 7 | 8 | 11/14/2017 9 | It works in Unity 2017.2 10 | --------------------------------------------------------------------------------