diff --git a/Assets/Obvious.meta b/Assets/Obvious.meta new file mode 100644 index 000000000..e29689849 --- /dev/null +++ b/Assets/Obvious.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 27e397744a9782c42ba3dcf1d464cc12 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap.meta b/Assets/Obvious/Soap.meta new file mode 100644 index 000000000..3ea779696 --- /dev/null +++ b/Assets/Obvious/Soap.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d4a0827383c5431397a8bd8aa233ba98 +timeCreated: 1655774182 \ No newline at end of file diff --git a/Assets/Obvious/Soap/CHANGELOG.md b/Assets/Obvious/Soap/CHANGELOG.md new file mode 100644 index 000000000..b4a3eb1a8 --- /dev/null +++ b/Assets/Obvious/Soap/CHANGELOG.md @@ -0,0 +1,339 @@ +## [3.6.1] - 2025-11-05 +- Fixed ignoring anything that is no an .asset when GUID are assigned +- Fixed Assembly name for GC2 compatibility +- Fixed Singleton message warning on dev builds +- Added Getter for GC2 Scripts +- Added virtual FilePath property to ScriptableSave +- Added Static methods to create RuntimeEvents + +## [3.6.0] - 2025-10-05 +- Improved Soap Asset Creator UX +- Improved Scriptable Save API +- Added Scriptable Singleton +- Added Clear MenuItem for Scriptable Collections +- Added SetValueWithoutNotify method for Scriptable Variables +- Optimized Scriptable Variable to prevent boxing for value types reducing GC allocations + +## [3.5.3] - 2025-07-29 +- Fixed ScriptableVariable using improper equality checks +- Fixed DeleteSubAsset calling the wrong method + +## [3.5.2] - 2025-07-27 +- Added Find References in Scene, Project, and Both +- Added Link URL support for documentation +- Added compatibility with the UEE Package +- OnValueChanged is now also triggered when the Local Value of a Variable Reference changes in the Inspector +- Added DeleteSubAsset method for SubAssets +- Made SoapUtils methods public +- Replaced Odin [ShowIf] attribute with [HideIf] on bindings +- Fixed incorrect value usage in the Ratio property of Int and Float Variables +- Fixed ScriptableCollection resetting even when "None" reset mode was selected +- Fixed ScriptableList displaying an incorrect count +- Fixed serialization error icon appearing in ScriptableCollections property drawers +- Removed deprecated scripts + +## [3.5.1] - 2025-03-11 +- Added a SelectParent method for SubAssets +- Added keeping the Namespace in the SoapTypeCreator persistent +- Added compatibly with nullable types Scriptable Variables +- SubAssets backing fields names are now properly displayed +- Fixed templates scripts now using Rider format +- Fixed allowing to inherit from ScriptableCollection +- Fixed Odin [HideLabel] bug with SubAssets icon +- Fixed ScriptableCollection resetting when "None" reset mode was selected + +## [3.5.0] - 2025-02-09 +- Added Scriptable Dictionary type +- Added Scriptable Dictionary Creator Window +- Added new Example Scene for Scriptable Dictionaries +- Added Set Icon menu item to assign icons to existing Soap CS files +- Added auto-assignment of icons when creating new Soap types with the Soap Asset Creator +- Added Soap Asset Creator +- Added Soap Asset Creator menu item at the top of the menu items list +- Added optional Prefixes in Soap Settings +- Added new category in Soap Wizard (Collections) that groups lists and dictionaries +- Changed ScriptableBase now automatically inherits from SerializedScriptableObject if Odin is present +- Fixed changing reset mode for collections when not reloading domain +- Fixed EditorPrefs used for all projects (now per project) +- Fixed ScriptableList now properly allows duplicates + +## [3.4.1] - 2025-01-17 +- Added safety assigning for tags if not found in settings. +- Fixed MinReference property returning wrong value for Int and Float Variables + +## [3.4.0] - 2025-01-12 +- Added [AutoTag] attribute for auto tagging SOAP SO on creation +- Added a way to add new tag from the tag dropdown +- Added support to set the tag of multiple SOAP SO at once +- Added Bindings icons +- Changed Min and MaxReference in Int and Float variables to a public property (Get/Set) +- Fixed Delay in EventListeners not initializing with local value +- Fixed error when drawing a list of ScriptableVariables +- Fixed [ShowIf] attribute not working with custom inspectors +- Fixed ScriptableBaseDrawer not compatible with [ReadOnly] attribute +- Added Runtime Injectors and [RuntimeInjectable] attribute + +## [3.3.1] - 2024-11-11 +- Added override Get Value in Float and Int Variable +- Added [HelpUrl] attribute to classes +- Fixed infinite loop caused by circular references in FindReferences +- Fixed direct text assignment in BindTextMeshPro to use SetText() +- Fixed enum not usable without needing [Serializable] attribute + +## [3.3.0] - 2024-10-11 +- Added Support for Game Creator 2 +- Added Variable Reference usage for min and max Value of Int and Float Variables +- Added option to use MaxValue from Int and Float Variables in Bindings +- Added option to enable raising Scriptable Events from the inspector +- Added shortcuts support to Soap Wizard +- Added Soap Settings in Preferences Window +- Added FloatReference for Delay field in EventListeners +- Fixed References with Playmaker Actions +- Fixed OnValueChanged Object display with Playmaker Actions +- Fixed Runtime value being shown in the inspector +- Fixed Bindings not always refreshing value when modified from Inspector + +## [3.2.2] - 2024-09-22 +- Added more accessibility for Soap Type Creator +- Removed Documentation PDF's +- Fixed Minimal Drawing mode +- Fixed Odin not showing Runtime Value + +## [3.2.1] - 2024-09-17 +- Added BindSlider has a MaxValue property +- Fixed UIToolkit Wrapper that prevent Soap property drawer +- Fixed rare null ref in Wizard +- Fixed GUID error when including other Sub Assets types with Variables + +## [3.2.0] - 2024-09-14 +- Added Scriptable Save +- Added ResettableScriptableObject +- Added Component Type in core Soap types +- Changed Soap Wizard's layout (cleaner and showing more data) +- Changed a lot of methods and fields to protected and or virtual +- Fixed Custom Editor in UIToolkit Drawers +- Fixed Runtime Variables being reset when the scene loads (default is not) +- Fixed Variable reference UseLocal not propagating OnValueChanged +- Fixed Variables always being set as dirty even if not changed +- Fixed ability to create instances of Generic Soap SO by pressing the create shortcut button + +## [3.1.0] - 2024-07-14 +- Added Runtime Variables (example scene and documentation) +- Added drawing other parameters even if type is not serializable +- Changed Serialization error to warning +- Fixed various errors due to sub assets checking +- Fixed using Soap SO in Odin serialized dictionary +- Fixed using Soap with Odin. (Now drawing with Odin if it is there) + +## [3.0.0] - 2024-06-10 +- Added Scriptable Enums +- Added Scriptable SubAssets +- Added typed EventListeners for Playmaker Actions +- Added Quaternion as included type +- Added Soap Type Creator Window +- Changed OnValueChanged from private to protected +- Fixed occasional null ref when FindingReference +- Fixed missing update in serialized Object inspector +- Improved Soap Wizard UX + +## [2.7.2] - 2024-04-15 +- Fixed playmaker actions related to ScriptableLists +- Moved root folder out of Plugins +- Removed Tests from public package + +## [2.7.1] - 2024-04-02 +- Added gameObject reference to Debug.Log for Scriptable Variables +- Added custom path setting for "Create" shortcut in inspector +- Added Null Check for asset reference +- Renamed ResetToInitialValue() to ResetValue() +- Fixed Odin compatibility for Variable Ref and Scriptable Events +- Fixed drawing properties on ScriptabLists for monobehavior Type +- Removed Reset public, made it internal + +## [2.7.0] - 2024-03-02 +- Added Description for all Soap scriptable objects +- Added custom inspector for runtime scene objects variables +- Added missing documentation (PlayerVariable, PreviousValue and description) +- Fixed error with SoapSettings sometimes null +- Fixed Namespace wrapping for generated classes + +## [2.6.1] - 2024-02-14 +- Added Vector2Int as part of core +- Removed unnecessary [Serializable] attributes on abstract classes +- Fixed [SerializeField] for List + +## [2.6.0] - 2024-02-12 +- Added TryAdd methods for List +- Added ScriptableList inherits from IList +- Added Option to override destination path when creating new type +- Added Optional namespace when creating new type +- Added nameof(T) for generated type to support refactoring +- Added Find references of Soap SO (in scenes and assets) +- Fixed Dynamic space for Vector2 and 3 in variable property drawer +- Changed Moved Soap into Plugins folder +- Changed Menu name to Obvious Game +- Changed ScriptableList Add() does not check for already added items anymore + +## [2.5.0] - 2024-01-12 +- Added Scriptable list use a hashset for gain in performance +- Added FAQ to Soap Window +- Added Option to override Save ID (GUID) of a scriptable variable +- Added Delay for EventListeners +- Added Categories +- Added Integration with Playmaker +- Added ForEach support for scriptable Lists +- Changed Soap Wizard's layout (using more icons for better UX) + +## [2.4.0] - 2023-12-20 +- Added Unit Test for Type Creation +- Added Scene Documentation Button +- Added manual naming on creation +- Added settings in soap Window +- Added option to generate class from Create New Wizard +- Added Unit Tests for Type creation +- Moved Scene documentations in Documentation folder +- Changed min value for clamp from minValue to 0 (for floats and ints) + +## [2.3.1] - 2023-11-09 +- Fix Nested Folder for Soap Wizard +- Fix Pascal Case name of the variable in the name but not type +- Added Unit Test for Type Creation + +## [2.3.0] - 2023-11-09 +- Updated package to latest LTS version of Unity +- Updated Soap Icon +- Added documentation in code and tooltips +- Added Ratio property for IntVariable and FloatVariable +- Added Min and Max property for IntVariable and FloatVariable + +## [2.2.1] - 2023-09-07 +- Revert SerializeField for variable and lists +- Fixed compatibility with Fast Script Reload +- Fixed error when adding component +- Added compatibility with Odin Inspector + +## [2.2.0] - 2023-08-07 +- Fixed use SerializeReference instead of SerializeField for variable and lists +- Fixed not use Linq for IsEmpty property of lists + +## [2.1.0] - 2023-06-18 +- Added BindToInputField Component +- Fixed error when displaying non serializable classes +- Fixed overriding all custom property drawers +- Removed PlayModeResetter +- Removed FastPlayMode Scene + +## [2.0.0] - 2023-05-23 +- Added ScriptableVariable Default value field +- Added Icons for Windows +- Added ScriptableVariables now reset when exiting PlayMode +- Fixed SoapSettings created multiple times +- Fixed cached editor +- Fixed null refs due to repaint logic +- Fixed various colors +- Fixed naming standards of EventListeners +- Removed PlayModeResetter logic +- Removed ScriptableVariable InitialValue field + +## [1.5.3] - 2023-05-10 +- Fixed Custom editor performances issues +- Fixed expanding ScriptableEvents from EventListeners +- Added Custom property drawer for each type +- Added Raise button for ScriptableEvent property drawer +- Added Count label for ScriptableList property drawer + +## [1.5.2] - 2023-05-02 +- Fixed Editor namespace compile error +- Fixed Editor code preventing builds + +## [1.5.1] - 2023-04-29 +- Fixed create SO at selected folder instead of predefined path +- Fixed create new Types at selected folder instead of predefined path +- Fixed settings can only be modified from Soap Window +- Fixed Editor namespace +- Fixed naming of variable reference created from inspector button +- Added Soap Window +- Added MinMax property for IntVariable and FloatVariable + +## [1.5.0] - 2023-04-08 +- Fixed null ref debugging events +- Fixed InitialValue is public +- Fixed Modifying the value of a SV by code shows in Version Control +- Added create button from classes (SoapPropertyDrawer) +- Added Embedded inspector for all Soap SO (SoapPropertyDrawer) +- Added SoapSettings +- Added ScriptableVariable Display Mode (Default & Minimal) +- Added Search bar in SoapWizard +- Added debug for ScriptableEventNoParam + +## [1.4.1] - 2023-02-24 +- Added favorite option in Soap Wizard +- Fixed path saving in Soap Wizard +- Fixed Unit Tests under Editor Folder +- Fixed Events raise button disabled when not in play mode + +## [1.4.0] - 2023-01-30 +- Added Soap Wizard +- Added Events Debug Window visual +- Added file name for ScriptableList and Events +- Fixed base type of ScriptableVariableDrawer +- Fixed Rename enum CustomVariableType to follow C# standards + +## [1.3.3] - 2023-01-19 +- Added AddRange and RemoveRange methods for ScriptableList +- Removed parameter of the event OnItemCountChanged +- Fixed support for multiple instances of PlayModeResetter +- Fixed Debug Logs are now being displayed when subscribing to OnRaised in ScriptableEvents by code. + +## [1.3.2] - 2022-12-17 +- Added Implicit operator for ScriptableVariables +- Added Version number on documentation +- Added ResetToInitialValue Button on ScriptableVariables +- Fixed Obstacle prefab structure +- Fixed icons are now being used +- Fixed minor bugs and project folders +- Fixed OnSceneLoaded is now protected + +## [1.3.1] - 2022-11-20 +- Added VariableReference base class +- Added IsEmpty property on ScriptableLists +- Added Undo on Bindings custom inspectors +- Added BindRendererColor +- Added BindGraphicColor +- Removed BindImageColor and ColorChanger +- Updated documentation +- Updated BindComparisonToUnityEvent + +## [1.3.0] - 2022-11-09 +- Added custom icons +- Added option to subscribe to ScriptableEvents by code +- Fix error when modifying Bindings component at runtime + +## [1.2.1] - 2022-10-29 +- Added IsClamped bool to clamping for IntVariables and FloatVariables +- Added IsClamped bool for BindText/TextMeshPro components +- Added Discord and Asset store link buttons in Scenes +- Fix ScriptableList Drawing GameObjects +- Fix ScriptableVariable Guid serialization and generation + + +## [1.2.0] - 2022-10-20 +- Added Min & Max clamping for IntVariables and FloatVariables +- Added Min & Max clamping for BindText/TextMeshPro components +- Added Uid as PlayerPrefs key for ScriptableVariables +- Added warning in PlayModeResetter +- Added Discord and Asset store link buttons in Scenes +- Updated custom inspector for ScriptableLists +- Fixed various custom inspectors + +## [1.1.0] - 2022-10-10 +- Fixed BindText and BindTextMeshPro when binding to a StringVariable +- Added default GameObjectScriptableEvent and EventListenerGameObject +- Added package.json and changelog +- Updated custom inspector for SO variables +- Fixed various bug +- Updated documentation +- Uploaded with 2019.4 + +## [1.0.0] - 2022-09-27 +- Initial Release diff --git a/Assets/Obvious/Soap/CHANGELOG.md.meta b/Assets/Obvious/Soap/CHANGELOG.md.meta new file mode 100644 index 000000000..5fa581316 --- /dev/null +++ b/Assets/Obvious/Soap/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 44074cce280b0f941a9789666fb5c4d3 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core.meta b/Assets/Obvious/Soap/Core.meta new file mode 100644 index 000000000..cd2406a82 --- /dev/null +++ b/Assets/Obvious/Soap/Core.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 84605feea32118242b6bb62be099063f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor.meta b/Assets/Obvious/Soap/Core/Editor.meta new file mode 100644 index 000000000..d920f6eb2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74152f24a51db794c8e61f48190f8f36 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/AssemblyInfo.cs b/Assets/Obvious/Soap/Core/Editor/AssemblyInfo.cs new file mode 100644 index 000000000..82daa3a6e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/AssemblyInfo.cs @@ -0,0 +1,2 @@ + +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Obvious.Soap.Editor.Tests")] \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/AssemblyInfo.cs.meta b/Assets/Obvious/Soap/Core/Editor/AssemblyInfo.cs.meta new file mode 100644 index 000000000..80470942e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 05f304a814d1f004d86cae8c389d2b34 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes.meta b/Assets/Obvious/Soap/Core/Editor/Attributes.meta new file mode 100644 index 000000000..3d015545c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 72698c0e07fccbd419102674c797c27f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/BeginDisabledGroupDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Attributes/BeginDisabledGroupDrawer.cs new file mode 100644 index 000000000..ac353d402 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/BeginDisabledGroupDrawer.cs @@ -0,0 +1,16 @@ +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [CustomPropertyDrawer(typeof(BeginDisabledGroup))] + public class BeginDisabledGroupDrawer : DecoratorDrawer + { + public override float GetHeight() => 0; + + public override void OnGUI(Rect position) + { + EditorGUI.BeginDisabledGroup(true); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/BeginDisabledGroupDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Attributes/BeginDisabledGroupDrawer.cs.meta new file mode 100644 index 000000000..5e15415a5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/BeginDisabledGroupDrawer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c440bf2a1e934383b24580d120f3feea +timeCreated: 1736292111 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/EndDisabledGroupDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Attributes/EndDisabledGroupDrawer.cs new file mode 100644 index 000000000..a2dda0b77 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/EndDisabledGroupDrawer.cs @@ -0,0 +1,16 @@ +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [CustomPropertyDrawer(typeof(EndDisabledGroup))] + public class EndDisabledGroupDrawer : DecoratorDrawer + { + public override float GetHeight() => 0; + + public override void OnGUI(Rect position) + { + EditorGUI.EndDisabledGroup(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/EndDisabledGroupDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Attributes/EndDisabledGroupDrawer.cs.meta new file mode 100644 index 000000000..27125905b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/EndDisabledGroupDrawer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 030fc3f2736a428c99c03e8f1ce1a19f +timeCreated: 1736297901 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/RuntimeInjectableDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Attributes/RuntimeInjectableDrawer.cs new file mode 100644 index 000000000..56f22248c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/RuntimeInjectableDrawer.cs @@ -0,0 +1,92 @@ +using Obvious.Soap.Editor; +using UnityEditor; +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.Utilities.Editor; +using Sirenix.OdinInspector.Editor; +#endif + +namespace Obvious.Soap.Attributes +{ + #if ODIN_INSPECTOR + public class RuntimeInjectableDrawer : OdinAttributeDrawer + { + private GUIContent _iconContent; + const float IconSize = 16f; + private bool _hasId; + private GUIStyle _guiStyle; + + protected override void Initialize() + { + var icon = SoapInspectorUtils.Icons.RuntimeInjectable; + _iconContent = new GUIContent(icon); + _guiStyle = new GUIStyle(); + _guiStyle.padding = new RectOffset(0, 0, 2, 2); + } + + protected override void DrawPropertyLayout(GUIContent label) + { + var runtimeInjectableAttribute = this.Attribute; + _hasId = !string.IsNullOrEmpty(runtimeInjectableAttribute.Id); + GUILayout.BeginHorizontal(_guiStyle, GUILayout.ExpandWidth(false), + GUILayout.Height(EditorGUIUtility.singleLineHeight)); + + if (!_hasId) + { + SirenixEditorGUI.ErrorMessageBox("Variable id required for injection."); + } + else if (!Application.isPlaying) + { + var iconRect = GUILayoutUtility.GetRect(IconSize, IconSize, + GUILayout.ExpandWidth(false)); + //iconRect.x -= IconSize; + iconRect.y += (EditorGUIUtility.singleLineHeight - IconSize) ; + GUI.DrawTexture(iconRect, _iconContent.image, ScaleMode.ScaleToFit); + } + // Draw the property with disabled interaction + GUIHelper.PushGUIEnabled(false); + this.CallNextDrawer(label); + GUIHelper.PopGUIEnabled(); + GUILayout.EndHorizontal(); + } + } + #else + [CustomPropertyDrawer(typeof(RuntimeInjectableAttribute))] + public class RuntimeInjectableDrawer : DecoratorDrawer + { + private readonly GUIContent _iconContent; + const float IconSize = 16f; + private bool _hasId; + + public RuntimeInjectableDrawer() + { + var icon = SoapInspectorUtils.Icons.RuntimeInjectable; + _iconContent = new GUIContent(icon); + } + + public override void OnGUI(Rect position) + { + var runtimeInjectableAttribute = (RuntimeInjectableAttribute) this.attribute; + _hasId = !string.IsNullOrEmpty(runtimeInjectableAttribute.Id); + if (_hasId == false) + { + EditorGUI.HelpBox(position, "Variable id required for injection.", MessageType.Error); + } + else if (!Application.isPlaying) + { + var xPos = position.x - IconSize; + Rect iconRect = new Rect(xPos, position.y, IconSize, IconSize); + GUI.DrawTexture(iconRect, _iconContent.image, ScaleMode.ScaleToFit); + } + EditorGUI.BeginDisabledGroup(true); + } + + public override float GetHeight() + { + return _hasId ? 0 : EditorGUIUtility.singleLineHeight; + } + } +#endif + + +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/RuntimeInjectableDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Attributes/RuntimeInjectableDrawer.cs.meta new file mode 100644 index 000000000..db56eb84f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/RuntimeInjectableDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6046debf15ef29242ab7562ab49bc440 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/ShowIfPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Attributes/ShowIfPropertyDrawer.cs new file mode 100644 index 000000000..4e1b7c342 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/ShowIfPropertyDrawer.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [CustomPropertyDrawer(typeof(ShowIfAttribute))] + public class ShowIfPropertyDrawer : PropertyDrawer + { + private bool _showField = true; + // Cache for custom drawers + private static readonly Dictionary _drawerCache = new Dictionary(); + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + var showIfAttribute = (ShowIfAttribute) this.attribute; + var conditionField = property.serializedObject.FindProperty(showIfAttribute.conditionFieldName); + + if (conditionField == null) + { + ShowError(position, label, "Field "+ showIfAttribute.conditionFieldName + " does not exist." ); + return; + } + + _showField = ShouldShowField(conditionField, showIfAttribute); + + if (_showField) + { + EditorGUI.indentLevel++; + if (TryGetCustomDrawer(out var customDrawer)) + { + customDrawer.OnGUI(position, property, label); + } + else + { + EditorGUI.PropertyField(position, property, label, true); + } + EditorGUI.indentLevel--; + } + } + private bool ShouldShowField(SerializedProperty conditionField, ShowIfAttribute showIfattribute) + { + try + { + switch (conditionField.propertyType) + { + case SerializedPropertyType.Boolean: + bool comparisonBool = showIfattribute.comparisonValue == null || (bool)showIfattribute.comparisonValue; + return conditionField.boolValue == comparisonBool; + case SerializedPropertyType.Enum: + if (showIfattribute.comparisonValue == null) + { + Debug.LogError("Comparison value is required for enum types."); + return false; + } + int enumValue = conditionField.enumValueIndex; + int comparisonEnumValue = (int)showIfattribute.comparisonValue; + return enumValue == comparisonEnumValue; + + default: + Debug.LogError($"Unsupported field type: {conditionField.propertyType}. Must be bool or enum."); + return false; + } + } + catch + { + Debug.LogError("Invalid comparison value type."); + return false; + } + } + + + private void ShowError(Rect position, GUIContent label, string errorText) + { + EditorGUI.LabelField(position, label, new GUIContent(errorText)); + _showField = true; + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + return _showField ? EditorGUI.GetPropertyHeight(property, label) : 0; + } + + private bool TryGetCustomDrawer(out PropertyDrawer customDrawer) + { + customDrawer = null; + var propertyType = fieldInfo.FieldType; + + if (!_drawerCache.TryGetValue(propertyType, out var originalDrawer)) + { + // Find the correct custom drawer type for the property + var drawerType = GetCustomDrawerType(propertyType); + if (drawerType != null) + { + // Dynamically create an instance of the correct derived class + originalDrawer = (PropertyDrawer)Activator.CreateInstance(drawerType); + + // Use reflection to set the private backing field for 'fieldInfo' + var fieldInfoBackingField = typeof(PropertyDrawer) + .GetField("m_FieldInfo", BindingFlags.NonPublic | BindingFlags.Instance); + + if (fieldInfoBackingField != null) + { + fieldInfoBackingField.SetValue(originalDrawer, fieldInfo); + } + + _drawerCache[propertyType] = originalDrawer; + } + } + + customDrawer = originalDrawer; + return customDrawer != null; + } + + private Type GetCustomDrawerType(Type propertyType) + { + var allDrawerTypes = TypeCache.GetTypesWithAttribute(); + Type bestMatch = null; + int bestMatchDepth = int.MaxValue; + + foreach (var drawerType in allDrawerTypes) + { + var attributes = drawerType.GetCustomAttributes(typeof(CustomPropertyDrawer), inherit: false); + foreach (CustomPropertyDrawer attr in attributes) + { + // Use reflection to get the target type from the constructor argument + var targetTypeField = typeof(CustomPropertyDrawer) + .GetField("m_Type", BindingFlags.NonPublic | BindingFlags.Instance); + + if (targetTypeField != null) + { + var targetType = (Type)targetTypeField.GetValue(attr); + if (targetType == propertyType || propertyType.IsSubclassOf(targetType)) + { + // Will return the most derived class that matches the property type, so we can draw the shortcut + int currentDepth = GetInheritanceDepth(propertyType, targetType); + if (currentDepth < bestMatchDepth) + { + bestMatch = drawerType; + bestMatchDepth = currentDepth; + } + } + } + } + } + return bestMatch; + } + + private int GetInheritanceDepth(Type propertyType, Type targetType) + { + int depth = 0; + var currentType = propertyType; + + while (currentType != null && currentType != targetType) + { + depth++; + currentType = currentType.BaseType; + } + + return depth; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Attributes/ShowIfPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Attributes/ShowIfPropertyDrawer.cs.meta new file mode 100644 index 000000000..1c6d4dabf --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Attributes/ShowIfPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a3121af92923ba541a626e439d78fef0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings.meta b/Assets/Obvious/Soap/Core/Editor/Bindings.meta new file mode 100644 index 000000000..09e32c7c4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d126c401686918347b0252080288b7bc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindComparisonToUnityEventDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Bindings/BindComparisonToUnityEventDrawer.cs new file mode 100644 index 000000000..4797f3bd5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindComparisonToUnityEventDrawer.cs @@ -0,0 +1,82 @@ +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(BindComparisonToUnityEvent))] + [CanEditMultipleObjects] + public class BindComparisonToUnityEventDrawer : UnityEditor.Editor + { + BindComparisonToUnityEvent _targetScript; + SerializedProperty _boolVariable; + SerializedProperty _boolComparer; + SerializedProperty _intVariable; + SerializedProperty _intComparer; + SerializedProperty _floatVariable; + SerializedProperty _floatComparer; + SerializedProperty _stringVariable; + SerializedProperty _stringComparer; + SerializedProperty _unityEvent; + + void OnEnable() + { + _targetScript = (BindComparisonToUnityEvent)target; + _boolVariable = serializedObject.FindProperty("_boolVariable"); + _boolComparer = serializedObject.FindProperty("_boolComparer"); + _intVariable = serializedObject.FindProperty("_intVariable"); + _intComparer = serializedObject.FindProperty("_intComparer"); + _floatVariable = serializedObject.FindProperty("_floatVariable"); + _floatComparer = serializedObject.FindProperty("_floatComparer"); + _stringVariable = serializedObject.FindProperty("_stringVariable"); + _stringComparer = serializedObject.FindProperty("_stringComparer"); + _unityEvent = serializedObject.FindProperty("_unityEvent"); + } + + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + Undo.RecordObject(_targetScript, "Modified Custom Inspector"); + _targetScript.Type = (CustomVariableType)EditorGUILayout.EnumPopup("Variable Type", _targetScript.Type); + + switch (_targetScript.Type) + { + case CustomVariableType.None: + break; + case CustomVariableType.Bool: + EditorGUILayout.PropertyField(_boolVariable, new GUIContent("Bool Variable")); + EditorGUILayout.PropertyField(_boolComparer, new GUIContent("Bool Comparer")); + EditorGUILayout.PropertyField(_unityEvent, new GUIContent("Event")); + break; + case CustomVariableType.Int: + EditorGUILayout.PropertyField(_intVariable, new GUIContent("Int Variable")); + _targetScript.Comparison = + (BindComparisonToUnityEvent.Comparator)EditorGUILayout.EnumPopup("Operation", + _targetScript.Comparison); + EditorGUILayout.PropertyField(_intComparer, new GUIContent("Int Comparer")); + EditorGUILayout.PropertyField(_unityEvent, new GUIContent("Event")); + break; + case CustomVariableType.Float: + EditorGUILayout.PropertyField(_floatVariable, new GUIContent("Float Variable")); + _targetScript.Comparison = + (BindComparisonToUnityEvent.Comparator)EditorGUILayout.EnumPopup("Operation", + _targetScript.Comparison); + EditorGUILayout.PropertyField(_floatComparer, new GUIContent("Float Comparer")); + EditorGUILayout.PropertyField(_unityEvent, new GUIContent("Event")); + break; + case CustomVariableType.String: + EditorGUILayout.PropertyField(_stringVariable, new GUIContent("String Variable")); + EditorGUILayout.PropertyField(_stringComparer, new GUIContent("String Comparer")); + EditorGUILayout.PropertyField(_unityEvent, new GUIContent("Event")); + break; + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + if (!Application.isPlaying) + EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindComparisonToUnityEventDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Bindings/BindComparisonToUnityEventDrawer.cs.meta new file mode 100644 index 000000000..8954f8d2f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindComparisonToUnityEventDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2ea41ee95d6db224cbe5b4a5285b1f13 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindFillingImageDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Bindings/BindFillingImageDrawer.cs new file mode 100644 index 000000000..e3163c34b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindFillingImageDrawer.cs @@ -0,0 +1,43 @@ +using UnityEditor; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(BindFillingImage))] + [CanEditMultipleObjects] + public class BindFillingImageDrawer : UnityEditor.Editor + { + SerializedProperty _floatVariableProperty; + SerializedProperty _useMaxValueFromVariableProperty; + SerializedProperty _maxValueProperty; + + private void OnEnable() + { + _floatVariableProperty = serializedObject.FindProperty("_floatVariable"); + _useMaxValueFromVariableProperty = serializedObject.FindProperty("_useMaxValueFromVariable"); + _maxValueProperty = serializedObject.FindProperty("_maxValue"); + } + + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + serializedObject.UpdateIfRequiredOrScript(); + Undo.RecordObject(target, "Modified Custom Inspector"); + + EditorGUILayout.PropertyField(_floatVariableProperty); + _useMaxValueFromVariableProperty.boolValue = + EditorGUILayout.Toggle("Use Variable Max Value", + _useMaxValueFromVariableProperty.boolValue); + if (!_useMaxValueFromVariableProperty.boolValue) + { + EditorGUILayout.PropertyField(_maxValueProperty); + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindFillingImageDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Bindings/BindFillingImageDrawer.cs.meta new file mode 100644 index 000000000..344ad9819 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindFillingImageDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4c38ae3ff88dc9b4796b57a53c71db42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderDrawer.cs new file mode 100644 index 000000000..1cf17202a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderDrawer.cs @@ -0,0 +1,43 @@ +using UnityEditor; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(BindSlider))] + [CanEditMultipleObjects] + public class BindSliderDrawer : UnityEditor.Editor + { + SerializedProperty _floatVariableProperty; + SerializedProperty _useMaxValueFromVariableProperty; + SerializedProperty _maxValueProperty; + + private void OnEnable() + { + _floatVariableProperty = serializedObject.FindProperty("_floatVariable"); + _useMaxValueFromVariableProperty = serializedObject.FindProperty("_useMaxValueFromVariable"); + _maxValueProperty = serializedObject.FindProperty("_maxValue"); + } + + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + serializedObject.UpdateIfRequiredOrScript(); + Undo.RecordObject(target, "Modified Custom Inspector"); + + EditorGUILayout.PropertyField(_floatVariableProperty); + _useMaxValueFromVariableProperty.boolValue = + EditorGUILayout.Toggle("Use Variable Max Value", + _useMaxValueFromVariableProperty.boolValue); + if (!_useMaxValueFromVariableProperty.boolValue) + { + EditorGUILayout.PropertyField(_maxValueProperty); + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderDrawer.cs.meta new file mode 100644 index 000000000..d4fe01aa5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a0c22ce8fa10a62449d9407395553dce +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderIntDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderIntDrawer.cs new file mode 100644 index 000000000..1928b9663 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderIntDrawer.cs @@ -0,0 +1,43 @@ +using UnityEditor; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(BindSliderInt))] + [CanEditMultipleObjects] + public class BindSliderIntDrawer : UnityEditor.Editor + { + SerializedProperty _floatVariableProperty; + SerializedProperty _useMaxValueFromVariableProperty; + SerializedProperty _maxValueProperty; + + private void OnEnable() + { + _floatVariableProperty = serializedObject.FindProperty("_intVariable"); + _useMaxValueFromVariableProperty = serializedObject.FindProperty("_useMaxValueFromVariable"); + _maxValueProperty = serializedObject.FindProperty("_maxValue"); + } + + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + serializedObject.UpdateIfRequiredOrScript(); + Undo.RecordObject(target, "Modified Custom Inspector"); + + EditorGUILayout.PropertyField(_floatVariableProperty); + _useMaxValueFromVariableProperty.boolValue = + EditorGUILayout.Toggle("Use Variable Max Value", + _useMaxValueFromVariableProperty.boolValue); + if (!_useMaxValueFromVariableProperty.boolValue) + { + EditorGUILayout.PropertyField(_maxValueProperty); + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderIntDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderIntDrawer.cs.meta new file mode 100644 index 000000000..5b837ce28 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindSliderIntDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10fac7d500c28e441b676abac2b31424 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextDrawer.cs new file mode 100644 index 000000000..ad962f62e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextDrawer.cs @@ -0,0 +1,84 @@ +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(BindText))] + [CanEditMultipleObjects] + public class BindTextDrawer : UnityEditor.Editor + { + BindText _targetScript; + SerializedProperty _boolVariableProperty; + SerializedProperty _intVariableProperty; + SerializedProperty _floatVariableProperty; + SerializedProperty _stringVariableProperty; + + void OnEnable() + { + _targetScript = (BindText)target; + _boolVariableProperty = serializedObject.FindProperty("_boolVariable"); + _intVariableProperty = serializedObject.FindProperty("_intVariable"); + _floatVariableProperty = serializedObject.FindProperty("_floatVariable"); + _stringVariableProperty = serializedObject.FindProperty("_stringVariable"); + } + + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + Undo.RecordObject(_targetScript, "Modified Custom Inspector"); + _targetScript.Type = (CustomVariableType)EditorGUILayout.EnumPopup("Variable Type", _targetScript.Type); + _targetScript.Prefix = EditorGUILayout.TextField(new GUIContent("Prefix", + "Adds a text in front of the value"), _targetScript.Prefix); + _targetScript.Suffix = EditorGUILayout.TextField(new GUIContent("Suffix", + "Adds a text after the value"), _targetScript.Suffix); + + switch (_targetScript.Type) + { + case CustomVariableType.None: + break; + case CustomVariableType.Bool: + EditorGUILayout.PropertyField(_boolVariableProperty, new GUIContent("Bool")); + break; + case CustomVariableType.Int: + EditorGUILayout.PropertyField(_intVariableProperty, new GUIContent("Int")); + _targetScript.Increment = EditorGUILayout.IntField(new GUIContent("Increment", + "Useful to add an offset, for example for Level counts. If your level index is 0, add 1, so it displays Level : 1"), + _targetScript.Increment); + _targetScript.IsClamped = EditorGUILayout.Toggle(new GUIContent("Is Clamped", + "Clamps the value shown to a minimum and a maximum."), _targetScript.IsClamped); + if (_targetScript.IsClamped) + { + var minMaxInt = EditorGUILayout.Vector2IntField("Min Max", _targetScript.MinMaxInt); + _targetScript.MinMaxInt = minMaxInt; + } + + break; + case CustomVariableType.Float: + EditorGUILayout.PropertyField(_floatVariableProperty, new GUIContent("Float")); + var decimalAmount = EditorGUILayout.IntField(new GUIContent("Decimal", + "Round the float to a decimal"), _targetScript.DecimalAmount); + _targetScript.DecimalAmount = Mathf.Clamp(decimalAmount, 0, 5); + _targetScript.IsClamped = EditorGUILayout.Toggle(new GUIContent("Is Clamped", + "Clamps the value shown to a minimum and a maximum."), _targetScript.IsClamped); + if (_targetScript.IsClamped) + { + var minMaxFloat = EditorGUILayout.Vector2Field("Min Max", _targetScript.MinMaxFloat); + _targetScript.MinMaxFloat = minMaxFloat; + } + + break; + case CustomVariableType.String: + EditorGUILayout.PropertyField(_stringVariableProperty, new GUIContent("String")); + break; + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + if (!Application.isPlaying) + EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextDrawer.cs.meta new file mode 100644 index 000000000..6f87d1835 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3d6472b69656eae438f40031f5b58c3e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextMeshProDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextMeshProDrawer.cs new file mode 100644 index 000000000..680fc49bc --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextMeshProDrawer.cs @@ -0,0 +1,84 @@ +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(BindTextMeshPro))] + [CanEditMultipleObjects] + public class BindTextMeshProDrawer : UnityEditor.Editor + { + BindTextMeshPro _targetScript; + SerializedProperty _boolVariableProperty; + SerializedProperty _intVariableProperty; + SerializedProperty _floatVariableProperty; + SerializedProperty _stringVariableProperty; + + void OnEnable() + { + _targetScript = (BindTextMeshPro)target; + _boolVariableProperty = serializedObject.FindProperty("_boolVariable"); + _intVariableProperty = serializedObject.FindProperty("_intVariable"); + _floatVariableProperty = serializedObject.FindProperty("_floatVariable"); + _stringVariableProperty = serializedObject.FindProperty("_stringVariable"); + } + + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + Undo.RecordObject(_targetScript, "Modified Custom Inspector"); + _targetScript.Type = (CustomVariableType)EditorGUILayout.EnumPopup("Variable Type", _targetScript.Type); + _targetScript.Prefix = EditorGUILayout.TextField(new GUIContent("Prefix", + "Adds a text in front of the value"), _targetScript.Prefix); + _targetScript.Suffix = EditorGUILayout.TextField(new GUIContent("Suffix", + "Adds a text after the value"), _targetScript.Suffix); + + switch (_targetScript.Type) + { + case CustomVariableType.None: + break; + case CustomVariableType.Bool: + EditorGUILayout.PropertyField(_boolVariableProperty, new GUIContent("Bool")); + break; + case CustomVariableType.Int: + EditorGUILayout.PropertyField(_intVariableProperty, new GUIContent("Int")); + _targetScript.Increment = EditorGUILayout.IntField(new GUIContent("Increment", + "Useful to add an offset, for example for Level counts. If your level index is 0, add 1, so it displays Level : 1"), + _targetScript.Increment); + _targetScript.IsClamped = EditorGUILayout.Toggle(new GUIContent("Is Clamped", + "Clamps the value shown to a minimum and a maximum."), _targetScript.IsClamped); + if (_targetScript.IsClamped) + { + var minMaxInt = EditorGUILayout.Vector2IntField("Min Max", _targetScript.MinMaxInt); + _targetScript.MinMaxInt = minMaxInt; + } + + break; + case CustomVariableType.Float: + EditorGUILayout.PropertyField(_floatVariableProperty, new GUIContent("Float")); + var decimalAmount = EditorGUILayout.IntField(new GUIContent("Decimal", + "Round the float to a decimal"), _targetScript.DecimalAmount); + _targetScript.DecimalAmount = Mathf.Clamp(decimalAmount, 0, 5); + _targetScript.IsClamped = EditorGUILayout.Toggle(new GUIContent("Is Clamped", + "Clamps the value shown to a minimum and a maximum."), _targetScript.IsClamped); + if (_targetScript.IsClamped) + { + var minMaxFloat = EditorGUILayout.Vector2Field("Min Max", _targetScript.MinMaxFloat); + _targetScript.MinMaxFloat = minMaxFloat; + } + + break; + case CustomVariableType.String: + EditorGUILayout.PropertyField(_stringVariableProperty, new GUIContent("String")); + break; + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + if (!Application.isPlaying) + EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextMeshProDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextMeshProDrawer.cs.meta new file mode 100644 index 000000000..0a9d72214 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Bindings/BindTextMeshProDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4bc723040e26ab34793f62522c1eea0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Obvious.Soap.Editor.asmdef b/Assets/Obvious/Soap/Core/Editor/Obvious.Soap.Editor.asmdef new file mode 100644 index 000000000..81a58d7d8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Obvious.Soap.Editor.asmdef @@ -0,0 +1,17 @@ +{ + "name": "Obvious.Soap.Editor", + "references": [ + "GUID:ee6baafdecd94804a8714654c4bd097f" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Obvious.Soap.Editor.asmdef.meta b/Assets/Obvious/Soap/Core/Editor/Obvious.Soap.Editor.asmdef.meta new file mode 100644 index 000000000..2e411bf66 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Obvious.Soap.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d077ff18d774b9d479c2ce4c35deb3a1 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources.meta b/Assets/Obvious/Soap/Core/Editor/Resources.meta new file mode 100644 index 000000000..fcbf39e5e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9569faec7b87b0439a748b6d5efdd7f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins.meta b/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins.meta new file mode 100644 index 000000000..96a9ecc2b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9ee1d52ffe66b24b90ae7ef27f37755 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins/SoapWizardGUISkin.guiskin b/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins/SoapWizardGUISkin.guiskin new file mode 100644 index 000000000..ba912ae11 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins/SoapWizardGUISkin.guiskin @@ -0,0 +1,1495 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12001, guid: 0000000000000000e000000000000000, type: 0} + m_Name: SoapWizardGUISkin + m_EditorClassIdentifier: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_box: + m_Name: box + m_Normal: + m_Background: {fileID: 11001, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_button: + m_Name: button + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 11003, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 11002, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnNormal: + m_Background: {fileID: 11005, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1} + m_OnHover: + m_Background: {fileID: 11004, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnActive: + m_Background: {fileID: 11002, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 6 + m_Right: 6 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 12 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_toggle: + m_Name: toggle + m_Normal: + m_Background: {fileID: 11018, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.89112896, g: 0.89112896, b: 0.89112896, a: 1} + m_Hover: + m_Background: {fileID: 11014, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 11013, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 11016, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.8901961, g: 0.8901961, b: 0.8901961, a: 1} + m_OnHover: + m_Background: {fileID: 11015, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnActive: + m_Background: {fileID: 11017, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 14 + m_Right: 0 + m_Top: 14 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 15 + m_Right: 0 + m_Top: 3 + m_Bottom: 0 + m_Overflow: + m_Left: -1 + m_Right: 0 + m_Top: -4 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_label: + m_Name: label + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: + - {fileID: 0} + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_textField: + m_Name: textfield + m_Normal: + m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} + m_Hover: + m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnNormal: + m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 20 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_textArea: + m_Name: textarea + m_Normal: + m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1} + m_Hover: + m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 1 + m_RichText: 0 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_window: + m_Name: window + m_Normal: + m_Background: {fileID: 11023, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 11022, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 8 + m_Right: 8 + m_Top: 18 + m_Bottom: 8 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 20 + m_Bottom: 10 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: -18} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalSlider: + m_Name: horizontalslider + m_Normal: + m_Background: {fileID: 11009, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 3 + m_Right: 3 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -2 + m_Bottom: -3 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 12 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalSliderThumb: + m_Name: horizontalsliderthumb + m_Normal: + m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 7 + m_Right: 7 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 12 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalSlider: + m_Name: verticalslider + m_Normal: + m_Background: {fileID: 11021, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 3 + m_Bottom: 3 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: -1 + m_Overflow: + m_Left: -2 + m_Right: -3 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 12 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_verticalSliderThumb: + m_Name: verticalsliderthumb + m_Normal: + m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 7 + m_Bottom: 7 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: -1 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 12 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_horizontalScrollbar: + m_Name: horizontalscrollbar + m_Normal: + m_Background: {fileID: 11008, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 9 + m_Right: 9 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 1 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 15 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarThumb: + m_Name: horizontalscrollbarthumb + m_Normal: + m_Background: {fileID: 11007, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 6 + m_Right: 6 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: 1 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 13 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarLeftButton: + m_Name: horizontalscrollbarleftbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarRightButton: + m_Name: horizontalscrollbarrightbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbar: + m_Name: verticalscrollbar + m_Normal: + m_Background: {fileID: 11020, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 9 + m_Bottom: 9 + m_Margin: + m_Left: 1 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 1 + m_Bottom: 1 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 15 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbarThumb: + m_Name: verticalscrollbarthumb + m_Normal: + m_Background: {fileID: 11019, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 6 + m_Bottom: 6 + m_Overflow: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 15 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_verticalScrollbarUpButton: + m_Name: verticalscrollbarupbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbarDownButton: + m_Name: verticalscrollbardownbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_ScrollView: + m_Name: scrollview + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_CustomStyles: + - m_Name: title + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 20 + m_FontStyle: 1 + m_Alignment: 4 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 50 + m_StretchWidth: 1 + m_StretchHeight: 1 + - m_Name: copyright + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 10 + m_FontStyle: 1 + m_Alignment: 7 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 50 + m_StretchWidth: 1 + m_StretchHeight: 1 + m_Settings: + m_DoubleClickSelectsWord: 1 + m_TripleClickSelectsLine: 1 + m_CursorColor: {r: 1, g: 1, b: 1, a: 1} + m_CursorFlashSpeed: -1 + m_SelectionColor: {r: 1, g: 0.38403907, b: 0, a: 0.7} diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins/SoapWizardGUISkin.guiskin.meta b/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins/SoapWizardGUISkin.guiskin.meta new file mode 100644 index 000000000..5497e44e5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/GUISkins/SoapWizardGUISkin.guiskin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7c148d612cb27b24aa088b24c6e441f4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons.meta new file mode 100644 index 000000000..e55669658 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53c7550a523f46f479c32652b4e3a385 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_bindings.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_bindings.png new file mode 100644 index 000000000..4bebd2ed1 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_bindings.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_bindings.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_bindings.png.meta new file mode 100644 index 000000000..dc0940fc2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_bindings.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 8fafaa2b606c8174d9bbe26515992389 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_cancel.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_cancel.png new file mode 100644 index 000000000..b1f813ba5 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_cancel.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_cancel.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_cancel.png.meta new file mode 100644 index 000000000..8bc047739 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_cancel.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: c892bf41f4d2f614faa91d63b971321d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_delete.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_delete.png new file mode 100644 index 000000000..afe9b37e6 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_delete.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_delete.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_delete.png.meta new file mode 100644 index 000000000..a8a670e5c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_delete.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: e600b702567e8124b99344929b3e5739 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_discord.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_discord.png new file mode 100644 index 000000000..a909b0b92 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_discord.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_discord.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_discord.png.meta new file mode 100644 index 000000000..227b9cdd3 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_discord.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 6031259ef3cbcf744bc5f3f25806acfe +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_docs.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_docs.png new file mode 100644 index 000000000..c3c99a52d Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_docs.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_docs.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_docs.png.meta new file mode 100644 index 000000000..78392afae --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_docs.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: b483748dfdaff13408d16835ef2a093b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_documentation.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_documentation.png new file mode 100644 index 000000000..e52d43a29 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_documentation.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_documentation.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_documentation.png.meta new file mode 100644 index 000000000..7c14c551b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_documentation.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 2171ac4a0c996e441b73747c44b761f5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_duplicate.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_duplicate.png new file mode 100644 index 000000000..635ac4a84 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_duplicate.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_duplicate.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_duplicate.png.meta new file mode 100644 index 000000000..424ecd36a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_duplicate.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: 097de6f215bcdfd4dbc983ed6deab3e3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_edit.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_edit.png new file mode 100644 index 000000000..32daafd1f Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_edit.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_edit.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_edit.png.meta new file mode 100644 index 000000000..aa2ed2af2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_edit.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: d8f3df6e45d317d41902c78d9986a8b2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_eventListener.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_eventListener.png new file mode 100644 index 000000000..c96eb04d7 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_eventListener.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_eventListener.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_eventListener.png.meta new file mode 100644 index 000000000..7690d614e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_eventListener.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: f26f39c2872ef84439641da6a91f8b92 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_obviousLogo.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_obviousLogo.png new file mode 100644 index 000000000..24961678f Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_obviousLogo.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_obviousLogo.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_obviousLogo.png.meta new file mode 100644 index 000000000..8ee69b92e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_obviousLogo.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 0bb39a3321f73284c8d3d6fd0996f53f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_ping.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_ping.png new file mode 100644 index 000000000..f8eeb3a53 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_ping.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_ping.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_ping.png.meta new file mode 100644 index 000000000..0b90236e3 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_ping.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: b1e19be094526ac4f987014123a8804d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_runtimeInjectable.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_runtimeInjectable.png new file mode 100644 index 000000000..d8cf75db6 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_runtimeInjectable.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_runtimeInjectable.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_runtimeInjectable.png.meta new file mode 100644 index 000000000..569d567f8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_runtimeInjectable.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 6bae7c9af84702d4a91e31b2cfa75651 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableDictionary.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableDictionary.png new file mode 100644 index 000000000..365031952 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableDictionary.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableDictionary.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableDictionary.png.meta new file mode 100644 index 000000000..d4c4a8f14 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableDictionary.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: cb7d216441d4dd040b2820e061d45ecc +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEnum.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEnum.png new file mode 100644 index 000000000..3e1af70bf Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEnum.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEnum.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEnum.png.meta new file mode 100644 index 000000000..0eea8d16a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEnum.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: f972893d7a1375b4393b57ae52c508d3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEvent.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEvent.png new file mode 100644 index 000000000..f1a056c11 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEvent.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEvent.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEvent.png.meta new file mode 100644 index 000000000..526787942 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableEvent.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: c90dc5e2923623d4ea37625d5bc56bd8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableList.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableList.png new file mode 100644 index 000000000..b92430a6a Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableList.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableList.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableList.png.meta new file mode 100644 index 000000000..73237302c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableList.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: e02af6df0d2cfa54b9c0179a889ab2d4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSave.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSave.png new file mode 100644 index 000000000..5dfb2a674 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSave.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSave.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSave.png.meta new file mode 100644 index 000000000..5797a6210 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSave.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 880b7638ebb4b9a4db7031f12f787969 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSingleton.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSingleton.png new file mode 100644 index 000000000..b1b960093 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSingleton.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSingleton.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSingleton.png.meta new file mode 100644 index 000000000..12cc1141f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableSingleton.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 38c5a15029d00ba4fbb87f2335e4a139 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableVariable.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableVariable.png new file mode 100644 index 000000000..600bbe20b Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableVariable.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableVariable.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableVariable.png.meta new file mode 100644 index 000000000..6badae7b1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_scriptableVariable.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: 8173878b5f4d7724784454801c58c9c4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapLogo.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapLogo.png new file mode 100644 index 000000000..437c8c275 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapLogo.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapLogo.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapLogo.png.meta new file mode 100644 index 000000000..898174e99 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapLogo.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: 360de02a2b5035446b46b7ef5b35ccd7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapSettings.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapSettings.png new file mode 100644 index 000000000..99e76d270 Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapSettings.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapSettings.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapSettings.png.meta new file mode 100644 index 000000000..b9037b828 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_soapSettings.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 871c60e018e43ae4aaae108cb4d41c2c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_subAsset.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_subAsset.png new file mode 100644 index 000000000..db234b76a Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_subAsset.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_subAsset.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_subAsset.png.meta new file mode 100644 index 000000000..18fb951a5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_subAsset.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: 9c855a3afb21de742bd4fde37105b127 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_youtube.png b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_youtube.png new file mode 100644 index 000000000..9cfcd625e Binary files /dev/null and b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_youtube.png differ diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_youtube.png.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_youtube.png.meta new file mode 100644 index 000000000..36f50c44a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Icons/icon_youtube.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: aa01cffb03b6ae643b46c2677e3ebfac +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 1 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/SoapSettings.asset b/Assets/Obvious/Soap/Core/Editor/Resources/SoapSettings.asset new file mode 100644 index 000000000..8bdba4dad --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/SoapSettings.asset @@ -0,0 +1,27 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b7ca52a950d1494aa1184cdc7700c3d, type: 3} + m_Name: SoapSettings + m_EditorClassIdentifier: + VariableDisplayMode: 0 + NamingOnCreationMode: 0 + CreatePathMode: 0 + RaiseEventsInEditor: 0 + Tags: + - None + Prefixes: + - + - + - + - + - + - diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/SoapSettings.asset.meta b/Assets/Obvious/Soap/Core/Editor/Resources/SoapSettings.asset.meta new file mode 100644 index 000000000..30a6638de --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/SoapSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6782cd6e453a6243a7aecbf5e2c4092 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates.meta new file mode 100644 index 000000000..229b0f134 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8d71b8ec6ad2be74785262a088fb1684 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_EventListenerTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_EventListenerTemplate.cs.txt new file mode 100644 index 000000000..db2a7031f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_EventListenerTemplate.cs.txt @@ -0,0 +1,26 @@ +using UnityEngine; +using UnityEngine.Events; +using Obvious.Soap; + +[AddComponentMenu("Soap/EventListeners/EventListener$TYPE$")] +public class EventListener$TYPENAME$ : EventListenerGeneric<$TYPE$> +{ + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse<$TYPE$>[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse<$TYPE$> + { + [SerializeField] private ScriptableEvent$TYPENAME$ _scriptableEvent = null; + public override ScriptableEvent<$TYPE$> ScriptableEvent => _scriptableEvent; + + [SerializeField] private $TYPENAME$UnityEvent _response = null; + public override UnityEvent<$TYPE$> Response => _response; + } + + [System.Serializable] + public class $TYPENAME$UnityEvent : UnityEvent<$TYPE$> + { + + } +} diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_EventListenerTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_EventListenerTemplate.cs.txt.meta new file mode 100644 index 000000000..e53fe1bfe --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_EventListenerTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a3e26a8dc6e389440b4325590ebf1859 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableEventTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableEventTemplate.cs.txt new file mode 100644 index 000000000..3007be883 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableEventTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "ScriptableEvent$TYPE$", menuName = "Soap/ScriptableEvents/$TYPE$")] +public class ScriptableEvent$TYPENAME$ : ScriptableEvent<$TYPE$> +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableEventTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableEventTemplate.cs.txt.meta new file mode 100644 index 000000000..24c3bf7e3 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableEventTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 16e841f65f1a69d49af3eaf320b5d5f9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableListTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableListTemplate.cs.txt new file mode 100644 index 000000000..678f2ad98 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableListTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "ScriptableList$TYPE$", menuName = "Soap/ScriptableLists/$TYPE$")] +public class ScriptableList$TYPENAME$ : ScriptableList<$TYPE$> +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableListTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableListTemplate.cs.txt.meta new file mode 100644 index 000000000..3c1461573 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableListTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 266f8c7d17950374e9eff0d222d7a0b5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableVariableTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableVariableTemplate.cs.txt new file mode 100644 index 000000000..d30c720e1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableVariableTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "$TYPE$Variable", menuName = "Soap/ScriptableVariables/$TYPE$")] +public class $TYPENAME$Variable : ScriptableVariable<$TYPE$> +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableVariableTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableVariableTemplate.cs.txt.meta new file mode 100644 index 000000000..956a5c654 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/1_ScriptableVariableTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 014fb01d34cf80f4493cd42ad3f81ad4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/EventListenerTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/EventListenerTemplate.cs.txt new file mode 100644 index 000000000..5f932dd0e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/EventListenerTemplate.cs.txt @@ -0,0 +1,26 @@ +using UnityEngine; +using UnityEngine.Events; +using Obvious.Soap; + +[AddComponentMenu("Soap/EventListeners/EventListener"+nameof($TYPE$))] +public class EventListener$TYPENAME$ : EventListenerGeneric<$TYPE$> +{ + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse<$TYPE$>[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse<$TYPE$> + { + [SerializeField] private ScriptableEvent$TYPENAME$ _scriptableEvent = null; + public override ScriptableEvent<$TYPE$> ScriptableEvent => _scriptableEvent; + + [SerializeField] private $TYPENAME$UnityEvent _response = null; + public override UnityEvent<$TYPE$> Response => _response; + } + + [System.Serializable] + public class $TYPENAME$UnityEvent : UnityEvent<$TYPE$> + { + + } +} diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/EventListenerTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/EventListenerTemplate.cs.txt.meta new file mode 100644 index 000000000..cb0c81d81 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/EventListenerTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7d971de644ebd414d97ec3443a9c5932 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeMonoTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeMonoTemplate.cs.txt new file mode 100644 index 000000000..63bab926e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeMonoTemplate.cs.txt @@ -0,0 +1,15 @@ +using UnityEngine; +using Obvious.Soap; + +public class $TYPE$ : MonoBehaviour +{ + void Start() + { + + } + + void Update() + { + + } +} diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeMonoTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeMonoTemplate.cs.txt.meta new file mode 100644 index 000000000..c3d3fbc02 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeMonoTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2664957470d6b1640baa16b0ec0742eb +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeTemplate.cs.txt new file mode 100644 index 000000000..a43a3c99d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeTemplate.cs.txt @@ -0,0 +1,6 @@ +[System.Serializable] +public class $TYPE$ +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeTemplate.cs.txt.meta new file mode 100644 index 000000000..5bb1d0bb5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/NewTypeTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7c53ec3fecc362c408a1380b5a75953b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableDictionaryTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableDictionaryTemplate.cs.txt new file mode 100644 index 000000000..abae577b4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableDictionaryTemplate.cs.txt @@ -0,0 +1,9 @@ +using System; +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = nameof($TYPE$), menuName = "Soap/ScriptableDictionary/"+nameof($TYPE$))] +public class $TYPE$ : ScriptableDictionary<$KEY$,$VALUE$> +{ + +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableDictionaryTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableDictionaryTemplate.cs.txt.meta new file mode 100644 index 000000000..1df8beebd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableDictionaryTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 743fedb09df810c48b2b57795d077fa2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEnumTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEnumTemplate.cs.txt new file mode 100644 index 000000000..54fef882a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEnumTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName ="ScriptableEnum$TYPE$", menuName = "Soap/ScriptableEnums/$TYPE$")] +public class ScriptableEnum$TYPENAME$ : ScriptableEnumBase +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEnumTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEnumTemplate.cs.txt.meta new file mode 100644 index 000000000..b035f054b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEnumTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 40d0c0a08b9b8bc47bda34c6a9315a8b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEventTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEventTemplate.cs.txt new file mode 100644 index 000000000..f25d19a20 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEventTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "ScriptableEvent" + nameof($TYPE$), menuName = "Soap/ScriptableEvents/"+ nameof($TYPE$))] +public class ScriptableEvent$TYPENAME$ : ScriptableEvent<$TYPE$> +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEventTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEventTemplate.cs.txt.meta new file mode 100644 index 000000000..49371957c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableEventTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 246e39d4ebd2f384799d95217d4f8ae7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableListTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableListTemplate.cs.txt new file mode 100644 index 000000000..38e3e2ee7 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableListTemplate.cs.txt @@ -0,0 +1,8 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "scriptable_list_" + nameof($TYPE$), menuName = "Soap/ScriptableLists/"+ nameof($TYPE$))] +public class ScriptableList$TYPENAME$ : ScriptableList<$TYPE$> +{ + +} diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableListTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableListTemplate.cs.txt.meta new file mode 100644 index 000000000..14da2b592 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableListTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1abfff494f3a6154f8237c6466d6b4d8 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSaveTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSaveTemplate.cs.txt new file mode 100644 index 000000000..7e4892431 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSaveTemplate.cs.txt @@ -0,0 +1,9 @@ +using System; +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "ScriptableSave" + nameof($TYPE$), menuName = "Soap/ScriptableSaves/ScriptableSave" + nameof($TYPE$))] +public class ScriptableSave$TYPENAME$ : ScriptableSave<$TYPE$> +{ + +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSaveTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSaveTemplate.cs.txt.meta new file mode 100644 index 000000000..e8b6c65b1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSaveTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a3e5b30c121932f439e7d6dba569eea7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSingletonTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSingletonTemplate.cs.txt new file mode 100644 index 000000000..06817a738 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSingletonTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; +using Obvious.Soap.Attributes; + +[CreateAssetMenu(fileName = nameof($TYPENAME$), menuName = "Soap/ScriptableSingletons/"+ nameof($TYPENAME$))] +public class $TYPENAME$ : ScriptableSingleton<$TYPENAME$> +{ + +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSingletonTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSingletonTemplate.cs.txt.meta new file mode 100644 index 000000000..82c896377 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableSingletonTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 71c4fad6380a70f4ebcdfb0e4dcc6c0d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableVariableTemplate.cs.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableVariableTemplate.cs.txt new file mode 100644 index 000000000..eba50ae50 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableVariableTemplate.cs.txt @@ -0,0 +1,9 @@ +using UnityEngine; +using Obvious.Soap; + +[CreateAssetMenu(fileName = "ScriptableVariable" + nameof($TYPE$), menuName = "Soap/ScriptableVariables/"+ nameof($TYPE$))] +public class $TYPENAME$Variable : ScriptableVariable<$TYPE$> +{ + +} + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableVariableTemplate.cs.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableVariableTemplate.cs.txt.meta new file mode 100644 index 000000000..568bf1a2e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Templates/ScriptableVariableTemplate.cs.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6967581cd0d69004095627fbe2ecda17 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts.meta new file mode 100644 index 000000000..fed4c1bb0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f420ba2c3bc332941a62b2fc35757621 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/10_ScriptableSingletons_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/10_ScriptableSingletons_Text.txt new file mode 100644 index 000000000..fca47c146 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/10_ScriptableSingletons_Text.txt @@ -0,0 +1,4 @@ +This scene showcases a practical example on how to use a Scriptable Singleton. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to access the Scriptable Singleton by code +-how to use the Scriptable Singleton in the Inspector +-how to use the [ResourcePath] attribute to create a Scriptable Singleton asset automatically diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/10_ScriptableSingletons_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/10_ScriptableSingletons_Text.txt.meta new file mode 100644 index 000000000..081881f67 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/10_ScriptableSingletons_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b9714f1518d3ec5468d0ecd697819cc2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/1_ScriptableVariables_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/1_ScriptableVariables_Text.txt new file mode 100644 index 000000000..63b9b02fa --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/1_ScriptableVariables_Text.txt @@ -0,0 +1,6 @@ +In this scene, you will learn more about Scriptable Variables by seeing how they are used. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to access these variables directly +-how to register callbacks when their value changes (OnValueChanged event) +-how to use variable references +-how to use the save option +-learn about their menu context options \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/1_ScriptableVariables_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/1_ScriptableVariables_Text.txt.meta new file mode 100644 index 000000000..e983930fd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/1_ScriptableVariables_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a8622172223bfd54f889f875d1a56d9d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/2_Bindings_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/2_Bindings_Text.txt new file mode 100644 index 000000000..b01f32509 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/2_Bindings_Text.txt @@ -0,0 +1,10 @@ +Bindings are components that you attach to GameObjects to bind them to a variable so that they execute a simple behavior when that variable value changes. +In this scene, you will learn more about Bindings by seeing how they are used. These are all the bindings that are showcased: +-BindText / BindTextMeshPro +-BindFillingImage +-BindSlider +-BindToggle +-BindGraphicColor +-BindRendererColor +-BindComparisonToUnityEvent +-BindInputField \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/2_Bindings_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/2_Bindings_Text.txt.meta new file mode 100644 index 000000000..2eddf414f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/2_Bindings_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e14cb066ca1f0f4e9d36e9d029ab335 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/3_ScriptableLists_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/3_ScriptableLists_Text.txt new file mode 100644 index 000000000..d2ab5486f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/3_ScriptableLists_Text.txt @@ -0,0 +1,4 @@ +In this scene, you will learn more about ScriptableLists by seeing how they are used. The scene content goes hands-in-hand with the documentation, discover them together to learn: +-how to add and remove items from a ScriptableList +-how to subscribe to ScriptableList events +-how to iterate over a ScriptableList diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/3_ScriptableLists_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/3_ScriptableLists_Text.txt.meta new file mode 100644 index 000000000..7941e16bb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/3_ScriptableLists_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b2678e0f574abc647bcfdada16674043 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/4_ScriptableEvents_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/4_ScriptableEvents_Text.txt new file mode 100644 index 000000000..56db97902 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/4_ScriptableEvents_Text.txt @@ -0,0 +1,6 @@ +In this scene, you will learn more about ScriptableEvents by seeing how they are used. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to fire ScriptableEvents from code +-how to use EventListeners to listen to ScriptableEvents +-how to listen to ScriptableEvents from code +-how to fire ScriptableEvents from the inspector +-how to debug ScriptableEvents \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/4_ScriptableEvents_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/4_ScriptableEvents_Text.txt.meta new file mode 100644 index 000000000..4838c7cb4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/4_ScriptableEvents_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bd7c5dd62476d8a4a875970773bc3854 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/5_ScriptableSaves_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/5_ScriptableSaves_Text.txt new file mode 100644 index 000000000..3e14057c9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/5_ScriptableSaves_Text.txt @@ -0,0 +1,6 @@ +In this scene, you will learn more about the ScriptableSave. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to save a lot of data in a single file +-how to save data in a way that is easy to read and edit +-how to add custom methods to the save +-how to save/load and delete the save +-how to combine scriptable save and other soap scriptable objects diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/5_ScriptableSaves_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/5_ScriptableSaves_Text.txt.meta new file mode 100644 index 000000000..186ea86e0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/5_ScriptableSaves_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cff3b7d724a919846bd9938f702392c2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/6_ScriptableEnums_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/6_ScriptableEnums_Text.txt new file mode 100644 index 000000000..583e11870 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/6_ScriptableEnums_Text.txt @@ -0,0 +1,4 @@ +In this scene, you will learn more about how to use and create ScriptableEnums. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to use ScriptableEnums +-how to add additional data to them +-how to create new ones diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/6_ScriptableEnums_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/6_ScriptableEnums_Text.txt.meta new file mode 100644 index 000000000..a2d8e1bc8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/6_ScriptableEnums_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 29b102a4c47519b45a04c971d2f6dc24 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/7_ScriptableSubAssets_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/7_ScriptableSubAssets_Text.txt new file mode 100644 index 000000000..493fd8432 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/7_ScriptableSubAssets_Text.txt @@ -0,0 +1,4 @@ +In this scene, you will learn more about how to use Scriptable SubAssets. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to reference Scriptable SubAssets directly +-how to reference Scriptable SubAssets indirectly + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/7_ScriptableSubAssets_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/7_ScriptableSubAssets_Text.txt.meta new file mode 100644 index 000000000..9ff107686 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/7_ScriptableSubAssets_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8346c92632f71f04d81b5df6ca17ebb6 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/8_RuntimeVariables_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/8_RuntimeVariables_Text.txt new file mode 100644 index 000000000..5ec2009ff --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/8_RuntimeVariables_Text.txt @@ -0,0 +1,7 @@ +This scene showcases a practical example on how to create and use Runtime variables. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to create an instance of a scriptable variable at runtime +-how to inject manually a runtime variable in other components +-how to use the RuntimeInjectors to inject automatically a runtime variable in other components + +Note: this is a more advanced feature of Soap. You might want to get use to Soap first before using this type of pattern. + diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/8_RuntimeVariables_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/8_RuntimeVariables_Text.txt.meta new file mode 100644 index 000000000..55c0499d9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/8_RuntimeVariables_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b6332a79a883aec459a876da81dbd612 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/9_ScriptableDictionaries_Text.txt b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/9_ScriptableDictionaries_Text.txt new file mode 100644 index 000000000..5c498697f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/9_ScriptableDictionaries_Text.txt @@ -0,0 +1,3 @@ +This scene showcases a practical example on how to use a Scriptable Dictionary. The scene content goes hands in hand with the documentation, discover them together to learn: +-how to register to the dictionary events (OnItemAdded, OnItemRemoved, Modified) +-how to add/remove and update items in the dictionary diff --git a/Assets/Obvious/Soap/Core/Editor/Resources/Texts/9_ScriptableDictionaries_Text.txt.meta b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/9_ScriptableDictionaries_Text.txt.meta new file mode 100644 index 000000000..b462e339f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Resources/Texts/9_ScriptableDictionaries_Text.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6f273c77bf8ccb84f8c9aef016c11f8e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableBase.meta new file mode 100644 index 000000000..d77ea33ee --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c4db2480bd3d8e45bdf9d22c6eaf1e9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ObjectEditor.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ObjectEditor.cs new file mode 100644 index 000000000..d10c8186d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ObjectEditor.cs @@ -0,0 +1,37 @@ +using UnityEditor; +using Object = UnityEngine.Object; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + /// + /// Needed to draw custom editors. + /// Note: Delete this class if using NaughtyAttributes + /// + [CustomEditor(typeof(Object), true, isFallback = true)] + [CanEditMultipleObjects] + internal class ObjectEditor : UnityEditor.Editor + { + public override void OnInspectorGUI() + { + //when using AddComponent, the target object is null before the domains reloads. + if (serializedObject.targetObject == null) + return; + + var targetType = serializedObject.targetObject.GetType(); + var customEditorType = typeof(CustomEditor); + var customEditors = targetType.GetCustomAttributes(customEditorType, true); + + if (customEditors.Length == 0) + { + DrawDefaultInspector(); + } + else + { + // Custom editor exists, handle it accordingly + base.OnInspectorGUI(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ObjectEditor.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ObjectEditor.cs.meta new file mode 100644 index 000000000..c4e8e8330 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ObjectEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fdd835899c281654e8b195ef253430ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBaseEditorHeader.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBaseEditorHeader.cs new file mode 100644 index 000000000..65807977a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBaseEditorHeader.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + using UnityEditor; + + [InitializeOnLoad] + static class ScriptableBaseEditorHeader + { + private static SoapSettings _soapSettings; + private static readonly GUIContent _tagContent; + + static ScriptableBaseEditorHeader() + { + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + Editor.finishedDefaultHeaderGUI += DrawHeader; + _tagContent = new GUIContent(); + _tagContent.image = SoapInspectorUtils.Icons.EditTags; + _tagContent.tooltip = "Edit Tags"; + } + + private static void DrawHeader(Editor editor) + { + if (!EditorUtility.IsPersistent(editor.target)) + return; + + if (editor.targets.Length > 1) + { + //If there is more than one target, we check if they are all ScriptableBase + var scriptableBases = new List(); + foreach (var target in editor.targets) + { + var scriptableBase = target as ScriptableBase; + if (scriptableBase == null) + return; + scriptableBases.Add(scriptableBase); + } + + DrawHeaderForMultipleAssetsSelected(scriptableBases); + } + else if (editor.target is ScriptableBase scriptableBase) + { + DrawHeaderForOneAssetSelected(scriptableBase); + } + } + + private static void DrawHeaderForOneAssetSelected(ScriptableBase scriptableBase) + { + EditorGUILayout.BeginHorizontal(); + //Draw Description label + GUIStyle labelStyle = new GUIStyle(EditorStyles.miniBoldLabel); + EditorGUILayout.LabelField("Description:", labelStyle, GUILayout.Width(65)); + GUILayout.FlexibleSpace(); + + //Draw Tag + if (_soapSettings!= null) + DrawTag(new List { scriptableBase }); + EditorGUILayout.EndHorizontal(); + + //Draw Description text area + GUIStyle textAreaStyle = new GUIStyle(EditorStyles.textArea); + textAreaStyle.wordWrap = true; + EditorGUI.BeginChangeCheck(); + + var description = EditorGUILayout.TextArea(scriptableBase.Description); + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(scriptableBase, "Change Description"); + scriptableBase.Description = description; + EditorUtility.SetDirty(scriptableBase); + } + } + + private static void DrawHeaderForMultipleAssetsSelected(List scriptableBases) + { + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (_soapSettings!= null) //sometimes when you change branch on VC, this is null + DrawTag(scriptableBases); + EditorGUILayout.EndHorizontal(); + } + + private static void DrawTag(List scriptableBases) + { + EditorGUILayout.LabelField("Tag:", EditorStyles.miniBoldLabel, GUILayout.Width(30f)); + var currentTag = HaveSameTags(scriptableBases) + ? _soapSettings.GetTagName(scriptableBases[0]) + : "-"; + var style = new GUIStyle(EditorStyles.popup); + if (GUILayout.Button(currentTag, style, GUILayout.Width(150f))) + { + var onlyOneAsset = scriptableBases.Count == 1; + var currentTagIndex = onlyOneAsset ? scriptableBases[0].TagIndex : -1; + SoapInspectorUtils.ShowTagMenu(currentTagIndex,(newTag) => + { + foreach (var scriptableBase in scriptableBases) + { + Undo.RecordObject(scriptableBase, "Change Tag"); + scriptableBase.TagIndex = newTag; + EditorUtility.SetDirty(scriptableBase); + } + }); + } + } + + private static bool HaveSameTags(List scriptableBases) + { + if (scriptableBases.Count <= 1) + return true; + var tagIndex = scriptableBases[0].TagIndex; + return scriptableBases.TrueForAll(sb => sb.TagIndex == tagIndex); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBaseEditorHeader.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBaseEditorHeader.cs.meta new file mode 100644 index 000000000..cbb527d1e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBaseEditorHeader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd45f17cd7a34854e8c96ad949187689 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBasePropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBasePropertyDrawer.cs new file mode 100644 index 000000000..9732fc688 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBasePropertyDrawer.cs @@ -0,0 +1,254 @@ +using UnityEngine; +using UnityEditor; +using Obvious.Soap.Attributes; +using Object = UnityEngine.Object; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableBase), true)] + public abstract class ScriptableBasePropertyDrawer : PropertyDrawer + { + private UnityEditor.Editor _editor; + private const float WidthRatioWhenNull = 0.82f; + protected virtual float WidthRatio => 0.82f; + protected bool? _canBeSubAsset; + private bool CanBeSubAsset => _canBeSubAsset != null && _canBeSubAsset.Value; + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + EditorGUI.BeginProperty(position, label, property); + if (_canBeSubAsset == null) + _canBeSubAsset = SoapEditorUtils.CanBeSubAsset(property, fieldInfo); + + var targetObject = property.objectReferenceValue; + if (targetObject == null) + { + DrawIfNull(position, property, label); + return; + } + + DrawIfNotNull(position, property, label, targetObject); + + EditorGUI.EndProperty(); + } + + protected void DrawIfNull(Rect position, SerializedProperty property, GUIContent label) + { + // Check if the type is generic (as new Unity version serialized Generic types) + System.Type propertyType = GetPropertyType(property); + var isCollection = SoapUtils.IsCollection(propertyType); + if (propertyType?.IsGenericType == true && !isCollection) + { + //Display error message + System.Type genericArgument = propertyType.GetGenericArguments()[0]; + var intrinsicType = SoapUtils.GetIntrinsicType(genericArgument.Name); + var scriptableName = propertyType.Name.Split('`')[0]; + string fullGenericTypeName = $"{scriptableName}<{intrinsicType}>"; + + var suggestedTypeName = scriptableName.Contains("Variable") + ? $"{intrinsicType.CapitalizeFirstLetter()}Variable" + : $"{scriptableName}{intrinsicType.CapitalizeFirstLetter()}"; + + var message = $"Do not use {fullGenericTypeName} directly. " + + $"\nPlease use {suggestedTypeName} that inherit from it instead."; + + EditorGUILayout.HelpBox(message, MessageType.Error); + } + else + { + // Original logic for non-generic types + var widthRatio = fieldInfo == null ? 1f : WidthRatioWhenNull; + var rect = DrawCustomPropertyField(position, property, label, widthRatio); + + if (fieldInfo != null) + { + var guiContent = new GUIContent("Create"); + if (GUI.Button(rect, guiContent)) + { + var soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + var tag = GetTagIndexFromAttribute(soapSettings); + if (CanBeSubAsset) + CreateSubAsset(property, tag); + else + { + var prefix = soapSettings.GetPrefix(fieldInfo.FieldType); + var assetName = $"{prefix}{GetFieldName()}"; + if (soapSettings.NamingOnCreationMode == ENamingCreationMode.Manual) + { + var popUpRect = new Rect(EditorWindow.focusedWindow.position); + PopupWindow.Show(new Rect(), new SoapAssetCreatorPopup(popUpRect, + SoapAssetCreatorPopup.EOrigin.Inspector, + fieldInfo.FieldType, assetName, tag, scriptableBase => + { + property.objectReferenceValue = scriptableBase; + property.serializedObject.ApplyModifiedProperties(); + })); + } + else + { + CreateSoapSoAtPath(property, assetName, tag); + } + } + } + } + } + + EditorGUI.EndProperty(); + } + + // Helper method to get the type of the property + private System.Type GetPropertyType(SerializedProperty property) + { + if (fieldInfo != null) + { + return fieldInfo.FieldType; + } + + if (property.propertyType == SerializedPropertyType.ObjectReference) + { + return property.objectReferenceValue?.GetType() ?? typeof(UnityEngine.Object); + } + + return null; + } + + private void CreateSoapSoAtPath(SerializedProperty property, string assetName, int tagIndex) + { + var soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + var isCustomPath = soapSettings.CreatePathMode == ECreatePathMode.Manual; + var path = isCustomPath + ? SoapEditorUtils.CustomCreationPath + : SoapFileUtils.GetSelectedFolderPathInProjectWindow(); + var scriptable = SoapEditorUtils.CreateScriptableObject(fieldInfo.FieldType, assetName, path); + var scriptableBase = (ScriptableBase)scriptable; + scriptableBase.TagIndex = tagIndex; + property.objectReferenceValue = scriptableBase; + AssetDatabase.SaveAssets(); + } + + private void CreateSubAsset(SerializedProperty property, int tagIndex) + { + var soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + var mainAsset = property.serializedObject.targetObject; + var subAsset = ScriptableObject.CreateInstance(fieldInfo.FieldType); + var prefix = soapSettings.GetPrefix(fieldInfo.FieldType); + var cleanedName = SoapEditorUtils.CleanSubAssetName(GetFieldName()); + subAsset.name = $"{prefix}{cleanedName}"; + AssetDatabase.AddObjectToAsset(subAsset, mainAsset); + var scriptableBase = (ScriptableBase)subAsset; + scriptableBase.TagIndex = tagIndex; + property.objectReferenceValue = subAsset; + property.serializedObject.ApplyModifiedProperties(); + AssetDatabase.SaveAssets(); + } + + protected void DrawIfNotNull(Rect position, SerializedProperty property, GUIContent label, + Object targetObject) + { + var rect = position; + var labelRect = position; + + var offset = CanBeSubAsset ? EditorGUIUtility.singleLineHeight : 0f; + labelRect.width = position.width * .4f - offset; + + property.isExpanded = EditorGUI.Foldout(labelRect, property.isExpanded, new GUIContent(""), true); + if (property.isExpanded) + { + //To Handle Odin [HideLabel] attribute + if (CanBeSubAsset && !string.IsNullOrEmpty(label.text)) + { + label.image = SoapInspectorUtils.Icons.SubAsset; + } + + EditorGUI.PropertyField(rect, property, label); + EditorGUI.indentLevel++; + var cacheBgColor = GUI.backgroundColor; + GUI.backgroundColor = SoapEditorUtils.SoapColor; + GUILayout.BeginVertical(GUI.skin.box); + if (_editor == null) + UnityEditor.Editor.CreateCachedEditor(targetObject, null, ref _editor); + _editor.OnInspectorGUI(); + GUI.backgroundColor = cacheBgColor; + GUILayout.EndVertical(); + EditorGUI.indentLevel--; + } + else + { + DrawUnExpanded(position, property, label, targetObject); + } + } + + protected virtual string GetFieldName() + { + return fieldInfo.Name; + } + + protected virtual void DrawUnExpanded(Rect position, SerializedProperty property, GUIContent label, + Object targetObject) + { + var rect = DrawCustomPropertyField(position, property, label, WidthRatio); + DrawShortcut(rect, property, targetObject); + } + + protected virtual void DrawShortcut(Rect rect, SerializedProperty property, Object targetObject) + { + } + + private Rect DrawCustomPropertyField(Rect position, SerializedProperty property, GUIContent label, + float widthRatio) + { + if (CanBeSubAsset && !string.IsNullOrEmpty(label.text)) + { + label.text = SoapEditorUtils.CleanSubAssetName(label.text); + label.image = SoapInspectorUtils.Icons.SubAsset; + } + + var propertyRect = new Rect(position); + propertyRect.width = position.width * widthRatio; + //this sets the property rect position to the right of the label + propertyRect = EditorGUI.PrefixLabel(propertyRect, label); + + if (CanBeSubAsset && property.objectReferenceValue != null) + { + //draw a small X button to delete the asset + propertyRect.x -= EditorGUIUtility.singleLineHeight + 2f; + var buttonRect = new Rect(propertyRect); + buttonRect.width = EditorGUIUtility.singleLineHeight; + var content = new GUIContent(GUIContent.none); + content.image = SoapInspectorUtils.Icons.Cancel; + if (GUI.Button(buttonRect, content)) + { + SoapEditorUtils.DeleteSubAsset(property.objectReferenceValue); + return position; + } + + propertyRect.x += buttonRect.width + 2f; + } + + var originalGuiEnabled = GUI.enabled; + GUI.enabled = originalGuiEnabled && !CanBeSubAsset; + EditorGUI.PropertyField(propertyRect, property, GUIContent.none); + GUI.enabled = originalGuiEnabled; + var rectPosition = new Rect(propertyRect); + rectPosition.xMin = propertyRect.xMax + 5f; + rectPosition.width = position.width * (1 - widthRatio) - 5f; + return rectPosition; + } + + private int GetTagIndexFromAttribute(SoapSettings soapSettings) + { + var tagAttribute = (AutoTag)System.Attribute.GetCustomAttribute(fieldInfo, + typeof(AutoTag)); + + if (tagAttribute == null) + return 0; + + if (string.IsNullOrEmpty(tagAttribute.Tag)) + { + return soapSettings.GetTagIndex(tagAttribute.TagIndex); + } + + return soapSettings.GetTagIndex(tagAttribute.Tag); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBasePropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBasePropertyDrawer.cs.meta new file mode 100644 index 000000000..428ad43db --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableBase/ScriptableBasePropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c270f62f724e5c045bf94a36c69fa2a6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableCollections.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections.meta new file mode 100644 index 000000000..0a51aeeeb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d617ac908809b64e9c25d666916676d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableCollectionPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableCollectionPropertyDrawer.cs new file mode 100644 index 000000000..ecf1b8270 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableCollectionPropertyDrawer.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableCollection), true)] + public class ScriptableCollectionPropertyDrawer : ScriptableBasePropertyDrawer + { + private SerializedObject _serializedObject; + private ScriptableCollection _scriptableCollection; + + protected override void DrawUnExpanded(Rect position, SerializedProperty property, GUIContent label, + Object targetObject) + { + if (_serializedObject == null || _serializedObject.targetObject != targetObject) + _serializedObject = new SerializedObject(targetObject); + + _serializedObject.UpdateIfRequiredOrScript(); + base.DrawUnExpanded(position, property, label, targetObject); + if (_serializedObject.targetObject != null) //can be destroyed when using sub assets + _serializedObject.ApplyModifiedProperties(); + } + + protected override void DrawShortcut(Rect rect, SerializedProperty property, Object targetObject) + { + if (_scriptableCollection == null) + _scriptableCollection = _serializedObject.targetObject as ScriptableCollection; + + //can be destroyed when using sub assets + if (targetObject == null) + return; + + DrawShortcut(rect); + } + + public void DrawShortcut(Rect rect) + { + var count = _scriptableCollection.Count; + EditorGUI.LabelField(rect, "Count: " + count); + } + + public ScriptableCollectionPropertyDrawer(SerializedObject serializedObject, ScriptableCollection scriptableCollection) + { + _serializedObject = serializedObject; + _scriptableCollection = scriptableCollection; + } + + public ScriptableCollectionPropertyDrawer() { } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableCollectionPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableCollectionPropertyDrawer.cs.meta new file mode 100644 index 000000000..70e5e2e23 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableCollectionPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 877555ce53ac43c4bb39887e3a788ce0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableDictionaryDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableDictionaryDrawer.cs new file mode 100644 index 000000000..04519cdbc --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableDictionaryDrawer.cs @@ -0,0 +1,106 @@ +using UnityEditor; +using UnityEngine; +using System.Collections; +using System.Reflection; +using Object = UnityEngine.Object; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(ScriptableDictionaryBase), true)] + public class ScriptableDictionaryDrawer : UnityEditor.Editor + { + private ScriptableDictionaryBase _scriptableDictionaryBase; + private static bool _repaintFlag; + + public override void OnInspectorGUI() + { + if (_scriptableDictionaryBase == null) + _scriptableDictionaryBase = target as ScriptableDictionaryBase; + + DrawDefaultInspector(); + + var canBeSerialized = _scriptableDictionaryBase.CanBeSerialized(); + if (!canBeSerialized) + { + SoapInspectorUtils.DrawSerializationError(_scriptableDictionaryBase.GetGenericType); + return; + } + + if (!EditorApplication.isPlaying) + return; + + SoapInspectorUtils.DrawLine(); + DisplayAll(); + } + + private void DisplayAll() + { + var dictionaryType = _scriptableDictionaryBase.GetType(); + var dictionaryField = + dictionaryType.GetField("_dictionary", BindingFlags.NonPublic | BindingFlags.Instance); + if (dictionaryField == null) + return; + + var dictionary = dictionaryField.GetValue(_scriptableDictionaryBase) as IDictionary; + if (dictionary == null) + return; + + EditorGUILayout.LabelField($"Dictionary Count: {_scriptableDictionaryBase.Count}"); + + foreach (DictionaryEntry entry in dictionary) + { + EditorGUILayout.BeginHorizontal(); + DrawField("Key", entry.Key); + DrawField("Value", entry.Value); + EditorGUILayout.EndHorizontal(); + } + } + + private void DrawField(string label, object value) + { + EditorGUILayout.LabelField(label, GUILayout.Width(50)); + if (value is Object unityObject) + { + EditorGUILayout.ObjectField(unityObject, typeof(Object), true); + } + else if (value != null) + { + EditorGUILayout.TextField(value.ToString()); + } + } + + #region Repaint + + private void OnEnable() + { + if (_repaintFlag) + return; + + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + _repaintFlag = true; + } + + private void OnDisable() + { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + } + + private void OnPlayModeStateChanged(PlayModeStateChange obj) + { + if (obj == PlayModeStateChange.EnteredPlayMode) + { + _scriptableDictionaryBase.RepaintRequest += OnRepaintRequested; + } + else if (obj == PlayModeStateChange.EnteredEditMode) + { + _scriptableDictionaryBase.RepaintRequest -= OnRepaintRequested; + } + } + + private void OnRepaintRequested() => Repaint(); + + #endregion + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableDictionaryDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableDictionaryDrawer.cs.meta new file mode 100644 index 000000000..7bb988347 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableCollections/ScriptableDictionaryDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2330b780fe5302d4dbb5e4115aae21c6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEnums.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums.meta new file mode 100644 index 000000000..e81f774d6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bede49c890244594db06cae8566028ea +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableEnumPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableEnumPropertyDrawer.cs new file mode 100644 index 000000000..b00aed2bb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableEnumPropertyDrawer.cs @@ -0,0 +1,11 @@ +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableEnumBase), true)] + public class ScriptableEnumPropertyDrawer : ScriptableBasePropertyDrawer + { + //inherit from and customize this drawer to fit your enums needs + protected override float WidthRatio => 1; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableEnumPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableEnumPropertyDrawer.cs.meta new file mode 100644 index 000000000..76aafbe37 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableEnumPropertyDrawer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a59cf2688bab441e8e21250218da2e6f +timeCreated: 1715257990 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableSingletonPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableSingletonPropertyDrawer.cs new file mode 100644 index 000000000..a12795c91 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableSingletonPropertyDrawer.cs @@ -0,0 +1,11 @@ +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableSingleton<>), true)] + public class ScriptableSingletonPropertyDrawer : ScriptableBasePropertyDrawer + { + //inherit from and customize this drawer to fit your enums needs + protected override float WidthRatio => 1; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableSingletonPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableSingletonPropertyDrawer.cs.meta new file mode 100644 index 000000000..3df734f11 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEnums/ScriptableSingletonPropertyDrawer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cf83efaf1b008064b88aa78a7d6e7150 +timeCreated: 1715257990 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents.meta new file mode 100644 index 000000000..18a3929b7 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ca7e306cfc7f5347acf7db0b2afe4fc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventGenericDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventGenericDrawer.cs new file mode 100644 index 000000000..dad46c93b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventGenericDrawer.cs @@ -0,0 +1,76 @@ +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(ScriptableEventBase), true)] + public class ScriptableEventGenericDrawer : UnityEditor.Editor + { + private MethodInfo _methodInfo; + private ScriptableEventBase _scriptableEventBase; + private static SoapSettings _settings; + + private void OnEnable() + { + if (_settings == null) + _settings = SoapEditorUtils.GetOrCreateSoapSettings(); + _methodInfo = target.GetType().BaseType.GetMethod("Raise", + BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public); + } + + public override void OnInspectorGUI() + { + DrawDefaultInspector(); + + if (_scriptableEventBase == null) + _scriptableEventBase = target as ScriptableEventBase; + var genericType = _scriptableEventBase.GetGenericType; + + var canBeSerialized = SoapUtils.IsUnityType(genericType) || SoapUtils.IsSerializable(genericType); + if (!canBeSerialized) + { + SoapInspectorUtils.DrawSerializationError(genericType); + return; + } + + GUI.enabled = EditorApplication.isPlaying || _settings.CanEventsBeRaisedInEditor; + if (GUILayout.Button("Raise")) + { + var property = serializedObject.FindProperty("_debugValue"); + _methodInfo.Invoke(target, new[] { GetDebugValue(property) }); + } + GUI.enabled = true; + + if (!EditorApplication.isPlaying) + { + return; + } + + SoapInspectorUtils.DrawLine(); + + var goContainer = (IDrawObjectsInInspector)target; + var gameObjects = goContainer.EditorListeners; + if (gameObjects.Count > 0) + DisplayAll(gameObjects); + } + + private void DisplayAll(IReadOnlyList objects) + { + var title = $"Listeners : {objects.Count}"; + EditorGUILayout.LabelField(title); + foreach (var obj in objects) + EditorGUILayout.ObjectField(obj, typeof(Object), true); + } + + private object GetDebugValue(SerializedProperty property) + { + var targetType = property.serializedObject.targetObject.GetType(); + var targetField = targetType.GetField("_debugValue", BindingFlags.Instance | BindingFlags.NonPublic); + return targetField.GetValue(property.serializedObject.targetObject); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventGenericDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventGenericDrawer.cs.meta new file mode 100644 index 000000000..eda6cf046 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventGenericDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd5d3a5c27651b5408868ca6f326e24a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamDrawer.cs new file mode 100644 index 000000000..55d3ce6c2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamDrawer.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(ScriptableEventNoParam))] + public class ScriptableEventNoParamDrawer : UnityEditor.Editor + { + private static SoapSettings _settings; + + private void OnEnable() + { + if (_settings == null) + _settings = SoapEditorUtils.GetOrCreateSoapSettings(); + } + + public override void OnInspectorGUI() + { + DrawDefaultInspector(); + + GUI.enabled = EditorApplication.isPlaying || _settings.CanEventsBeRaisedInEditor; + if (GUILayout.Button("Raise")) + { + var eventNoParam = (ScriptableEventNoParam)target; + eventNoParam.Raise(); + } + GUI.enabled = true; + + if (!EditorApplication.isPlaying) + { + return; + } + + SoapInspectorUtils.DrawLine(); + + var goContainer = (IDrawObjectsInInspector)target; + var gameObjects = goContainer.EditorListeners; + if (gameObjects.Count > 0) + DisplayAll(gameObjects); + } + + private void DisplayAll(IReadOnlyList objects) + { + var title = $"Listeners : {objects.Count}"; + EditorGUILayout.LabelField(title); + foreach (var obj in objects) + EditorGUILayout.ObjectField(obj, typeof(Object), true); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamDrawer.cs.meta new file mode 100644 index 000000000..24735c819 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8c7e7381462aa554482095fbe9cff842 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamPropertyDrawer.cs new file mode 100644 index 000000000..06fb333a8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamPropertyDrawer.cs @@ -0,0 +1,57 @@ +using UnityEngine; +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableEventNoParam), true)] + public class ScriptableEventNoParamPropertyDrawer : ScriptableBasePropertyDrawer + { + private static SoapSettings _settings; + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + EditorGUI.BeginProperty(position, label, property); + if (_canBeSubAsset == null) + _canBeSubAsset = SoapEditorUtils.CanBeSubAsset(property, fieldInfo); + var targetObject = property.objectReferenceValue; + if (targetObject == null) + { + DrawIfNull(position, property, label); + return; + } + + //TODO: make this more robust. Disable foldout fo all arrays of serializable class that contain ScriptableBase + var isEventListener = property.serializedObject.targetObject is EventListenerBase; + if (isEventListener) + { + DrawUnExpanded(position, property, label, targetObject); + EditorGUI.EndProperty(); + return; + } + + DrawIfNotNull(position, property, label, property.objectReferenceValue); + + EditorGUI.EndProperty(); + } + + protected override void DrawShortcut(Rect rect, SerializedProperty property, Object targetObject) + { + var eventNoParam = (ScriptableEventNoParam)property.objectReferenceValue; + DrawShortcut(rect, eventNoParam); + } + + public void DrawShortcut(Rect rect, ScriptableEventNoParam scriptableEventNoParam) + { + if (_settings == null) + _settings = SoapEditorUtils.GetOrCreateSoapSettings(); + + GUI.enabled = EditorApplication.isPlaying || _settings.CanEventsBeRaisedInEditor; + if (GUI.Button(rect, "Raise")) + { + scriptableEventNoParam.Raise(); + } + + GUI.enabled = true; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamPropertyDrawer.cs.meta new file mode 100644 index 000000000..21c1e31d0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventNoParamPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8ebe009b795f97429ff23e25767957f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventPropertyDrawer.cs new file mode 100644 index 000000000..7b98d6717 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventPropertyDrawer.cs @@ -0,0 +1,125 @@ +using System.Reflection; +using UnityEngine; +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableEventBase), true)] + public class ScriptableEventPropertyDrawer : ScriptableBasePropertyDrawer + { + private SerializedObject _serializedObject; + private ScriptableEventBase _scriptableEventBase; + private static SoapSettings _settings; + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + EditorGUI.BeginProperty(position, label, property); + if (_canBeSubAsset == null) + _canBeSubAsset = SoapEditorUtils.CanBeSubAsset(property,fieldInfo); + + var targetObject = property.objectReferenceValue; + if (targetObject == null) + { + DrawIfNull(position, property, label); + return; + } + + //TODO: make this more robust. Disable foldout fo all arrays of serializable class that contain ScriptableBase + var isEventListener = property.serializedObject.targetObject is EventListenerBase; + if (isEventListener) + { + DrawUnExpanded(position, property, label, targetObject); + EditorGUI.EndProperty(); + return; + } + + DrawIfNotNull(position, property, label, property.objectReferenceValue); + + EditorGUI.EndProperty(); + } + + protected override void DrawShortcut(Rect rect, SerializedProperty property, Object targetObject) + { + if (_serializedObject == null || _serializedObject.targetObject != targetObject) + _serializedObject = new SerializedObject(targetObject); + + //can be destroyed when using sub assets + if (targetObject == null) + return; + + _serializedObject.UpdateIfRequiredOrScript(); + + if (_scriptableEventBase == null) + _scriptableEventBase = _serializedObject.targetObject as ScriptableEventBase; + + var genericType = _scriptableEventBase.GetGenericType; + var canBeSerialized = SoapUtils.IsUnityType(genericType) || SoapUtils.IsSerializable(genericType); + if (!canBeSerialized) + { + SoapInspectorUtils.DrawSerializationError(genericType,rect); + return; + } + + if (_settings == null) + _settings = SoapEditorUtils.GetOrCreateSoapSettings(); + + GUI.enabled = EditorApplication.isPlaying || _settings.CanEventsBeRaisedInEditor; + if (GUI.Button(rect, "Raise")) + { + var method = property.objectReferenceValue.GetType().BaseType.GetMethod("Raise", + BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public); + var asset = new SerializedObject(property.objectReferenceValue); + var valueProp = asset.FindProperty("_debugValue"); + method.Invoke(targetObject, new[] { GetDebugValue(valueProp) }); + } + + GUI.enabled = true; + } + + //Drawn from the Soap window + public void DrawShortcut(Rect rect) + { + var genericType = _scriptableEventBase.GetGenericType; + var canBeSerialized = SoapUtils.IsUnityType(genericType) || SoapUtils.IsSerializable(genericType); + if (!canBeSerialized) + { + SoapInspectorUtils.DrawSerializationError(genericType,rect); + return; + } + + if (_settings == null) + _settings = SoapEditorUtils.GetOrCreateSoapSettings(); + + GUI.enabled = EditorApplication.isPlaying || _settings.CanEventsBeRaisedInEditor; + SerializedProperty valueProp = _serializedObject.FindProperty("_debugValue"); + rect.width *= 0.5f; + if (GUI.Button(rect, "Raise")) + { + var method = _scriptableEventBase.GetType().BaseType.GetMethod("Raise", + BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public); + valueProp = _serializedObject.FindProperty("_debugValue"); + method.Invoke(_serializedObject.targetObject, new[] { GetDebugValue(valueProp) }); + } + var valueRect = new Rect(rect); + valueRect.x += rect.width + 5f; + EditorGUI.PropertyField(valueRect, valueProp, GUIContent.none); + + GUI.enabled = true; + } + + public ScriptableEventPropertyDrawer(SerializedObject serializedObject, ScriptableEventBase scriptableEventBase) + { + _serializedObject = serializedObject; + _scriptableEventBase = scriptableEventBase; + } + + public ScriptableEventPropertyDrawer() { } + + private object GetDebugValue(SerializedProperty property) + { + var targetType = property.serializedObject.targetObject.GetType(); + var targetField = targetType.GetField("_debugValue", BindingFlags.Instance | BindingFlags.NonPublic); + return targetField.GetValue(property.serializedObject.targetObject); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventPropertyDrawer.cs.meta new file mode 100644 index 000000000..ed6f5ae38 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableEvents/ScriptableEventPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b11e92aadcacf5443866a1f9c5cb4189 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableLists.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableLists.meta new file mode 100644 index 000000000..034c19d8a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableLists.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e1a7b4610eccfa48ae377a75a53d391 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListDrawer.cs new file mode 100644 index 000000000..3023c522f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListDrawer.cs @@ -0,0 +1,91 @@ +using UnityEditor; +using UnityEngine; + +#if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(ScriptableListBase), true)] + public class ScriptableListDrawer : UnityEditor.Editor + { + private ScriptableBase _scriptableBase = null; + private ScriptableListBase _scriptableListBase; + private static bool _repaintFlag; + + public override void OnInspectorGUI() + { + if (_scriptableListBase == null) + _scriptableListBase = target as ScriptableListBase; + + var isMonoBehaviourOrGameObject = _scriptableListBase.GetGenericType.IsSubclassOf(typeof(MonoBehaviour)) + || _scriptableListBase.GetGenericType == typeof(GameObject); + if (isMonoBehaviourOrGameObject) + { + SoapInspectorUtils.DrawPropertiesExcluding(serializedObject, new[] { "_list" }); + } + else + { + //we still want to display the native list for non MonoBehaviors (like SO for examples) + DrawDefaultInspector(); + + //Check for Serializable + var genericType = _scriptableListBase.GetGenericType; + var canBeSerialized = _scriptableListBase.CanBeSerialized(); + if (!canBeSerialized) + { + SoapInspectorUtils.DrawSerializationError(genericType); + return; + } + } + + if (!EditorApplication.isPlaying) + return; + + SoapInspectorUtils.DrawLine(); + DisplayAllObjects(); + } + + private void DisplayAllObjects() + { + var container = (IDrawObjectsInInspector)target; + var gameObjects = container.EditorListeners; + var title = $"List Count : {_scriptableListBase.Count}"; + EditorGUILayout.LabelField(title); + foreach (var obj in gameObjects) + EditorGUILayout.ObjectField(obj, typeof(Object), true); + } + + #region Repaint + + private void OnEnable() + { + if (_repaintFlag) + return; + + _scriptableBase = target as ScriptableBase; + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + _repaintFlag = true; + } + + private void OnDisable() + { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + } + + private void OnPlayModeStateChanged(PlayModeStateChange obj) + { + if (obj == PlayModeStateChange.EnteredPlayMode) + { + if (_scriptableBase == null) + _scriptableBase = target as ScriptableBase; + _scriptableBase.RepaintRequest += OnRepaintRequested; + } + else if (obj == PlayModeStateChange.EnteredEditMode) + _scriptableBase.RepaintRequest -= OnRepaintRequested; + } + + private void OnRepaintRequested() => Repaint(); + } + + #endregion +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListDrawer.cs.meta new file mode 100644 index 000000000..229c80968 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 43142631af5f2f74d89638cb4807e3e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListPropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListPropertyDrawer.cs new file mode 100644 index 000000000..ea9a45c3e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListPropertyDrawer.cs @@ -0,0 +1,58 @@ +// using UnityEngine; +// using UnityEditor; +// +// namespace Obvious.Soap.Editor +// { +// [CustomPropertyDrawer(typeof(ScriptableListBase), true)] +// public class ScriptableListPropertyDrawer : ScriptableBasePropertyDrawer +// { +// private SerializedObject _serializedObject; +// private ScriptableListBase _scriptableListBase; +// +// protected override void DrawUnExpanded(Rect position, SerializedProperty property, GUIContent label, +// Object targetObject) +// { +// if (_serializedObject == null || _serializedObject.targetObject != targetObject) +// _serializedObject = new SerializedObject(targetObject); +// +// _serializedObject.UpdateIfRequiredOrScript(); +// base.DrawUnExpanded(position, property, label, targetObject); +// if (_serializedObject.targetObject != null) //can be destroyed when using sub assets +// _serializedObject.ApplyModifiedProperties(); +// } +// +// protected override void DrawShortcut(Rect rect, SerializedProperty property, Object targetObject) +// { +// if (_scriptableListBase == null) +// _scriptableListBase = _serializedObject.targetObject as ScriptableListBase; +// +// //can be destroyed when using sub assets +// if (targetObject == null) +// return; +// +// DrawShortcut(rect); +// } +// +// public void DrawShortcut(Rect rect) +// { +// var genericType = _scriptableListBase.GetGenericType; +// var canBeSerialized = _scriptableListBase.CanBeSerialized(); +// if (!canBeSerialized) +// { +// SoapEditorUtils.DrawSerializationError(genericType, rect); +// return; +// } +// var value = _serializedObject.FindProperty("_list"); +// var count = value.arraySize; +// EditorGUI.LabelField(rect, "Count: " + count); +// } +// +// public ScriptableListPropertyDrawer(SerializedObject serializedObject, ScriptableListBase scriptableListBase) +// { +// _serializedObject = serializedObject; +// _scriptableListBase = scriptableListBase; +// } +// +// public ScriptableListPropertyDrawer() { } +// } +// } \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListPropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListPropertyDrawer.cs.meta new file mode 100644 index 000000000..8f1ebc35b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableLists/ScriptableListPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 17e3c071fc0f7a844bbf8a27ed12d8bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableSave.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableSave.meta new file mode 100644 index 000000000..434b17e0b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableSave.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ef58971a65acd274ba4c0c2c74fc20d1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableSave/ScriptableSavePropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableSave/ScriptableSavePropertyDrawer.cs new file mode 100644 index 000000000..96e086084 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableSave/ScriptableSavePropertyDrawer.cs @@ -0,0 +1,11 @@ +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(ScriptableSaveBase), true)] + public class ScriptableSavePropertyDrawer : ScriptableBasePropertyDrawer + { + //inherit from and customize this drawer to fit your enums needs + protected override float WidthRatio => 1; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableSave/ScriptableSavePropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableSave/ScriptableSavePropertyDrawer.cs.meta new file mode 100644 index 000000000..1bff6232c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableSave/ScriptableSavePropertyDrawer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 17584ecd914c414997220e1e4b4da119 +timeCreated: 1725757888 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables.meta new file mode 100644 index 000000000..77a22d87a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4b91cdd21b919fa449e0cc6a5791eac5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableDrawer.cs new file mode 100644 index 000000000..1905471fc --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableDrawer.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +# if !ODIN_INSPECTOR +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(ScriptableVariableBase), true)] + public class ScriptableVariableDrawer : UnityEditor.Editor + { + private ScriptableBase _scriptableBase = null; + private ScriptableVariableBase _scriptableVariable = null; + private static bool _repaintFlag; + private SerializedProperty _valueProperty; + private SoapSettings _soapSettings; + + public override void OnInspectorGUI() + { + serializedObject.UpdateIfRequiredOrScript(); + + //Check for Serializable + if (_scriptableVariable == null) + _scriptableVariable = target as ScriptableVariableBase; + var genericType = _scriptableVariable.GetGenericType; + + var canBeSerialized = SoapUtils.IsUnityType(genericType) || SoapUtils.IsSerializable(genericType); + if (!canBeSerialized) + SoapInspectorUtils.DrawSerializationError(genericType); + + if (_soapSettings.VariableDisplayMode == EVariableDisplayMode.Minimal) + { + DrawMinimal(); + } + else + { + var isSceneObject = typeof(Component).IsAssignableFrom(genericType) || + typeof(GameObject).IsAssignableFrom(genericType); + if (_valueProperty == null) + _valueProperty = serializedObject.FindProperty("_value"); + + if (isSceneObject) + DrawDefault(genericType); + else + DrawDefault(); + } + + if (serializedObject.ApplyModifiedProperties()) + EditorUtility.SetDirty(target); + + DrawPlayModeObjects(); + } + + private void DrawMinimal() + { + var fieldName = Application.isPlaying ? "_runtimeValue" : "_value"; + serializedObject.DrawOnlyField(fieldName, false); + } + + private void DrawDefault(Type genericType = null) + { + serializedObject.DrawOnlyField("m_Script", true); + var propertiesToHide = new HashSet() { "m_Script", "_guid", "_saveGuid" }; + serializedObject.DrawCustomInspector(propertiesToHide, genericType); + + if (GUILayout.Button("Reset Value")) + { + var so = (IReset)target; + so.ResetValue(); + } + } + + private void DisplayAll(IReadOnlyList objects) + { + var title = $"Objects reacting to OnValueChanged Event : {objects.Count}"; + EditorGUILayout.LabelField(title); + foreach (var obj in objects) + EditorGUILayout.ObjectField(obj, typeof(UnityEngine.Object), true); + } + + private void DrawPlayModeObjects() + { + if (!EditorApplication.isPlaying) + return; + + var container = (IDrawObjectsInInspector)target; + var objects = container.EditorListeners; + + SoapInspectorUtils.DrawLine(); + + if (objects.Count > 0) + DisplayAll(objects); + } + + #region Repaint + + private void OnEnable() + { + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + if (_repaintFlag) + return; + + _scriptableBase = target as ScriptableBase; + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + _repaintFlag = true; + } + + private void OnDisable() + { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + } + + private void OnPlayModeStateChanged(PlayModeStateChange obj) + { + //TODO: investigate this + if (target == null) + return; + + if (obj == PlayModeStateChange.EnteredPlayMode) + { + if (_scriptableBase == null) + _scriptableBase = target as ScriptableBase; + _scriptableBase.RepaintRequest += OnRepaintRequested; + } + else if (obj == PlayModeStateChange.ExitingPlayMode) + _scriptableBase.RepaintRequest -= OnRepaintRequested; + } + + private void OnRepaintRequested() => Repaint(); + + #endregion + } +} +#endif diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableDrawer.cs.meta new file mode 100644 index 000000000..e50ce17e2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 64ee50ce212aeb74695b83eaba05bbc1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableGuidGenerator.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableGuidGenerator.cs new file mode 100644 index 000000000..d2d88452a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableGuidGenerator.cs @@ -0,0 +1,86 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + class ScriptableVariableGuidGenerator : AssetPostprocessor + { + //this gets cleared every time the domain reloads + private static readonly HashSet _guidsCache = new HashSet(); + + private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, + string[] movedAssets, + string[] movedFromAssetPaths) + { + var isInitialized = SessionState.GetBool("initialized", false); + if (!isInitialized) + { + RegenerateAllGuids(); + SessionState.SetBool("initialized", true); + } + else + { + OnAssetCreatedOrSaved(importedAssets); + OnAssetDeleted(deletedAssets); + OnAssetMoved(movedFromAssetPaths, movedAssets); + } + } + + private static void RegenerateAllGuids() + { + var scriptableVariableBases = SoapEditorUtils.FindAll(); + foreach (var scriptableVariable in scriptableVariableBases) + { + if (scriptableVariable.SaveGuid != SaveGuidType.Auto) + continue; + scriptableVariable.Guid = SoapEditorUtils.GenerateGuid(scriptableVariable); + _guidsCache.Add(scriptableVariable.Guid); + } + } + + private static void OnAssetCreatedOrSaved(string[] importedAssets) + { + foreach (var assetPath in importedAssets) + { + if (_guidsCache.Contains(assetPath)) + continue; + + // Skip anything that is not an asset + if (!assetPath.EndsWith(".asset")) + continue; + + var assets = AssetDatabase.LoadAllAssetsAtPath(assetPath); + foreach (var asset in assets) + { + var scriptableVariable = asset as ScriptableVariableBase; + if (scriptableVariable == null || scriptableVariable.SaveGuid != SaveGuidType.Auto) + continue; + + var guid = SoapEditorUtils.GenerateGuid(scriptableVariable); + //Debug.Log($"Generated: {asset.name} - {guid}"); + + scriptableVariable.Guid = guid; + _guidsCache.Add(guid); + } + } + } + + private static void OnAssetDeleted(string[] deletedAssets) + { + foreach (var assetPath in deletedAssets) + { + if (!_guidsCache.Contains(assetPath)) + continue; + + _guidsCache.Remove(assetPath); + } + } + + private static void OnAssetMoved(string[] movedFromAssetPaths, string[] movedAssets) + { + OnAssetDeleted(movedFromAssetPaths); + OnAssetCreatedOrSaved(movedAssets); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableGuidGenerator.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableGuidGenerator.cs.meta new file mode 100644 index 000000000..09bb5abf5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariableGuidGenerator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8d87b1d09f9b4a1da6acb03881e916ee +timeCreated: 1665533608 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariablePropertyDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariablePropertyDrawer.cs new file mode 100644 index 000000000..91a3b7899 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariablePropertyDrawer.cs @@ -0,0 +1,116 @@ +namespace Obvious.Soap.Editor +{ + using UnityEngine; + using UnityEditor; + + [CustomPropertyDrawer(typeof(ScriptableVariableBase), true)] + public class ScriptableVariablePropertyDrawer : ScriptableBasePropertyDrawer + { + private SerializedObject _serializedObject; + private ScriptableVariableBase _scriptableVariable; + private float? _propertyWidthRatio; + private Object _previousTargetObjectValue; + + + protected override string GetFieldName() + { + //fieldInfo.Name does not work for VariableReferences so we have to make an edge case for that. + var isAbstract = fieldInfo.DeclaringType?.IsAbstract == true; + var fieldName = isAbstract ? fieldInfo.FieldType.Name : fieldInfo.Name; + return fieldName; + } + + protected override void DrawUnExpanded(Rect position, SerializedProperty property, GUIContent label, + Object targetObject) + { + if (_serializedObject == null || _serializedObject.targetObject != targetObject) + _serializedObject = new SerializedObject(targetObject); + + _serializedObject.UpdateIfRequiredOrScript(); + base.DrawUnExpanded(position, property, label, targetObject); + if (_serializedObject.targetObject != null) //can be destroyed when using sub assets + _serializedObject.ApplyModifiedProperties(); + } + + protected override void DrawShortcut(Rect rect, SerializedProperty property, Object targetObject) + { + if (_scriptableVariable == null) + _scriptableVariable = _serializedObject.targetObject as ScriptableVariableBase; + + //can be destroyed when using sub assets + if (targetObject == null) + return; + + DrawShortcut(rect); + } + + public void DrawShortcut(Rect rect) + { + var genericType = _scriptableVariable.GetGenericType; + var canBeSerialized = SoapUtils.IsUnityType(genericType) || SoapUtils.IsSerializable(genericType); + if (!canBeSerialized) + { + SoapInspectorUtils.DrawSerializationError(genericType, rect); + return; + } + + var propertyName = Application.isPlaying ? "_runtimeValue" : "_value"; + var value = _serializedObject.FindProperty(propertyName); + + var isSceneObject = typeof(Component).IsAssignableFrom(genericType) || + typeof(GameObject).IsAssignableFrom(genericType); + + if (isSceneObject) + { + var objectValue = EditorGUI.ObjectField(rect, value.objectReferenceValue, genericType, true); + if (objectValue != value.objectReferenceValue) + { + _serializedObject.targetObject.GetType().GetProperty("Value")? + .SetValue(_serializedObject.targetObject, objectValue); + _previousTargetObjectValue = objectValue; + } + } + else + { + if (value != null) + EditorGUI.PropertyField(rect, value, GUIContent.none); + } + } + + public ScriptableVariablePropertyDrawer(SerializedObject serializedObject, + ScriptableVariableBase scriptableVariableBase) + { + _serializedObject = serializedObject; + _scriptableVariable = scriptableVariableBase; + _propertyWidthRatio = null; + } + + public ScriptableVariablePropertyDrawer() + { + } + + protected override float WidthRatio + { + get + { + if (_scriptableVariable == null) + { + _propertyWidthRatio = null; + return 0.82f; + } + + if (_propertyWidthRatio.HasValue) + return _propertyWidthRatio.Value; + + var genericType = _scriptableVariable.GetGenericType; + if (genericType == typeof(Vector2)) + _propertyWidthRatio = 0.72f; + else if (genericType == typeof(Vector3)) + _propertyWidthRatio = 0.62f; + else + _propertyWidthRatio = 0.82f; + return _propertyWidthRatio.Value; + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariablePropertyDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariablePropertyDrawer.cs.meta new file mode 100644 index 000000000..eee8fc392 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/ScriptableVariablePropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c25325fc833dee94f8f9ab8f4150ac3c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences.meta new file mode 100644 index 000000000..14a89e402 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73d4579675846554a83ba4a147203fab +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences/VariableReferenceDrawer.cs b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences/VariableReferenceDrawer.cs new file mode 100644 index 000000000..331fca2f2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences/VariableReferenceDrawer.cs @@ -0,0 +1,54 @@ +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + [CustomPropertyDrawer(typeof(VariableReferenceBase),true)] + public class VariableReferenceDrawer : PropertyDrawer + { + private readonly string[] _popupOptions = + { "Use Local", "Use Variable" }; + + private GUIStyle _popupStyle; + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + if (_popupStyle == null) + { + _popupStyle = new GUIStyle(GUI.skin.GetStyle("PaneOptions")); + _popupStyle.imagePosition = ImagePosition.ImageOnly; + } + + label = EditorGUI.BeginProperty(position, label, property); + position = EditorGUI.PrefixLabel(position, label); + + EditorGUI.BeginChangeCheck(); + + var useLocal = property.FindPropertyRelative("UseLocal"); + var localValue = property.FindPropertyRelative("LocalValue"); + var variable = property.FindPropertyRelative("Variable"); + + Rect buttonRect = new Rect(position); + buttonRect.yMin += _popupStyle.margin.top; + buttonRect.width = _popupStyle.fixedWidth + _popupStyle.margin.right; + position.xMin = buttonRect.xMax + 15; + + var indent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + var result = EditorGUI.Popup(buttonRect, useLocal.boolValue ? 0 : 1, _popupOptions, _popupStyle); + + useLocal.boolValue = result == 0; + + EditorGUI.PropertyField(position, + useLocal.boolValue ? localValue : variable, + GUIContent.none); + + if (EditorGUI.EndChangeCheck()) + property.serializedObject.ApplyModifiedProperties(); + + EditorGUI.indentLevel = indent; + EditorGUI.EndProperty(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences/VariableReferenceDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences/VariableReferenceDrawer.cs.meta new file mode 100644 index 000000000..7a16d2fcb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/ScriptableVariables/VariableReferences/VariableReferenceDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 556758f9488ff3d4f89046aa2407449a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Settings.meta b/Assets/Obvious/Soap/Core/Editor/Settings.meta new file mode 100644 index 000000000..ea0500460 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b359fc7f908ee3f4ab14c08767211f88 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettings.cs b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettings.cs new file mode 100644 index 000000000..0417390f6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettings.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Serialization; + +namespace Obvious.Soap.Editor +{ + [System.Serializable] + public class SoapSettings : ScriptableObject + { + public EVariableDisplayMode VariableDisplayMode = EVariableDisplayMode.Default; + public ENamingCreationMode NamingOnCreationMode = ENamingCreationMode.Auto; + public ECreatePathMode CreatePathMode = ECreatePathMode.Auto; + public ERaiseEventInEditorMode RaiseEventsInEditor; + public bool CanEventsBeRaisedInEditor => RaiseEventsInEditor == ERaiseEventInEditorMode.Enabled; + [FormerlySerializedAs("Categories")] public List Tags = new List { "None" }; + + public List Prefixes = new List(6) + { + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty + }; + + public int GetTagIndex(string tagName) + { + if (!Tags.Contains(tagName)) + { + Debug.LogWarning($"Tag {tagName} does not exist. Returning 0."); + return 0; + } + + return Tags.IndexOf(tagName); + } + + public int GetTagIndex(int fromIndex) + { + if (fromIndex < 0 || fromIndex >= Tags.Count) + { + Debug.LogWarning($"Tag index {fromIndex} out of range. Returning 0."); + return 0; + } + + return fromIndex; + } + + public int GetTagIndex(ScriptableBase scriptableBase) + { + var fromIndex = scriptableBase.TagIndex; + if (fromIndex < 0 || fromIndex >= Tags.Count) + { + Debug.Log($"Tag for {scriptableBase.name} not found. Reassigning to None."); + SoapEditorUtils.AssignTag(scriptableBase, 0); + return 0; + } + + return fromIndex; + } + + public string GetTagName(ScriptableBase scriptableBase) + { + var tagIndex = GetTagIndex(scriptableBase); + return Tags[tagIndex]; + } + + public string GetPrefix(Type type) + { + int index; + + if (type.IsSubclassOf(typeof(ScriptableVariableBase))) + index = 0; + else if (type.IsSubclassOf(typeof(ScriptableEventBase))) + index = 1; + else if (type.IsSubclassOf(typeof(ScriptableListBase))) + index = 2; + else if (type.IsSubclassOf(typeof(ScriptableDictionaryBase))) + index = 3; + else if (type.IsSubclassOf(typeof(ScriptableEnumBase))) + index = 4; + else if (type.IsSubclassOf(typeof(ScriptableSaveBase))) + index = 5; + else + { + return ""; + } + + if (index >= Prefixes.Count) + { + Debug.LogWarning($"Index {index} out of range. Returning empty string."); + return ""; + } + + return Prefixes[index]; + } + + public void SetPrefix(int index, string value) + { + if (index < 0 || index >= Prefixes.Count) + { + Debug.LogWarning($"Index {index} out of range. Prefix not set."); + return; + } + Prefixes[index] = value; + } + } + + public enum EVariableDisplayMode + { + Default, + Minimal + } + + public enum ENamingCreationMode + { + Auto, + Manual + } + + + public enum ECreatePathMode + { + Auto, + Manual + } + + public enum ERaiseEventInEditorMode + { + Disabled, + Enabled + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettings.cs.meta b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettings.cs.meta new file mode 100644 index 000000000..a0980f3c9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b7ca52a950d1494aa1184cdc7700c3d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 871c60e018e43ae4aaae108cb4d41c2c, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettingsDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettingsDrawer.cs new file mode 100644 index 000000000..f4ae62a03 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettingsDrawer.cs @@ -0,0 +1,18 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + [CustomEditor(typeof(SoapSettings))] + public class SoapSettingsDrawer : UnityEditor.Editor + { + public override void OnInspectorGUI() + { + EditorGUILayout.LabelField("Modify settings in : Preferences/Soap", EditorStyles.boldLabel); + GUI.enabled = false; + DrawDefaultInspector(); + GUI.enabled = true; + } + } +} diff --git a/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettingsDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettingsDrawer.cs.meta new file mode 100644 index 000000000..3d1574823 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Settings/SoapSettingsDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5bca192e8850d124ba257f8443d35a87 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities.meta b/Assets/Obvious/Soap/Core/Editor/Utilities.meta new file mode 100644 index 000000000..e575c9db9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 03e796cd83e4ffb4aa6f997d07cedfc6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapEditorUtils.cs b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapEditorUtils.cs new file mode 100644 index 000000000..e870467a1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapEditorUtils.cs @@ -0,0 +1,866 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; +using Obvious.Soap.Attributes; +using UnityEngine; +using UnityEditor; +using UnityEngine.SceneManagement; +using Object = UnityEngine.Object; + +namespace Obvious.Soap.Editor +{ + public static class SoapEditorUtils + { + #region EditorPrefs + + private const string CustomCreationPathKey = "Soap_CreateFolderPath_"; + private const string WizardRootFolderPathKey = "Soap_Wizard_RootFolderPath_"; + internal const string WizardFavoritesKey = "Soap_Wizard_Favorites_"; + private const string WizardTagsKey = "Soap_Wizard_Tags_"; + private const string TypeCreatorDestinationFolderIndexKey = "Soap_TypeCreator_DestinationFolderIndex_"; + private const string TypeCreatorDestinationFolderPathKey = "Soap_TypeCreator_DestinationFolderPath_"; + private const string TypeCreatorNamespaceKey = "Soap_TypeCreator_Namespace_"; + private const string WindowLastCategoryKey = "Soap_Window_LastCategory_"; + private const string WindowHasShownWindowKey = "Soap_Window_HasShownWindow_"; + private const string SingletonInstanceInfoKey = "Soap_SingletonCreator_InstanceInfo_"; + + private static int ApplicationHash => Application.dataPath.GetHashCode(); + + internal static string CustomCreationPath + { + get => EditorPrefs.GetString(CustomCreationPathKey + ApplicationHash, "Assets"); + set => EditorPrefs.SetString(CustomCreationPathKey + ApplicationHash, value); + } + + internal static string WizardRootFolderPath + { + get => EditorPrefs.GetString(WizardRootFolderPathKey + ApplicationHash, "Assets"); + set => EditorPrefs.SetString(WizardRootFolderPathKey + ApplicationHash, value); + } + + internal static string WizardFavorites + { + get => EditorPrefs.GetString(WizardFavoritesKey + ApplicationHash, string.Empty); + set => EditorPrefs.SetString(WizardFavoritesKey + ApplicationHash, value); + } + + internal static int WizardTags + { + get => EditorPrefs.GetInt(WizardTagsKey + ApplicationHash, 1); + set => EditorPrefs.SetInt(WizardTagsKey + ApplicationHash, value); + } + + internal static int TypeCreatorDestinationFolderIndex + { + get => EditorPrefs.GetInt(TypeCreatorDestinationFolderIndexKey + ApplicationHash, 0); + set => EditorPrefs.SetInt(TypeCreatorDestinationFolderIndexKey + ApplicationHash, value); + } + + internal static string TypeCreatorDestinationFolderPath + { + get => EditorPrefs.GetString(TypeCreatorDestinationFolderPathKey + ApplicationHash, "Assets"); + set => EditorPrefs.SetString(TypeCreatorDestinationFolderPathKey + ApplicationHash, value); + } + + + internal static string TypeCreatorNamespace + { + get => EditorPrefs.GetString(TypeCreatorNamespaceKey + ApplicationHash, string.Empty); + set => EditorPrefs.SetString(TypeCreatorNamespaceKey + ApplicationHash, value); + } + + internal static string WindowLastCategory + { + get => EditorPrefs.GetString(WindowLastCategoryKey + ApplicationHash, string.Empty); + set => EditorPrefs.SetString(WindowLastCategoryKey + ApplicationHash, value); + } + + internal static bool HasShownWindow + { + get => EditorPrefs.GetBool(WindowHasShownWindowKey + ApplicationHash, false); + set => EditorPrefs.SetBool(WindowHasShownWindowKey + ApplicationHash, value); + } + + internal static string SingletonInstanceInfo + { + get => SessionState.GetString(SingletonInstanceInfoKey + ApplicationHash, string.Empty); + set => SessionState.SetString(SingletonInstanceInfoKey + ApplicationHash, value); + } + + #endregion + + internal static Color SoapColor => + ColorUtility.TryParseHtmlString(SoapColorHtml, out var color) ? color : Color.magenta; + + internal const string SoapColorHtml = "#f75369"; + + internal static Color Lighten(this Color color, float amount) + { + return new Color(color.r + amount, color.g + amount, color.b + amount, color.a); + } + + internal static SoapSettings GetOrCreateSoapSettings() + { + var settings = Resources.Load("SoapSettings"); + if (settings != null) + return settings; + + var paths = SoapFileUtils.GetResourcesDirectories(); + foreach (var path in paths) + { + var relative = SoapFileUtils.GetRelativePath(path); + if (!relative.Contains("Obvious") || !relative.Contains("Editor")) + continue; + var forwardSlashPath = relative.Replace('\\', '/'); + var finalPath = forwardSlashPath + "/SoapSettings.asset"; + AssetDatabase.CreateAsset(ScriptableObject.CreateInstance(typeof(SoapSettings)), finalPath); + settings = Resources.Load("SoapSettings"); + } + + return settings; + } + + /// + /// Deletes an object after showing a confirmation dialog. + /// + /// + /// true if the deletion is confirmed + public static bool DeleteObjectWithConfirmation(Object obj) + { + var confirmDelete = EditorUtility.DisplayDialog("Delete " + obj.name + "?", + "Are you sure you want to delete '" + obj.name + "'?", "Yes", "No"); + if (confirmDelete) + { + if (AssetDatabase.IsSubAsset(obj)) + { + DeleteSubAsset(obj); + } + else + { + string path = AssetDatabase.GetAssetPath(obj); + AssetDatabase.DeleteAsset(path); + } + + return true; + } + + return false; + } + + /// + /// Creates a copy of an object. Also adds a number to the copy name. + /// + /// + public static void CreateCopy(Object obj) + { + var path = AssetDatabase.GetAssetPath(obj); + var copyFilePath = AssetDatabase.GenerateUniqueAssetPath(path); + AssetDatabase.CopyAsset(path, copyFilePath); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + var newAsset = AssetDatabase.LoadMainAssetAtPath(copyFilePath); + EditorGUIUtility.PingObject(newAsset); + } + + /// + /// Core creator: creates a ScriptableObject asset of the given type at path/name. + /// If name is null/empty, uses type.Name. Returns the created instance. + /// + public static ScriptableObject CreateScriptableObject(Type type, string name, string path, bool ping = true) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + if (!typeof(ScriptableObject).IsAssignableFrom(type)) + throw new ArgumentException($"Type {type} is not a ScriptableObject.", nameof(type)); + + var normalizedPath = EnsureAssetFolder(path); + + var baseName = string.IsNullOrWhiteSpace(name) ? type.Name : name.Trim(); + var assetPath = $"{normalizedPath}/{baseName}.asset"; + var uniquePath = AssetDatabase.GenerateUniqueAssetPath(assetPath); + + var instance = ScriptableObject.CreateInstance(type); + instance.name = name == "" ? type.ToString().Replace("Obvious.Soap.", "") : baseName; + AssetDatabase.CreateAsset(instance, uniquePath); + if (ping) + EditorGUIUtility.PingObject(instance); + + return instance; + } + + /// + /// Ensures an "Assets/..." folder path exists, creating subfolders as needed using AssetDatabase. + /// Accepts either "Assets/Sub/Dir" or "Sub/Dir" (the latter will be rooted under Assets). + /// Returns a normalized "Assets/..." path. + /// + private static string EnsureAssetFolder(string path) + { + if (string.IsNullOrWhiteSpace(path)) + throw new ArgumentException("Path must not be null/empty.", nameof(path)); + + // Normalize + path = path.Replace('\\', '/').Trim('/'); + if (!path.StartsWith("Assets", StringComparison.Ordinal)) + path = "Assets/" + path; + + var parts = path.Split('/'); + var current = "Assets"; + + // Walk and create + for (int i = 1; i < parts.Length; i++) + { + var next = $"{current}/{parts[i]}"; + if (!AssetDatabase.IsValidFolder(next)) + { + var folderName = parts[i]; + AssetDatabase.CreateFolder(current, folderName); + } + + current = next; + } + + return current; + } + + /// Renames an asset + /// + public static void RenameAsset(Object obj, string newName) + { + if (AssetDatabase.IsSubAsset(obj)) + { + obj.name = newName; + EditorUtility.SetDirty(obj); + } + else + { + var path = AssetDatabase.GetAssetPath(obj); + AssetDatabase.RenameAsset(path, newName); + } + + AssetDatabase.SaveAssets(); + EditorGUIUtility.PingObject(obj); + } + + internal static bool CreateClassFromTemplate(string template, string nameSpace, string type, string path, + out TextAsset newFile, bool isIntrinsic = false, bool isSoapClass = false) + { + var folderName = "Templates/"; + folderName += + isIntrinsic + ? "1_" + : string.Empty; //select another template for intrinsic types as they cannot work with nameof(T) + folderName += template; + var capitalizedName = type.CapitalizeFirstLetter(); + + var fileName = capitalizedName + ".cs"; + if (isSoapClass) + { + //variables follow a different naming rules + fileName = template.Contains("Variable") + ? $"{capitalizedName}Variable.cs" + : template.Replace("Template", capitalizedName); + } + + newFile = CreateNewClass(folderName, nameSpace, type, fileName, path); + return newFile != null; + } + + internal static bool CreateDictionaryFromTemplate(string template, string nameSpace, string type, + string key, string value, string path, out TextAsset newFile) + { + var folderName = "Templates/"; + folderName += template; + var capitalizedName = type.CapitalizeFirstLetter(); + var fileName = capitalizedName + ".cs"; + newFile = CreateNewDictionaryClass(folderName, nameSpace, type, key, value, fileName, path); + return newFile != null; + } + + private static TextAsset CreateNewClass(string templateName, string nameSpace, string type, string fileName, + string path) + { + if (!IsTypeNameValid(type) || !IsNamespaceValid(nameSpace)) + return null; + + var templateCode = GetTemplateContent(templateName); + templateCode = templateCode.Replace("$TYPE$", type); + templateCode = templateCode.Replace("$TYPENAME$", type.CapitalizeFirstLetter()); + + //wrap namespace if needed + if (!string.IsNullOrEmpty(nameSpace)) + { + templateCode = SplitAndWrapInNamespace(templateCode, nameSpace); + } + + try + { + var newFile = CreateTextFile(templateCode, fileName, path); + return newFile; + } + catch (IOException e) + { + EditorUtility.DisplayDialog("Could not create class", e.Message, "OK"); + return null; + } + } + + private static TextAsset CreateNewDictionaryClass(string templateName, string nameSpace, string type, + string key, string value, string fileName, string path) + { + if (!IsTypeNameValid(type) || !IsNamespaceValid(nameSpace)) + return null; + + var templateCode = GetTemplateContent(templateName); + templateCode = templateCode.Replace("$TYPE$", type); + templateCode = templateCode.Replace("$KEY$", key); + templateCode = templateCode.Replace("$VALUE$", value); + + //wrap namespace if needed + if (!string.IsNullOrEmpty(nameSpace)) + { + templateCode = SplitAndWrapInNamespace(templateCode, nameSpace); + } + + try + { + var newFile = CreateTextFile(templateCode, fileName, path); + return newFile; + } + catch (IOException e) + { + EditorUtility.DisplayDialog("Could not create class", e.Message, "OK"); + return null; + } + } + + private static TextAsset CreateNewSingletonClass(string templateName, string nameSpace, string type + , string fileName, string path, string resourcePath) + { + if (!IsTypeNameValid(type) || !IsNamespaceValid(nameSpace)) + return null; + + var templateCode = GetTemplateContent(templateName); + templateCode = templateCode.Replace("$TYPENAME$", type.CapitalizeFirstLetter()); + templateCode = templateCode.Replace("$RESOURCE$", resourcePath); + + //wrap namespace if needed + if (!string.IsNullOrEmpty(nameSpace)) + { + templateCode = SplitAndWrapInNamespace(templateCode, nameSpace); + } + + try + { + var newFile = CreateTextFile(templateCode, fileName, path); + return newFile; + } + catch (IOException e) + { + EditorUtility.DisplayDialog("Could not create class", e.Message, "OK"); + return null; + } + } + + private static string GetTemplateContent(string templateName) + { + var template = Resources.Load(templateName); + if (template is null) + { + Debug.LogError($"Failed to find {templateName} in a Resources folder"); + return null; + } + + return template.text; + } + + private static string SplitAndWrapInNamespace(string templateCode, string nameSpace) + { + var templateParts = SplitStringAfter(templateCode, "using Obvious.Soap;"); + var partToWrap = string.IsNullOrEmpty(templateParts.Item2) + ? templateParts.Item1 + : templateParts.Item2; + + templateCode = partToWrap.WrapInNamespace(nameSpace); + + //if there was two parts, add the first part back at the top + spaces + if (!string.IsNullOrEmpty(templateParts.Item2)) + { + var partToInsert = templateParts.Item1 + Environment.NewLine + Environment.NewLine; + templateCode = templateCode.Insert(0, partToInsert); + } + + return templateCode; + } + + private static string WrapInNamespace(this string input, string nameSpace) + { + if (string.IsNullOrEmpty(nameSpace)) + return input; + + var stringBuilder = new StringBuilder(); + stringBuilder.AppendLine($"namespace {nameSpace}"); + stringBuilder.AppendLine("{"); + + // Split the input into lines for indentation + var lines = input.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + foreach (var line in lines) + stringBuilder.AppendLine(" " + line); + + stringBuilder.AppendLine("}"); + return stringBuilder.ToString(); + } + + private static (string, string) SplitStringAfter(string input, string splitAfter) + { + var index = input.IndexOf(splitAfter); + if (index != -1) + { + // Include the length of splitAfter to get the rest of the string after it + var splitPoint = index + splitAfter.Length; + var before = input.Substring(0, splitPoint); + var after = input.Substring(splitPoint); + return (before, after); + } + + return (input, string.Empty); + } + + /// Creates a new text asset at a certain location. + /// + /// + /// + /// + private static TextAsset CreateTextFile(string content, string fileName, string path) + { + var normalizedPath = EnsureAssetFolder(path); + var assetPath = $"{normalizedPath}/{fileName}"; + + // if (!Directory.Exists(folderPath)) + // Directory.CreateDirectory(folderPath); + + if (File.Exists(assetPath)) + throw new IOException($"A file with the name {assetPath} already exists."); + + File.WriteAllText(assetPath, content); + AssetDatabase.Refresh(); + var textAsset = AssetDatabase.LoadAssetAtPath(assetPath); + return textAsset; + } + + /// Returns all ScriptableObjects at a certain path. + /// + /// + public static List FindAll(string path = "") where T : ScriptableObject + { + var scriptableObjects = new List(); + var searchFilter = $"t:{typeof(T).Name}"; + var soNames = path == "" + ? AssetDatabase.FindAssets(searchFilter) + : AssetDatabase.FindAssets(searchFilter, new[] { path }); + + //we need this to make sure we load the sub assets only once. + var mainAssetPath = new HashSet(); + + foreach (var soName in soNames) + { + var soPath = AssetDatabase.GUIDToAssetPath(soName); //sub assets all return the same path + var asset = AssetDatabase.LoadAssetAtPath(soPath); + if (mainAssetPath.Contains(soPath)) + continue; + + var subAssets = AssetDatabase.LoadAllAssetRepresentationsAtPath(soPath); + //if there are no subAssets, the asset is the main asset, and is of T + if (subAssets.Length == 0) + { + scriptableObjects.Add(asset); + continue; + } + + foreach (var subAsset in subAssets) + { + //still need to check if the sub asset is of the correct type + var subAssetCasted = subAsset as T; + if (subAssetCasted != null) + scriptableObjects.Add(subAssetCasted); + } + + mainAssetPath.Add(soPath); + } + + return scriptableObjects; + } + + + internal static List FindAll(string path, out Dictionary subAssetLookUp) + where T : ScriptableBase + { + var scriptableObjects = new List(); + var searchFilter = $"t:{typeof(T).Name}"; + var soNames = path == "" + ? AssetDatabase.FindAssets(searchFilter) + : AssetDatabase.FindAssets(searchFilter, new[] { path }); + + //we need this to make sure we load the sub assets only once. + var mainAssetPath = new HashSet(); + //returns the subAsset as key and the parent asset as value + subAssetLookUp = new Dictionary(); + + foreach (var soName in soNames) + { + var soPath = AssetDatabase.GUIDToAssetPath(soName); //sub assets all return the same path + var asset = AssetDatabase.LoadAssetAtPath(soPath); + if (mainAssetPath.Contains(soPath)) + continue; + + var subAssets = AssetDatabase.LoadAllAssetRepresentationsAtPath(soPath); + //if there are no subAssets, the asset is the main asset, and is of T + if (subAssets.Length == 0) + { + scriptableObjects.Add(asset); + continue; + } + + foreach (var subAsset in subAssets) + { + scriptableObjects.Add(subAsset as T); + var parent = AssetDatabase.LoadMainAssetAtPath(soPath); + subAssetLookUp.Add(subAsset as ScriptableBase, parent); + } + + mainAssetPath.Add(soPath); + } + + return scriptableObjects; + } + + internal static Dictionary GetSubAssets(List scriptableObjects) + where T : ScriptableBase + { + var mainAssetPath = new HashSet(); + //returns the subAsset as key and the parent asset as value + var subAssetLookUp = new Dictionary(); + foreach (var scriptableObject in scriptableObjects) + { + //sub assets all return the same path + var soPath = AssetDatabase.GetAssetPath(scriptableObject); + if (mainAssetPath.Contains(soPath)) + continue; + + var parent = AssetDatabase.LoadMainAssetAtPath(soPath); + var subAssets = GetAllSubAssets(parent); + + if (subAssets.Count == 0) + continue; + + foreach (var subAsset in subAssets) + subAssetLookUp.Add(subAsset as ScriptableBase, parent); + + mainAssetPath.Add(soPath); + } + + return subAssetLookUp; + } + + + public static string CapitalizeFirstLetter(this string input) + { + if (string.IsNullOrEmpty(input)) + return input; + + return input.Substring(0, 1).ToUpper() + input.Substring(1); + } + + internal static List<(GameObject, Type, string, string)> FindReferencesInScene(ScriptableBase scriptableBase) + { + var sceneReferences = new List<(GameObject, Type, string, string)>(); + + for (int i = 0; i < SceneManager.sceneCount; i++) + { + var s = SceneManager.GetSceneAt(i); + if (!s.isLoaded) + continue; + + var rootObjects = s.GetRootGameObjects(); + foreach (var rootObject in rootObjects) + { + FindReferencesInGameObject(rootObject, scriptableBase, ref sceneReferences); + } + } + + return sceneReferences; + } + + private static string GetGameObjectPath(GameObject obj) + { + string path = obj.name; + while (obj.transform.parent != null) + { + obj = obj.transform.parent.gameObject; + path = obj.name + "/" + path; + } + + return path; + } + + private static void FindReferencesInGameObject(GameObject gameObject, ScriptableBase scriptableBase, + ref List<(GameObject, Type, string, string)> sceneReferences) + { + var components = gameObject.GetComponents(); + foreach (var component in components) + { + if (component == null) //a missing scripts + continue; + + var serializedObject = new SerializedObject(component); + var serializedProperty = serializedObject.GetIterator(); + while (serializedProperty.NextVisible(true)) + { + if (serializedProperty.propertyType == SerializedPropertyType.ObjectReference && + serializedProperty.objectReferenceValue is ScriptableBase target) + { + if (target != scriptableBase) + continue; + var entry = (gameObject, component.GetType(), serializedProperty.name, + GetGameObjectPath(gameObject)); + sceneReferences.Add(entry); + } + } + } + + foreach (Transform child in gameObject.transform) + FindReferencesInGameObject(child.gameObject, scriptableBase, ref sceneReferences); + } + + internal static Dictionary FindReferencesInProject(ScriptableBase scriptableBase) + { + var assetPaths = AssetDatabase.FindAssets("t:Prefab t:ScriptableObject") + .Select(AssetDatabase.GUIDToAssetPath) + .Where(path => path.StartsWith("Assets/") && !path.EndsWith(".unity")); + Dictionary references = new Dictionary(); + var pathHash = new HashSet(); + var maxIterations = 100000; + + foreach (var assetPath in assetPaths) + { + if (pathHash.Contains(assetPath)) //needed to filter sub assets as they all share the same path + continue; + + var assets = AssetDatabase.LoadAllAssetsAtPath(assetPath); + foreach (var asset in assets) + { + if (asset == null || AssetDatabase.IsSubAsset(asset)) + continue; + + var serializedObject = new SerializedObject(asset); + var property = serializedObject.GetIterator(); + var referenceCount = 0; + var iterations = 0; + + while (property.NextVisible(true)) + { + iterations++; + //Safety for circular references + if (iterations > maxIterations) + break; + + if (property.propertyType == SerializedPropertyType.ObjectReference && + property.objectReferenceValue == scriptableBase) + { + referenceCount++; + } + } + + if (referenceCount > 0) + { + if (references.ContainsKey(assetPath)) + references[assetPath] += referenceCount; + else + references.Add(assetPath, referenceCount); + } + } + + pathHash.Add(assetPath); + } + + return references; + } + + internal static bool CanBeSubAsset(SerializedProperty property, FieldInfo fieldInfo) + { + if (fieldInfo == null) //for Odin dictionary serialization + return false; + + //main Asset has to be a SO + var mainAsset = property.serializedObject.targetObject; + if (mainAsset is ScriptableObject) + { + var isScriptableBase = fieldInfo.FieldType.IsSubclassOf(typeof(ScriptableBase)); + if (!isScriptableBase) + return false; + + var hasSubAsset = HasAttribute(fieldInfo); + return hasSubAsset; + } + + return false; + } + + private static bool HasAttribute(FieldInfo fieldInfo) where T : Attribute + { + if (fieldInfo != null) + { + T attribute = (T)Attribute.GetCustomAttribute(fieldInfo, typeof(T)); + return attribute != null; + } + + return false; + } + + internal static List GetAllSubAssets(Object mainAsset) + { + var mainAssetPath = AssetDatabase.GetAssetPath(mainAsset); + var allAssets = AssetDatabase.LoadAllAssetsAtPath(mainAssetPath); + var subAssets = new List(); + foreach (var asset in allAssets) + { + if (asset == mainAsset || asset == null) + continue; + + subAssets.Add(asset); + } + + return subAssets; + } + + internal static void DeleteSubAsset(Object subAsset) + { + Object.DestroyImmediate(subAsset, true); + AssetDatabase.SaveAssets(); + } + + internal static void AssignTag(ScriptableBase scriptableBase, int tagIndex) + { + var serializedObject = new SerializedObject(scriptableBase); + serializedObject.FindProperty("TagIndex").intValue = tagIndex; + serializedObject.ApplyModifiedProperties(); + } + + /// + /// Checks if a type name is valid. + /// + /// + /// + public static bool IsTypeNameValid(string typeName) + { + var valid = System.CodeDom.Compiler.CodeGenerator.IsValidLanguageIndependentIdentifier(typeName); + return valid; + } + + /// + /// Checks if a namespace name is valid. An empty namespace is valid. + /// + /// The namespace name to validate. + /// True if the namespace name is valid; otherwise, false. + internal static bool IsNamespaceValid(string namespaceName) + { + if (string.IsNullOrEmpty(namespaceName)) + return true; + var parts = namespaceName.Split('.'); + foreach (var part in parts) + { + if (!System.CodeDom.Compiler.CodeGenerator.IsValidLanguageIndependentIdentifier(part)) + return false; + } + + if (namespaceName.StartsWith(".") || namespaceName.EndsWith(".") || namespaceName.Contains("..")) + return false; + + return true; + } + + internal static bool IsResourcePathValid(string resourcePath) + { + if (string.IsNullOrEmpty(resourcePath)) + return false; + + // Check for invalid characters + char[] invalidChars = Path.GetInvalidPathChars(); + if (resourcePath.IndexOfAny(invalidChars) >= 0) + return false; + + // Check for consecutive slashes + if (resourcePath.Contains("//")) + return false; + + // If any path segment is exactly "Resources" (case\-insensitive), it's valid + var trimmed = resourcePath.Trim(); + trimmed = trimmed.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + var segments = trimmed.Split(new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, + StringSplitOptions.RemoveEmptyEntries); + if (!segments.Any(s => string.Equals(s, "Resources", StringComparison.OrdinalIgnoreCase))) + return false; + + return true; + } + + public static string GenerateGuid(Object obj) + { + var guid = string.Empty; + //SubAssets + if (!AssetDatabase.IsMainAsset(obj) + && AssetDatabase.TryGetGUIDAndLocalFileIdentifier(obj, out guid, out long file)) + { + guid = GenerateGuidForSubAsset(obj, file); + } + else + guid = GenerateGuidForMainAsset(obj); + + return guid; + } + + private static string GenerateGuidForMainAsset(Object obj) + { + var path = AssetDatabase.GetAssetPath(obj); + var guid = AssetDatabase.AssetPathToGUID(path); + return guid; + } + + private static string GenerateGuidForSubAsset(Object obj, long fileId) + { + var guid = GenerateGuidForMainAsset(obj); + guid += fileId.ToString().Substring(0, 5); + return guid; + } + + public static string CleanSubAssetName(string input) + { + if (string.IsNullOrEmpty(input)) + return string.Empty; + + Match match = Regex.Match(input, "<([^>]+)>"); + return match.Success ? match.Groups[1].Value : input; + } + + /// + /// Clear editor Prefs for Soap. + /// + //[MenuItem("Tools/Obvious Game/Soap/Clear Editor Prefs")] + internal static void ClearEditorPrefs() + { + var applicationHash = Application.dataPath.GetHashCode(); + EditorPrefs.DeleteKey(WizardRootFolderPathKey + applicationHash); + EditorPrefs.DeleteKey(WizardFavoritesKey + applicationHash); + EditorPrefs.DeleteKey(WizardTagsKey + applicationHash); + EditorPrefs.DeleteKey(TypeCreatorDestinationFolderIndexKey + applicationHash); + EditorPrefs.DeleteKey(TypeCreatorDestinationFolderPathKey + applicationHash); + EditorPrefs.DeleteKey(WindowLastCategoryKey + applicationHash); + EditorPrefs.DeleteKey(WindowHasShownWindowKey + applicationHash); + EditorPrefs.DeleteKey(CustomCreationPathKey + applicationHash); + Debug.Log("Editor prefs deleted"); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapEditorUtils.cs.meta b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapEditorUtils.cs.meta new file mode 100644 index 000000000..320239c61 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapEditorUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 262feecd423aab5469de4e2f9575440f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapFileUtils.cs b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapFileUtils.cs new file mode 100644 index 000000000..24c490eb4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapFileUtils.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public static class SoapFileUtils + { + /// Given an absolute path, return a path rooted at the Assets folder. + /// /Folder/UnityProject/Assets/resources/music -> Assets/resources/music + public static string GetRelativePath(string path) + { + if (path.StartsWith(Application.dataPath)) + return "Assets" + path.Substring(Application.dataPath.Length); + else + throw new ArgumentException("Full path does not contain the current project's Assets folder"); + } + + /// + /// Get all available Resources directory paths within the current project. + /// + public static string[] GetResourcesDirectories() + { + var result = new List(); + var stack = new Stack(); + stack.Push(Application.dataPath); + + while (stack.Count > 0) + { + var currentDir = stack.Pop(); + foreach (var dir in Directory.GetDirectories(currentDir)) + { + if (Path.GetFileName(dir).Equals("Resources")) + result.Add(dir); + stack.Push(dir); + } + } + + return result.ToArray(); + } + + /// + /// Returns the current selected folder in the Project Window. + /// Returns "Asset/SoapGenerated" if the project window is not selected. + /// + public static string GetSelectedFolderPathInProjectWindow() + { + var methodInfo = typeof(ProjectWindowUtil).GetMethod("TryGetActiveFolderPath", + BindingFlags.Static | BindingFlags.NonPublic); + var args = new object[] { null }; + var found = (bool)methodInfo.Invoke(null, args); + return found ? (string)args[0] : "Assets/SoapGenerated"; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapFileUtils.cs.meta b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapFileUtils.cs.meta new file mode 100644 index 000000000..0495ce2d8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapFileUtils.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5b3d2a240c1c46b68a957963a3a7bd99 +timeCreated: 1680269043 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapInspectorUtils.cs b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapInspectorUtils.cs new file mode 100644 index 000000000..232b1345f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapInspectorUtils.cs @@ -0,0 +1,625 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; +using UnityEditor; +using Object = UnityEngine.Object; + +namespace Obvious.Soap.Editor +{ + public static class SoapInspectorUtils + { + /// + /// Draws all properties like base.OnInspectorGUI() but excludes the specified fields by name. + /// + /// An array of names that should be excluded. + /// Example: new string[] { "m_Script" , "myInt" } will skip the default Script field and the Integer field myInt. + /// + internal static void DrawInspectorExcept(this SerializedObject serializedObject, string[] fieldsToSkip) + { + serializedObject.Update(); + var prop = serializedObject.GetIterator(); + if (prop.NextVisible(true)) + { + do + { + if (fieldsToSkip.Any(prop.name.Contains)) + continue; + + EditorGUILayout.PropertyField(serializedObject.FindProperty(prop.name), true); + } while (prop.NextVisible(false)); + } + } + + internal static void DrawCustomInspector(this SerializedObject serializedObject, HashSet fieldsToSkip, + System.Type genericType) + { + serializedObject.Update(); + var prop = serializedObject.GetIterator(); + var runtimeValueProperty = serializedObject.FindProperty("_runtimeValue"); + var savedProperty = serializedObject.FindProperty("_saved"); + var guidProperty = serializedObject.FindProperty("_guid"); + var saveGuidProperty = serializedObject.FindProperty("_saveGuid"); + + if (prop.NextVisible(true)) + { + do + { + if (fieldsToSkip.Contains(prop.name)) + continue; + + if (prop.name == "_value") + { + DrawValueField(prop.name, serializedObject.targetObject); + } + else if (prop.name != "_runtimeValue") + { + EditorGUILayout.PropertyField(prop, true); + } + + //Draw save properties + if (prop.name == "_saved" && savedProperty.boolValue) + { + DrawSaveProperties(); + } + } while (prop.NextVisible(false)); + } + + serializedObject.ApplyModifiedProperties(); + + void DrawValueField(string propertyName, Object target) + { + if (Application.isPlaying) + { + //Draw Object field + if (genericType != null) + { + var objectValue = EditorGUILayout.ObjectField("Runtime Value", + runtimeValueProperty.objectReferenceValue, genericType, + true); + target.GetType().GetProperty("Value").SetValue(target, objectValue); + } + else + { + EditorGUILayout.PropertyField(runtimeValueProperty); + } + } + else + { + //Draw Object field + if (genericType != null) + { + var tooltip = "The value should only be set at runtime."; + GUI.enabled = false; + EditorGUILayout.ObjectField(new GUIContent("Value", tooltip), null, genericType, false); + GUI.enabled = true; + } + else + { + EditorGUILayout.PropertyField(serializedObject.FindProperty(propertyName), true); + } + } + } + + void DrawSaveProperties() + { + EditorGUI.indentLevel++; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(saveGuidProperty, true); + var saveGuidType = (SaveGuidType)saveGuidProperty.enumValueIndex; + if (saveGuidType == SaveGuidType.Auto) + { + GUI.enabled = false; + EditorGUILayout.TextField(guidProperty.stringValue); + GUI.enabled = true; + } + else + { + guidProperty.stringValue = EditorGUILayout.TextField(guidProperty.stringValue); + } + + EditorGUILayout.EndHorizontal(); + EditorGUI.indentLevel--; + } + } + + internal static void DrawOnlyField(this SerializedObject serializedObject, string fieldName, + bool isReadOnly) + { + serializedObject.Update(); + var prop = serializedObject.GetIterator(); + if (prop.NextVisible(true)) + { + do + { + if (prop.name != fieldName) + continue; + + GUI.enabled = !isReadOnly; + EditorGUILayout.PropertyField(serializedObject.FindProperty(prop.name), true); + GUI.enabled = true; + } while (prop.NextVisible(false)); + } + + serializedObject.ApplyModifiedProperties(); + } + + /// + /// Draw all properties except the ones specified. + /// Also disables the m_Script property. + /// + /// + /// + internal static void DrawPropertiesExcluding(SerializedObject obj, params string[] propertyToExclude) + { + obj.Update(); + SerializedProperty iterator = obj.GetIterator(); + bool enterChildren = true; + while (iterator.NextVisible(enterChildren)) + { + enterChildren = false; + if (!propertyToExclude.Contains(iterator.name)) + { + GUI.enabled = iterator.name != "m_Script"; + EditorGUILayout.PropertyField(iterator, true); + GUI.enabled = true; + } + } + + obj.ApplyModifiedProperties(); + } + + internal static void DrawLine(int height = 1) => DrawColoredLine(height, new Color(0.5f, 0.5f, 0.5f, 1)); + + internal static void DrawColoredLine(int height, Color color) + { + Rect rect = EditorGUILayout.GetControlRect(false, height); + rect.height = height; + EditorGUI.DrawRect(rect, color); + } + + internal static void DrawVerticalColoredLine(int width, Color color) + { + Rect rect = EditorGUILayout.GetControlRect(false, GUILayout.Width(width), GUILayout.ExpandHeight(true)); + rect.width = width; + EditorGUI.DrawRect(rect, color); + } + + internal static void DrawSelectableObject(Object obj, string[] labels) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(labels[0], GUILayout.MaxWidth(300))) + EditorGUIUtility.PingObject(obj); + + if (GUILayout.Button(labels[1], GUILayout.MaxWidth(75))) + { + EditorGUIUtility.PingObject(obj); + Selection.activeObject = obj; + } + + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + GUILayout.Space(2); + } + + internal static Texture2D CreateTexture(Color color) + { + var result = new Texture2D(1, 1, TextureFormat.RGBA32, false); + result.SetPixel(0, 0, color); + result.Apply(); + return result; + } + + /// Centers a rect inside another window. + /// + /// + internal static Rect CenterInWindow(Rect window, Rect origin) + { + var pos = window; + float w = (origin.width - pos.width) * 0.5f; + float h = (origin.height - pos.height) * 0.5f; + pos.x = origin.x + w; + pos.y = origin.y + h; + return pos; + } + + internal static void DrawPopUpHeader(EditorWindow editorWindow, string titleName) + { + GUILayout.BeginVertical(); + GUILayout.BeginHorizontal(); + + if (GUILayout.Button(Icons.Cancel, Styles.CancelButton)) + editorWindow.Close(); + + EditorGUILayout.LabelField(titleName, Styles.Header); + GUILayout.EndHorizontal(); + GUILayout.EndVertical(); + } + + internal static bool DrawCallToActionButton(string text, ButtonSize size) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + var style = new GUIStyle(Styles.CallToActionButton); + switch (size) + { + case ButtonSize.Small: + style.fixedHeight = 20; + style.fixedWidth = 60; + break; + case ButtonSize.Medium: + style.fixedHeight = 25; + style.fixedWidth = 75; + break; + case ButtonSize.Large: + style.fixedHeight = 25; + style.fixedWidth = 150; + break; + } + + Color originalColor = GUI.backgroundColor; + var color = new Color(0.2f, 1.1f, 1.7f, 1); + GUI.backgroundColor = color.Lighten(0.3f); + var hasClicked = GUILayout.Button(text, style); + GUI.backgroundColor = originalColor; + GUILayout.EndHorizontal(); + return hasClicked; + } + + internal enum ButtonSize + { + Small, + Medium, + Large + } + + internal static void ShowTagMenu(int currentTagIndex, Action onTagSelected) + { + var menu = new GenericMenu(); + var soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + var tags = soapSettings.Tags.ToArray(); + for (int i = 0; i < tags.Length; i++) + { + var i1 = i; + var isCurrentTag = currentTagIndex > 0 && i == currentTagIndex; + menu.AddItem(new GUIContent(tags[i]), isCurrentTag, () => { onTagSelected(i1); }); + } + + menu.AddSeparator(""); + menu.AddItem(new GUIContent("Add Tag..."), false, () => + { + EditorWindow currentWindow = EditorWindow.focusedWindow; + var position = currentWindow.position; + //position.y -= currentWindow.position.height * 0.3f; + var rect = new Rect(position); + PopupWindow.Show(new Rect(), new TagPopUpWindow(rect)); + }); + menu.ShowAsContext(); + } + + internal static void ShowPathMenu(string[] options, int currentIndex, Action onOptionSelected) + { + var menu = new GenericMenu(); + for (int i = 0; i < options.Length; i++) + { + var i1 = i; + var isCurrentOption = currentIndex > 0 && i == currentIndex; + menu.AddItem(new GUIContent(options[i]), isCurrentOption, () => { onOptionSelected(i1); }); + } + + menu.ShowAsContext(); + } + + internal static void DrawSerializationError(Type type, Rect position = default) + { + if (position == default) + { + EditorGUILayout.HelpBox($"{type} Value field cannot be shown as it it not marked as serializable." + + "\n Add [System.Serializable] attribute.", MessageType.Warning); + } + else + { + var icon = EditorGUIUtility.IconContent("Error").image; + GUI.DrawTexture(position, icon, ScaleMode.ScaleToFit); + } + } + + + internal static class Icons + { + private static Texture _cancel; + + internal static Texture Cancel => + _cancel ? _cancel : _cancel = Resources.Load("Icons/icon_cancel"); + + private static Texture _subAsset; + + internal static Texture SubAsset => + _subAsset ? _subAsset : _subAsset = Resources.Load("Icons/icon_subAsset"); + + private static Texture _editTags; + + internal static Texture EditTags => _editTags + ? _editTags + : _editTags = + Resources.Load("Icons/icon_edit"); + + private static Texture _runtimeInjectable; + + internal static Texture RuntimeInjectable => _runtimeInjectable + ? _runtimeInjectable + : _runtimeInjectable = + Resources.Load("Icons/icon_runtimeInjectable"); + + private static Texture _scriptableVariable; + + internal static Texture ScriptableVariable => _scriptableVariable + ? _scriptableVariable + : _scriptableVariable = + Resources.Load("Icons/icon_scriptableVariable"); + + private static Texture _scriptableEvent; + + internal static Texture ScriptableEvent => _scriptableEvent + ? _scriptableEvent + : _scriptableEvent = + Resources.Load("Icons/icon_scriptableEvent"); + + private static Texture _scriptableList; + + internal static Texture ScriptableList => _scriptableList + ? _scriptableList + : _scriptableList = + Resources.Load("Icons/icon_scriptableList"); + + private static Texture _scriptableDictionary; + + internal static Texture ScriptableDictionary => _scriptableDictionary + ? _scriptableDictionary + : _scriptableDictionary = + Resources.Load("Icons/icon_scriptableDictionary"); + + private static Texture _scriptableEnum; + + internal static Texture ScriptableEnum => _scriptableEnum + ? _scriptableEnum + : _scriptableEnum = + Resources.Load("Icons/icon_scriptableEnum"); + + private static Texture _scriptableSave; + + internal static Texture ScriptableSave => _scriptableSave + ? _scriptableSave + : _scriptableSave = + Resources.Load("Icons/icon_scriptableSave"); + + private static Texture _eventListener; + + internal static Texture EventListener => _eventListener + ? _eventListener + : _eventListener = + Resources.Load("Icons/icon_eventListener"); + + private static Texture _scriptableSingleton; + + internal static Texture ScriptableSingleton => _scriptableSingleton + ? _scriptableSingleton + : _scriptableSingleton = + Resources.Load("Icons/icon_scriptableSingleton"); + + #region Icon Utils + + private static readonly MethodInfo SetIconForObject = + typeof(EditorGUIUtility).GetMethod("SetIconForObject", BindingFlags.Static | BindingFlags.NonPublic); + + private static readonly MethodInfo CopyMonoScriptIconToImporters = + typeof(MonoImporter).GetMethod("CopyMonoScriptIconToImporters", + BindingFlags.Static | BindingFlags.NonPublic); + + private static readonly Type AnnotationType = Type.GetType("UnityEditor.Annotation, UnityEditor"); + private static readonly FieldInfo AnnotationClassId = AnnotationType?.GetField("classID"); + private static readonly FieldInfo AnnotationScriptClass = AnnotationType?.GetField("scriptClass"); + + private static readonly Type AnnotationUtilityType = + Type.GetType("UnityEditor.AnnotationUtility, UnityEditor"); + + private static readonly MethodInfo GetAnnotations = + AnnotationUtilityType?.GetMethod("GetAnnotations", BindingFlags.Static | BindingFlags.NonPublic); + + private static readonly MethodInfo SetIconEnabled = + AnnotationUtilityType?.GetMethod("SetIconEnabled", BindingFlags.Static | BindingFlags.NonPublic); + + internal static void SetIcons(MonoScript[] monoScripts) + { + foreach (var script in monoScripts) + TrySetSoapIcon(script); + DisableIconsInGizmos(monoScripts); + + AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); + AssetDatabase.SaveAssets(); + } + + private static void TrySetSoapIcon(MonoScript monoScript) + { + var path = AssetDatabase.GetAssetPath(monoScript); + var monoImporter = AssetImporter.GetAtPath(path) as MonoImporter; + if (monoImporter == null) + return; + TrySetSoapIcon(monoScript, monoImporter); + } + + internal static void TrySetSoapIcon(MonoScript monoScript, MonoImporter monoImporter) + { + var icon = GetIconFor(monoScript.GetClass()) as Texture2D; + if (icon == null) + return; +#if UNITY_2021_3_OR_NEWER + monoImporter.SetIcon(icon); + monoImporter.SaveAndReimport(); +#else + SetIconForObject?.Invoke(null, new object[] { monoScript, icon }); + CopyMonoScriptIconToImporters?.Invoke(null, new object[] { monoScript }); +#endif + } + + private static void DisableIconsInGizmos(MonoScript[] monoScripts) + { + var annotations = (Array)GetAnnotations.Invoke(null, null); + foreach (var monoScript in monoScripts) + { + foreach (var annotation in annotations) + { + string scriptClass = (string)AnnotationScriptClass.GetValue(annotation); + if (scriptClass == monoScript.name) + { + int classId = (int)AnnotationClassId.GetValue(annotation); + SetIconEnabled.Invoke(null, new object[] { classId, scriptClass, 0 }); + } + } + } + } + + public static Texture GetIconFor(Type type) + { + if (type.IsSubclassOf(typeof(ScriptableVariableBase))) + return ScriptableVariable; + if (type.IsSubclassOf(typeof(ScriptableEventBase))) + return ScriptableEvent; + if (type.IsSubclassOf(typeof(ScriptableListBase))) + return ScriptableList; + if (type.IsSubclassOf(typeof(ScriptableDictionaryBase))) + return ScriptableDictionary; + if (type.IsSubclassOf(typeof(ScriptableEnumBase))) + return ScriptableEnum; + if (type.IsSubclassOf(typeof(ScriptableSaveBase))) + return ScriptableSave; + if (type.IsSubclassOf(typeof(EventListenerBase))) + return EventListener; + if (SoapUtils.InheritsFromOpenGeneric(type, typeof(ScriptableSingleton<>))) + return ScriptableSingleton; + return null; + } + + #endregion + } + + internal static class Styles + { + private static GUIStyle _header; + + internal static GUIStyle Header + { + get + { + if (_header == null) + { + _header = new GUIStyle(EditorStyles.boldLabel) + { + fontSize = 14, + fontStyle = FontStyle.Bold, + alignment = TextAnchor.MiddleCenter, + fixedHeight = 25, + contentOffset = new Vector2(-10, 0) + }; + } + + return _header; + } + } + + private static GUIStyle _cancelButton; + + internal static GUIStyle CancelButton + { + get + { + if (_cancelButton == null) + { + _cancelButton = new GUIStyle(GUIStyle.none) + { + padding = new RectOffset(4, 4, 4, 4), + margin = new RectOffset(4, 0, 4, 0), + fixedWidth = 20, + fixedHeight = 20 + }; + } + + return _cancelButton; + } + } + + private static GUIStyle _popupContentStyle; + + internal static GUIStyle PopupContent + { + get + { + if (_popupContentStyle == null) + { + _popupContentStyle = new GUIStyle(GUIStyle.none) + { + padding = new RectOffset(10, 10, 10, 10), + }; + } + + return _popupContentStyle; + } + } + + private static GUIStyle _callToActionButton; + + internal static GUIStyle CallToActionButton + { + get + { + if (_callToActionButton == null) + { + _callToActionButton = new GUIStyle(GUI.skin.button); + } + + return _callToActionButton; + } + } + + private static GUIStyle _toolbarButton; + + internal static GUIStyle ToolbarButton + { + get + { + if (_toolbarButton == null) + { + _toolbarButton = new GUIStyle(EditorStyles.toolbar) + { + fontSize = 10, + contentOffset = new Vector2(0, 2), + }; + _toolbarButton.normal.textColor = Color.gray.Lighten(0.1f); + } + + return _toolbarButton; + } + } + + private static GUIStyle _editTagHeaderButton; + + internal static GUIStyle EditTagHeaderButton + { + get + { + if (_editTagHeaderButton == null) + { + _editTagHeaderButton = new GUIStyle(GUI.skin.button) + { + padding = new RectOffset(4, 4, 4, 4), + }; + } + + return _editTagHeaderButton; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapInspectorUtils.cs.meta b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapInspectorUtils.cs.meta new file mode 100644 index 000000000..972bd90b6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapInspectorUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: edc2a3e0f462ae540866ca25344d50b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapMenuUtils.cs b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapMenuUtils.cs new file mode 100644 index 000000000..1ed513f31 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapMenuUtils.cs @@ -0,0 +1,216 @@ +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public static class SoapMenuUtils + { + [MenuItem("Tools/Obvious Game/Soap/Delete Player Pref %#d", priority = 0)] + public static void DeletePlayerPrefs() + { + PlayerPrefs.DeleteAll(); + Debug.Log($"--Player Prefs deleted--"); + } + + [MenuItem("Tools/Obvious Game/Soap/ToggleFastPlayMode %l", priority = 1)] + public static void ToggleFastPlayMode() + { + EditorSettings.enterPlayModeOptionsEnabled = !EditorSettings.enterPlayModeOptionsEnabled; + AssetDatabase.Refresh(); + var text = EditorSettings.enterPlayModeOptionsEnabled + ? "Enabled" + : $"Disabled"; + text += ""; + Debug.Log("Fast Play Mode " + text); + } + + [MenuItem("CONTEXT/ScriptableVariableBase/Reset Value", false, 2)] + private static void ResetValue(MenuCommand command) => ResetValue(command.context); + + [MenuItem("CONTEXT/ScriptableCollection/Clear", false, 2)] + private static void Clear(MenuCommand command) => ResetValue(command.context); + + private static void ResetValue(Object unityObject) + { + var reset = unityObject as IReset; + reset.ResetValue(); + } + + [MenuItem("CONTEXT/ScriptableBase/Reset", false, 1)] + private static void Reset(MenuCommand command) => Reset(command.context); + + private static void Reset(Object unityObject) + { + var scriptableBase = unityObject as ScriptableBase; + scriptableBase.Reset(); + EditorUtility.SetDirty(unityObject); + } + + [MenuItem("CONTEXT/ScriptableObject/Delete All SubAssets", false, 0)] + private static void DeleteAllSubAssets(MenuCommand command) => DeleteAllSubAssets(command.context); + + [MenuItem("Assets/Soap/Delete All SubAssets")] + private static void DeleteAllSubAssets() => DeleteAllSubAssets(Selection.activeObject); + + [MenuItem("CONTEXT/ScriptableObject/Delete All SubAssets", true)] + private static bool ValidateDeleteAllSubAssets(MenuCommand command) => CanDeleteAllSubAssets(command.context); + + [MenuItem("Assets/Soap/Delete All SubAssets", true)] + private static bool ValidateDeleteAllSubAssets() => CanDeleteAllSubAssets(Selection.activeObject); + + private static bool CanDeleteAllSubAssets(Object obj) + { + var isScriptable = obj is ScriptableObject; + if (!isScriptable || AssetDatabase.IsSubAsset(obj)) + return false; + var subAssets = SoapEditorUtils.GetAllSubAssets(Selection.activeObject); + return subAssets.Count > 0; + } + + private static void DeleteAllSubAssets(Object unityObject) + { + var subAssets = SoapEditorUtils.GetAllSubAssets(unityObject); + foreach (var subAsset in subAssets) + Object.DestroyImmediate(subAsset, true); + + AssetDatabase.SaveAssets(); + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(unityObject), ImportAssetOptions.ForceUpdate); + } + + [MenuItem("CONTEXT/ScriptableObject/Delete SubAsset", false, 0)] + private static void DeleteSubAsset(MenuCommand command) => DeleteSubAsset(command.context); + + [MenuItem("Assets/Soap/Delete SubAsset")] + private static void DeleteSubAsset() => DeleteSubAsset(Selection.activeObject); + + [MenuItem("CONTEXT/ScriptableObject/Delete SubAsset", true)] + private static bool ValidateDeleteSubAsset(MenuCommand command) => CanDeleteSubAsset(command.context); + + [MenuItem("Assets/Soap/Delete SubAsset", true)] + private static bool ValidateDeleteSubAsset() => CanDeleteSubAsset(Selection.activeObject); + + private static bool CanDeleteSubAsset(Object obj) + { + var isScriptable = obj is ScriptableObject; + if (!isScriptable) + return false; + return AssetDatabase.IsSubAsset(obj); + } + + private static void DeleteSubAsset(Object unityObject) + { + SoapEditorUtils.DeleteSubAsset(unityObject); + } + + [MenuItem("CONTEXT/ScriptableBase/\ud83d\udd0dFind References/In Scene and Project", false, 0)] + private static void FindReferencesAll(MenuCommand command) => FindReferenceFor(command.context, FindReferenceType.All); + + [MenuItem("CONTEXT/ScriptableBase/\ud83d\udd0dFind References/In Scene", false, 0)] + private static void FindReferencesInScene(MenuCommand command) => FindReferenceFor(command.context, FindReferenceType.Scene); + + [MenuItem("CONTEXT/ScriptableBase/\ud83d\udd0dFind References/In Project", false, 0)] + private static void FindReferencesInProject(MenuCommand command) => FindReferenceFor(command.context, FindReferenceType.Project); + + [MenuItem("Assets/Soap/\ud83d\udd0d Find References/In Scene and Project")] + private static void FindReferencesAll() => FindReferenceFor(Selection.activeObject, FindReferenceType.All); + + [MenuItem("Assets/Soap/\ud83d\udd0d Find References/In Scene")] + private static void FindReferencesInScene() => FindReferenceFor(Selection.activeObject, FindReferenceType.Scene); + + [MenuItem("Assets/Soap/\ud83d\udd0d Find References/In Project")] + private static void FindReferencesInProject() => FindReferenceFor(Selection.activeObject, FindReferenceType.Project); + + + [MenuItem("CONTEXT/ScriptableBase/Find References/In Scene and Project", true)] + private static bool ValidateFindReferenceAll(MenuCommand command) => CanFindReferenceFor(command.context); + + [MenuItem("Assets/Soap/\ud83d\udd0d Find References/In Scene and Project", true)] + private static bool ValidateFindReferenceAll() => CanFindReferenceFor(Selection.activeObject); + + [MenuItem("CONTEXT/ScriptableBase/Find References/In Scene", true)] + private static bool ValidateFindReferenceInScene(MenuCommand command) => CanFindReferenceFor(command.context); + + [MenuItem("Assets/Soap/\ud83d\udd0d Find References/In Scene", true)] + private static bool ValidateFindReferenceInScene() => CanFindReferenceFor(Selection.activeObject); + + [MenuItem("CONTEXT/ScriptableBase/Find References/In Project", true)] + private static bool ValidateFindReferenceInProject(MenuCommand command) => CanFindReferenceFor(command.context); + + [MenuItem("Assets/Soap/\ud83d\udd0d Find References/In Project", true)] + private static bool ValidateFindReferenceInProject() => CanFindReferenceFor(Selection.activeObject); + + private static bool CanFindReferenceFor(Object obj) + { + var isScriptable = obj is ScriptableBase; + return isScriptable; + } + + private static void FindReferenceFor(Object unityObject, FindReferenceType findReferenceType) + { + var scriptableBase = unityObject as ScriptableBase; + if (scriptableBase == null) + return; + EditorWindow mouseOverWindow = EditorWindow.mouseOverWindow; + if (mouseOverWindow == null) + return; + + ReferencesPopupWindow.ShowWindow(mouseOverWindow.position, scriptableBase, findReferenceType); + } + + [MenuItem("Assets/Soap/\ud83d\udd16 Set Tag")] + private static void SetTag() + { + var scriptableBases = Selection.GetFiltered(SelectionMode.Assets); + PopupWindow.Show(new Rect(), new SetTagPopupWindow(scriptableBases)); + } + + [MenuItem("Assets/Soap/\ud83d\udd16 Set Tag", true)] + private static bool ValidateSetTag() + { + return Selection.GetFiltered(SelectionMode.Assets).Length > 0; + } + + [MenuItem("Assets/Soap/\ud83d\uddbc Set Icon")] + public static void SetIcon() + { + var monoScripts = Selection.GetFiltered(SelectionMode.Assets); + SoapInspectorUtils.Icons.SetIcons(monoScripts); + } + + [MenuItem("Assets/Soap/\ud83d\uddbc Set Icon", true)] + private static bool ValidateSetIcon() + { + var monoScripts = Selection.GetFiltered(SelectionMode.Assets); + foreach (var monoScript in monoScripts) + { + var scriptClass = monoScript.GetClass(); + if (scriptClass == null) + continue; + if (!scriptClass.IsSubclassOf(typeof(ScriptableBase))) + { + return false; + } + } + + return monoScripts.Length > 0; + } + + [MenuItem("CONTEXT/ScriptableObject/Select Parent", false, 1)] + private static void PingParent(MenuCommand menuCommand) + { + var scriptableBase = menuCommand.context as ScriptableBase; + var path = AssetDatabase.GetAssetPath(scriptableBase); + var parent = AssetDatabase.LoadMainAssetAtPath(path); + Selection.activeObject = parent; + } + + [MenuItem("CONTEXT/ScriptableObject/Select Parent", true)] + private static bool IsSubAsset(MenuCommand command) + { + var obj = command.context; + var isScriptable = obj is ScriptableBase; + var isSubAsset = !AssetDatabase.IsMainAsset(obj); + return isScriptable && isSubAsset; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/SoapMenuUtils.cs.meta b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapMenuUtils.cs.meta new file mode 100644 index 000000000..ccbc43566 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/SoapMenuUtils.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7575421135fc4c539e8885c29edae8c5 +timeCreated: 1715646707 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/UEEDisableObjectFieldDrawer.cs b/Assets/Obvious/Soap/Core/Editor/Utilities/UEEDisableObjectFieldDrawer.cs new file mode 100644 index 000000000..2421ba579 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/UEEDisableObjectFieldDrawer.cs @@ -0,0 +1,25 @@ +#if UEE && !UEE_DISABLE_OBJECT_FIELD_DRAWER +using UnityEditor; +namespace Obvious.Soap.Editor +{ + [InitializeOnLoad] + public static class UEEDisableObjectFieldDrawer + { + static UEEDisableObjectFieldDrawer() + { + BuildTargetGroup buildTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup; + +#if UNITY_2023_1_OR_NEWER + UnityEditor.Build.NamedBuildTarget buildTarget = + UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(buildTargetGroup); + string currentDefinitions = PlayerSettings.GetScriptingDefineSymbols(buildTarget); + PlayerSettings.SetScriptingDefineSymbols(buildTarget, currentDefinitions + ";UEE_DISABLE_OBJECT_FIELD_DRAWER"); +#else + string currentDefinitions = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTargetGroup); + PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTargetGroup, + currentDefinitions + ";UEE_DISABLE_OBJECT_FIELD_DRAWER"); +#endif + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Utilities/UEEDisableObjectFieldDrawer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Utilities/UEEDisableObjectFieldDrawer.cs.meta new file mode 100644 index 000000000..18c72df09 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Utilities/UEEDisableObjectFieldDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 53448502d1a77d44eac9d97eea777181 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows.meta b/Assets/Obvious/Soap/Core/Editor/Windows.meta new file mode 100644 index 000000000..6ea31ff2b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60f6ac0e74c77bc4cb539b3c64e7d40a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow.meta b/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow.meta new file mode 100644 index 000000000..0f0c0b96a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d56ab1bef0510724a9af2c0c9b91a313 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow/EventsDebugWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow/EventsDebugWindow.cs new file mode 100644 index 000000000..2cbf159cf --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow/EventsDebugWindow.cs @@ -0,0 +1,100 @@ +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; +using UnityEngine.SceneManagement; + +namespace Obvious.Soap.Editor +{ + public class EventsDebugWindow : EditorWindow + { + private string _methodName = string.Empty; + private bool _hasClicked = false; + private bool _wasFound = false; + + [MenuItem("Window/Obvious Game/Soap/Events Debug Window")] + public new static void Show() + { + var window = GetWindow(typeof(SceneView)); + window.titleContent = new GUIContent("Events Debug Window", EditorGUIUtility.ObjectContent(CreateInstance(), typeof(ScriptableEventNoParam)).image); + } + + [MenuItem("Tools/Obvious Game/Soap/Event Debug Window")] + private static void OpenEventDebugWindow() => Show(); + + private void OnLostFocus() + { + GUI.FocusControl(null); + } + + private void OnGUI() + { + EditorGUILayout.LabelField("Find which events are calling a method in currently open scenes."); + SoapInspectorUtils.DrawLine(2); + + EditorGUI.BeginChangeCheck(); + var textFieldStyle = new GUIStyle(GUI.skin.textField); + _methodName = EditorGUILayout.TextField("Method Name", _methodName, textFieldStyle); + if (EditorGUI.EndChangeCheck()) + _hasClicked = false; + + GUI.enabled = _methodName.Length > 0; + if (SoapInspectorUtils.DrawCallToActionButton("Find", SoapInspectorUtils.ButtonSize.Large)) + { + _hasClicked = true; + var invocationCount = FindMethodInvocationCount(_methodName); + _wasFound = invocationCount > 0; + } + GUI.enabled = true; + + if (!_hasClicked) + return; + + DrawFeedbackText(); + } + + private void DrawFeedbackText() + { + var feedbackText = _methodName; + var guiStyle = new GUIStyle(EditorStyles.label); + guiStyle.normal.textColor = _wasFound ? Color.white : SoapEditorUtils.SoapColor; + guiStyle.fontStyle = FontStyle.Bold; + feedbackText += _wasFound ? " was found!" : " was not found!"; + EditorGUILayout.LabelField(feedbackText, guiStyle); + if (_wasFound) + EditorGUILayout.LabelField("Check the console for more details.", guiStyle); + } + + private int FindMethodInvocationCount(string methodName) + { + var eventListeners = FindAllInOpenScenes(); + var count = 0; + foreach (var listener in eventListeners) + { + if (listener.ContainsCallToMethod(methodName)) + count++; + } + + return count; + } + + private static List FindAllInOpenScenes() + { + var results = new List(); + for (int i = 0; i < SceneManager.sceneCount; i++) + { + var s = SceneManager.GetSceneAt(i); + if (!s.isLoaded) + continue; + + var allGameObjects = s.GetRootGameObjects(); + for (int j = 0; j < allGameObjects.Length; j++) + { + var go = allGameObjects[j]; + results.AddRange(go.GetComponentsInChildren(true)); + } + } + + return results; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow/EventsDebugWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow/EventsDebugWindow.cs.meta new file mode 100644 index 000000000..f251df55a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/EventsDebugWindow/EventsDebugWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a861fcc02155e748855695956da1503 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SetTagPopupWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SetTagPopupWindow.cs new file mode 100644 index 000000000..21b287076 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SetTagPopupWindow.cs @@ -0,0 +1,56 @@ +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class SetTagPopupWindow : PopupWindowContent + { + private int _selectedTagIndex = 0; + private Vector2? _mousePosition; + private readonly Vector2 _dimensions = new Vector2(250, 120); + private readonly SoapSettings _soapSettings; + private readonly ScriptableBase[] _scriptableBases; + private Texture[] _icons; + + public override Vector2 GetWindowSize() => _dimensions; + + public SetTagPopupWindow(ScriptableBase[] scriptableBases) + { + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + _scriptableBases = scriptableBases; + if (_scriptableBases.Length == 1) + { + var scriptableBase = _scriptableBases[0]; + _selectedTagIndex = _soapSettings.GetTagIndex(scriptableBase); + } + } + + public override void OnGUI(Rect rect) + { + //Do this only once to cache the mouse position + if (!_mousePosition.HasValue) + { + if (Event.current.type == EventType.Layout) + { + var pos = Event.current.mousePosition; + _mousePosition = GUIUtility.GUIToScreenPoint(pos); + editorWindow.position = new Rect(_mousePosition.Value, _dimensions); + } + } + SoapInspectorUtils.DrawPopUpHeader(editorWindow, "Set Tag"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + GUILayout.FlexibleSpace(); + var tags = _soapSettings.Tags.ToArray(); + _selectedTagIndex = EditorGUILayout.Popup(_selectedTagIndex, tags); + GUILayout.FlexibleSpace(); + if (SoapInspectorUtils.DrawCallToActionButton("Apply", SoapInspectorUtils.ButtonSize.Medium)) + { + foreach (var scriptableBase in _scriptableBases) + SoapEditorUtils.AssignTag(scriptableBase, _selectedTagIndex); + + editorWindow.Close(); + } + GUILayout.EndVertical(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SetTagPopupWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SetTagPopupWindow.cs.meta new file mode 100644 index 000000000..addd4ac3b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SetTagPopupWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f8834a6dba32a49458efb44cde7ee260 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator.meta new file mode 100644 index 000000000..a8a26d616 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b8a7ffe0a411394385d328b29f00275 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator/SoapAssetCreatorPopup.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator/SoapAssetCreatorPopup.cs new file mode 100644 index 000000000..c5a505b28 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator/SoapAssetCreatorPopup.cs @@ -0,0 +1,360 @@ +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEditor.IMGUI.Controls; + + +namespace Obvious.Soap.Editor +{ + public class SoapAssetCreatorPopup : PopupWindowContent + { + private Rect _position; + private readonly Vector2 _dimensions = new Vector2(350, 160f); + private SoapSettings _soapSettings; + private string _assetName = string.Empty; + private int _tagIndex; + private int _destinationFolderIndex; + private string _path; + private Type _selectedType; + private bool _assetCreated; + private Action _onAssetCreated; + private EOrigin _origin; + private bool _dropdownOpen; + + public enum EOrigin + { + Inspector, + ProjectWindow, + SoapWizard + } + + public override Vector2 GetWindowSize() + { + if (_origin == EOrigin.SoapWizard || _origin == EOrigin.ProjectWindow) + { + return new Vector2(_dimensions.x, _dimensions.y + 140f); + } + + return _dimensions; + } + + public SoapAssetCreatorPopup(Rect rect, EOrigin origin) + { + Init(rect, origin, null, string.Empty, 0); + SoapWizardWindow.IsPopupOpen = true; + } + + public SoapAssetCreatorPopup(Rect rect, EOrigin origin, Type type, string assetName, int tag, + Action onAssetCreated) + { + Init(rect, origin, type, assetName, tag); + _onAssetCreated = onAssetCreated; + } + + private void Init(Rect rect, EOrigin origin, Type type, string assetName, int tag) + { + _position = rect; + _origin = origin; + _selectedType = type; + _assetName = assetName; + _tagIndex = tag; + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + Load(); + } + + public override void OnClose() + { + if (SoapWizardWindow.IsPopupOpen) + SoapWizardWindow.IsPopupOpen = false; + } + + private void Load() + { + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + var isAutoPath = _soapSettings.CreatePathMode == ECreatePathMode.Auto; + _path = isAutoPath + ? SoapFileUtils.GetSelectedFolderPathInProjectWindow() + : SoapEditorUtils.CustomCreationPath; + } + + public override void OnGUI(Rect rect) + { + editorWindow.position = SoapInspectorUtils.CenterInWindow(editorWindow.position, _position); + SoapInspectorUtils.DrawPopUpHeader(editorWindow, "Create New Soap Asset"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + + if (_selectedType != null) + { + DrawAssetPreview(_selectedType); + GUILayout.Space(5f); + DrawTag(); + } + else + { + if (_assetCreated) + { + EditorGUILayout.HelpBox("Asset Created!", MessageType.Info); + GUILayout.Space(EditorGUIUtility.singleLineHeight * 2.3f); + } + else if (!_dropdownOpen) + { + ShowAssetCreatorDropdown(type => + { + _selectedType = type; + var prefix = _soapSettings.GetPrefix(type); + _assetName = $"{prefix}{type.Name}"; + _tagIndex = 0; + _assetCreated = false; + }); + _dropdownOpen = true; + GUILayout.Space(EditorGUIUtility.singleLineHeight * 2f + 5f); + } + } + + if (_origin != EOrigin.Inspector) + { + GUILayout.FlexibleSpace(); + } + else + { + GUILayout.Space(5f); + } + + if (_selectedType != null) + { + DrawPath(); + } + + GUILayout.Space(5f); + DrawCreateButton(); + GUILayout.EndVertical(); + } + + private void DrawAssetPreview(Type type) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Asset:", GUILayout.Width(127f)); + var icon = SoapInspectorUtils.Icons.GetIconFor(type); + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + _assetName = EditorGUILayout.TextField(_assetName); + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + } + + private void DrawTag() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Tag:", GUILayout.Width(147f)); + var style = new GUIStyle(EditorStyles.popup); + var tag = _soapSettings.Tags[_tagIndex]; + if (GUILayout.Button(tag, style)) + { + SoapInspectorUtils.ShowTagMenu(_tagIndex, newTag => { _tagIndex = newTag; }); + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawPath() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel("Destination Folder:"); + var style = new GUIStyle(EditorStyles.popup); + var isDefinedFromSettings = _soapSettings.CreatePathMode == ECreatePathMode.Manual + && _origin != EOrigin.ProjectWindow; + var options = new[] + { + isDefinedFromSettings ? "Defined from Settings" : "Selected in Project", + "Custom" + }; + + if (GUILayout.Button(options[_destinationFolderIndex], style)) + { + SoapInspectorUtils.ShowPathMenu(options, _destinationFolderIndex, + newTag => { _destinationFolderIndex = newTag; }); + } + + EditorGUILayout.EndHorizontal(); + + if (_destinationFolderIndex == 0) + { + GUI.enabled = false; + _path = isDefinedFromSettings + ? SoapEditorUtils.CustomCreationPath + : SoapFileUtils.GetSelectedFolderPathInProjectWindow(); + EditorGUILayout.TextField($"{_path}"); + GUI.enabled = true; + } + else + { + _path = EditorGUILayout.TextField(_path); + } + } + + private void DrawCreateButton() + { + var canCreate = _selectedType != null && _assetName.Length > 0; + GUI.enabled = canCreate; + if (SoapInspectorUtils.DrawCallToActionButton("Create", SoapInspectorUtils.ButtonSize.Medium)) + { + CreateSoapSoAtPath(_selectedType, _assetName, _path, _tagIndex); + _selectedType = null; + _assetName = string.Empty; + _tagIndex = 0; + _assetCreated = true; + if (_origin == EOrigin.Inspector) + editorWindow.Close(); + } + + GUI.enabled = true; + } + + private void CreateSoapSoAtPath(Type type, string name, string path, int tagIndex) + { + var scriptable = SoapEditorUtils.CreateScriptableObject(type, name, path); + var scriptableBase = (ScriptableBase)scriptable; + scriptableBase.TagIndex = tagIndex; + _onAssetCreated?.Invoke(scriptableBase); + AssetDatabase.SaveAssets(); + } + + private void ShowAssetCreatorDropdown(Action callback) + { + Vector2 dropdownSize = new Vector2(345, 270); + + PathTree typeTree = new PathTree(); + + foreach (var type in TypeCache.GetTypesWithAttribute() + .Where(t => t.IsSubclassOf(typeof(ScriptableBase)))) + { + var name = type.GetCustomAttribute().menuName; + var i = name.LastIndexOf('/'); + name = (i == -1) ? name : name.Substring(0, i + 1) + type.Name; + typeTree.AddEntry(name, type, 1); + } + + var dropdown = new TypeSelectorDropdown(new AdvancedDropdownState(), typeTree, + (s) => { callback?.Invoke(s); }) + { + DropdownSize = dropdownSize + }; + + dropdown.Show(new Rect()); + var widthOffset = (_position.width - dropdownSize.x) / 2f; + var heightOffset = (_position.height - dropdownSize.y) / 2f + 12f; + Vector2 xy = new Vector2(_position.x + widthOffset, _position.y + heightOffset); + var rect = new Rect(xy.x, xy.y, _position.width, _position.height); + + var window = + typeof(TypeSelectorDropdown) + .GetField("m_WindowInstance", BindingFlags.Instance | BindingFlags.NonPublic) + ?.GetValue(dropdown) as EditorWindow; + + window.position = rect; + } + + [MenuItem(itemName: "Assets/Create/Soap Asset Creator %&a", isValidateFunction: false, priority: -1)] + public static void SoapSearchMenu() + { + var project = + typeof(UnityEditor.Editor).Assembly.GetType("UnityEditor.ProjectBrowser"); + var projectWindow = EditorWindow.GetWindow(project); + EditorApplication.delayCall += () => + { + PopupWindow.Show(new Rect(), + new SoapAssetCreatorPopup(projectWindow.position, EOrigin.ProjectWindow)); + }; + } + + private class PathTree + { + public Dictionary> Branches { get; } = new Dictionary>(); + public T Data { get; private set; } + + public void AddEntry(string route, T data, int depth) + { + InsertRecursive(route.Split('/'), depth, data); + } + + private void InsertRecursive(string[] segments, int depth, T data) + { + if (depth >= segments.Length) + { + Data = data; + return; + } + + if (!Branches.TryGetValue(segments[depth], out PathTree subtree)) + { + subtree = new PathTree(); + Branches.Add(segments[depth], subtree); + } + + subtree.InsertRecursive(segments, depth + 1, data); + } + } + + private class TypeSelectorDropdown : AdvancedDropdown + { + private readonly PathTree _typeTree; + private readonly Action _onTypeSelected; + private readonly List _typeRegistry = new List(); + + public Vector2 DropdownSize + { + get => minimumSize; + set => minimumSize = value; + } + + public TypeSelectorDropdown(AdvancedDropdownState state, PathTree typeTree, + Action onTypeSelected) + : base(state) + { + _typeTree = typeTree; + _onTypeSelected = onTypeSelected; + } + + protected override void ItemSelected(AdvancedDropdownItem item) + { + if (item.id >= 0 && item.id < _typeRegistry.Count) + { + _onTypeSelected?.Invoke(_typeRegistry[item.id]); + } + } + + protected override AdvancedDropdownItem BuildRoot() + { + var root = new AdvancedDropdownItem("Soap Asset Type Selector"); + + foreach (KeyValuePair> branch in _typeTree.Branches) + { + PopulateDropdown(branch.Value, branch.Key, root); + } + + return root; + } + + private void PopulateDropdown(PathTree node, string label, AdvancedDropdownItem parentItem) + { + if (node.Data != null) + { + _typeRegistry.Add(node.Data); + parentItem.AddChild(new AdvancedDropdownItem(label) { id = _typeRegistry.Count - 1 }); + return; + } + + var categoryItem = new AdvancedDropdownItem(label); + foreach (KeyValuePair> branch in node.Branches) + { + PopulateDropdown(branch.Value, branch.Key, categoryItem); + } + + parentItem.AddChild(categoryItem); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator/SoapAssetCreatorPopup.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator/SoapAssetCreatorPopup.cs.meta new file mode 100644 index 000000000..018b0f6d6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapAssetCreator/SoapAssetCreatorPopup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8ff4397ad3e215040badfc49bd51951e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator.meta new file mode 100644 index 000000000..0575fc34f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06cf2e3873263eb42ad7286392e28692 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapDictionaryCreatorPopup.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapDictionaryCreatorPopup.cs new file mode 100644 index 000000000..2e6d353de --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapDictionaryCreatorPopup.cs @@ -0,0 +1,332 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class SoapDictionaryCreatorPopup : PopupWindowContent + { + private string _dictionaryName = "ScriptableDictionaryKeyValue"; + private string _keyText = "Key"; + private string _valueText = "Value"; + private string _namespaceText = ""; + private bool _keyClass; + private bool _valueClass; + private bool _isKeyNameInvalid; + private bool _isValueNameInvalid; + private bool _isDictionaryNameInvalid; + private bool _isNamespaceInvalid; + private string _path; + private Texture[] _icons; + private int _destinationFolderIndex; + private readonly Color _validTypeColor = new Color(0.32f, 0.96f, 0.8f); + private Rect _rect; + private string ValidColorHtml => "#51ffcc"; + private string InvalidColorHtml => "#ff0000"; + + public override Vector2 GetWindowSize() + { + var dimension = new Vector2(_rect.width, _rect.height); + dimension.x = Mathf.Max(_rect.width, 400f); + return dimension; + } + + private float Width => GetWindowSize().x; + + public SoapDictionaryCreatorPopup(Rect rect) + { + _rect = rect; + _icons = new Texture[2]; + _icons[0] = EditorGUIUtility.IconContent("cs Script Icon").image; + _icons[1] = EditorGUIUtility.IconContent("Error").image; + _destinationFolderIndex = SoapEditorUtils.TypeCreatorDestinationFolderIndex; + _path = _destinationFolderIndex == 0 + ? SoapFileUtils.GetSelectedFolderPathInProjectWindow() + : SoapEditorUtils.TypeCreatorDestinationFolderPath; + } + + public override void OnGUI(Rect rect) + { + var center = SoapInspectorUtils.CenterInWindow(editorWindow.position, _rect); + center.y += 20f; + editorWindow.position = center; + SoapInspectorUtils.DrawPopUpHeader(editorWindow, "Create Scriptable Dictionary Type"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + DrawNamespace(); + GUILayout.Space(2); + DrawName(); + GUILayout.Space(2); + DrawKeyAndValueTextFields(); + GUILayout.Space(2); + DrawKeyAndValueToggles(); + GUILayout.Space(10); + EditorGUILayout.LabelField("Preview", EditorStyles.boldLabel); + SoapInspectorUtils.DrawLine(); + GUILayout.Space(2); + DrawAssetPreview(); + GUILayout.FlexibleSpace(); + DrawPath(); + GUILayout.Space(5); + DrawCreateButton(); + GUILayout.EndVertical(); + } + + private void DrawNamespace() + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isNamespaceInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + var labelStyle = new GUIStyle(GUI.skin.label); + labelStyle.normal.textColor = new Color(0.6f, 0.6f, 0.6f, 1f); + EditorGUILayout.LabelField("Namespace:", labelStyle, GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isNamespaceInvalid ? Color.red : Color.white; + _namespaceText = EditorGUILayout.TextField(_namespaceText, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isNamespaceInvalid = !SoapEditorUtils.IsNamespaceValid(_namespaceText); + } + EditorGUILayout.EndHorizontal(); + } + + private void DrawName() + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isDictionaryNameInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + EditorGUILayout.LabelField("Name:", GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isDictionaryNameInvalid ? Color.red : Color.white; + _dictionaryName = EditorGUILayout.TextField(_dictionaryName, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isDictionaryNameInvalid = !SoapEditorUtils.IsTypeNameValid(_dictionaryName); + } + EditorGUILayout.EndHorizontal(); + } + + private void DrawKeyAndValueTextFields() + { + EditorGUILayout.BeginHorizontal(); + //Draw Key Text Field + { + Texture2D texture = new Texture2D(0, 0); + var icon = _isKeyNameInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + EditorGUILayout.LabelField("Key:", GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isKeyNameInvalid ? Color.red : Color.white; + _keyText = EditorGUILayout.TextField(_keyText, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isKeyNameInvalid = !SoapEditorUtils.IsTypeNameValid(_keyText); + } + } + GUILayout.Space(2); + + //Draw Value Text Field + { + Texture2D texture = new Texture2D(0, 0); + var icon = _isValueNameInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + EditorGUILayout.LabelField("Value:", GUILayout.Width(50)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isValueNameInvalid ? Color.red : Color.white; + _valueText = EditorGUILayout.TextField(_valueText, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isValueNameInvalid = !SoapEditorUtils.IsTypeNameValid(_valueText); + } + } + EditorGUILayout.EndHorizontal(); + } + + private void DrawKeyAndValueToggles() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Create Classes?", GUILayout.Width(96)); + + if (SoapUtils.CanBeCreated(_keyText)) + { + var capitalizedType = $"{_keyText.CapitalizeFirstLetter()}"; + DrawToggle(ref _keyClass, $"{capitalizedType}", _isKeyNameInvalid); + } + else + { + GUILayout.Space(Width / 3 + 18f + 6); + } + + GUILayout.Space(Width / 13); + GUILayout.FlexibleSpace(); + if (SoapUtils.CanBeCreated(_valueText)) + { + var vcapitalizedType = $"{_valueText.CapitalizeFirstLetter()}"; + DrawToggle(ref _valueClass, $"{vcapitalizedType}", _isValueNameInvalid); + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawToggle(ref bool toggleValue, string typeName, bool isValid) + { + EditorGUILayout.BeginHorizontal(); + var icon = _icons[0]; + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + GUIStyle firstStyle = new GUIStyle(GUI.skin.toggle); + var width = Width / 3f; + toggleValue = GUILayout.Toggle(toggleValue, typeName, firstStyle, GUILayout.Width(width)); + firstStyle.normal.textColor = isValid ? SoapEditorUtils.SoapColor : _validTypeColor; + EditorGUILayout.EndHorizontal(); + } + + private void DrawAssetPreview() + { + EditorGUILayout.BeginHorizontal(); + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(SoapInspectorUtils.Icons.ScriptableDictionary, style, GUILayout.Width(18), GUILayout.Height(18)); + GUIStyle firstStyle = new GUIStyle(GUI.skin.label); + firstStyle.normal.textColor = _isDictionaryNameInvalid ? Color.red : Color.white; + GUILayout.Label(_dictionaryName, firstStyle); + EditorGUILayout.EndHorizontal(); + GUILayout.Space(2f); + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(22f); + var keyColor = _isKeyNameInvalid ? InvalidColorHtml : ValidColorHtml; + var valueColor = _isValueNameInvalid ? InvalidColorHtml : ValidColorHtml; + var types = $"{_keyText} , {_valueText}"; + var classText = $"ScriptableDictionary<{types}>"; + GUIStyle secondStyle = new GUIStyle(GUI.skin.label); + secondStyle.richText = true; + secondStyle.fontSize = 11; + GUILayout.Label(classText, secondStyle); + EditorGUILayout.EndHorizontal(); + } + + private void DrawPath() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel("Destination Folder:"); + var style = new GUIStyle(EditorStyles.popup); + var options = new[] + { + "Selected in Project", + "Custom" + }; + + if (GUILayout.Button(options[_destinationFolderIndex], style)) + { + SoapInspectorUtils.ShowPathMenu(options, _destinationFolderIndex, + newTag => + { + _destinationFolderIndex = newTag; + SoapEditorUtils.TypeCreatorDestinationFolderIndex = newTag; + }); + } + + EditorGUILayout.EndHorizontal(); + + if (_destinationFolderIndex == 0) + { + GUI.enabled = false; + _path = SoapFileUtils.GetSelectedFolderPathInProjectWindow(); + EditorGUILayout.TextField($"{_path}"); + GUI.enabled = true; + } + else + { + EditorGUI.BeginChangeCheck(); + _path = EditorGUILayout.TextField(SoapEditorUtils.TypeCreatorDestinationFolderPath); + if (EditorGUI.EndChangeCheck()) + { + SoapEditorUtils.TypeCreatorDestinationFolderPath = _path; + } + } + } + + + private void DrawCreateButton() + { + GUI.enabled = !_isKeyNameInvalid && !_isNamespaceInvalid && !_isDictionaryNameInvalid && + !_isValueNameInvalid; + if (SoapInspectorUtils.DrawCallToActionButton("Create", SoapInspectorUtils.ButtonSize.Medium)) + { + var newFilePaths = new List(); + TextAsset newFile = null; + var progress = 0f; + EditorUtility.DisplayProgressBar("Progress", "Start", progress); + + if (_keyClass) + { + var templateName = "NewTypeTemplate.cs"; + if (!SoapEditorUtils.CreateClassFromTemplate(templateName, _namespaceText, _keyText, _path, + out newFile)) + { + CloseWindow(); + return; + } + } + + progress += 0.33f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + if (_valueClass) + { + if (!SoapEditorUtils.CreateClassFromTemplate("NewTypeTemplate.cs", _namespaceText, + _valueText, _path, + out newFile)) + { + CloseWindow(); + return; + } + + newFilePaths.Add(AssetDatabase.GetAssetPath(newFile)); + } + + progress += 0.33f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + if (!SoapEditorUtils.CreateDictionaryFromTemplate("ScriptableDictionaryTemplate.cs", _namespaceText, + _dictionaryName, _keyText, _valueText, _path, out newFile)) + { + CloseWindow(); + return; + } + + newFilePaths.Add(AssetDatabase.GetAssetPath(newFile)); + + progress += 0.34f; + EditorPrefs.SetString("Soap_NewFilePaths", string.Join(";", newFilePaths)); + EditorUtility.DisplayProgressBar("Progress", "Completed!", progress); + EditorUtility.DisplayDialog("Success", $"{_dictionaryName} was created!", "OK"); + CloseWindow(false); + AssetDatabase.SaveAssets(); + EditorGUIUtility.PingObject(newFile); + } + + GUI.enabled = true; + } + + private void CloseWindow(bool hasError = true) + { + EditorUtility.ClearProgressBar(); + editorWindow.Close(); + if (hasError) + EditorUtility.DisplayDialog("Error", $"Failed to create {_dictionaryName}", "OK"); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapDictionaryCreatorPopup.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapDictionaryCreatorPopup.cs.meta new file mode 100644 index 000000000..625cff454 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapDictionaryCreatorPopup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7ba1aa33a4066dc43a68722483ed4312 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapSingletonCreatorPopup.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapSingletonCreatorPopup.cs new file mode 100644 index 000000000..2859eb86a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapSingletonCreatorPopup.cs @@ -0,0 +1,290 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class SoapSingletonCreatorPopup : PopupWindowContent + { + private string _className = "NewClass"; + private string _namespaceText = ""; + private bool _isClassNameInvalid; + private bool _isNamespaceInvalid; + private bool _isResourcePathValid = true; + private bool _autoCreateInstance = true; + private string _path; + private string _resourcePath = "Assets/Resources"; + private Texture[] _icons; + private int _destinationFolderIndex; + private Rect _rect; + private string ValidColorHtml => "#51ffcc"; + private string InvalidColorHtml => "#ff0000"; + private Action _onClassCreated; + + public override Vector2 GetWindowSize() + { + var dimension = new Vector2(_rect.width, _rect.height); + dimension.x = Mathf.Max(_rect.width, 400f); + return dimension; + } + + public SoapSingletonCreatorPopup(Rect rect) + { + _rect = rect; + _icons = new Texture[2]; + _icons[0] = EditorGUIUtility.IconContent("cs Script Icon").image; + _icons[1] = EditorGUIUtility.IconContent("Error").image; + _destinationFolderIndex = SoapEditorUtils.TypeCreatorDestinationFolderIndex; + _path = _destinationFolderIndex == 0 + ? SoapFileUtils.GetSelectedFolderPathInProjectWindow() + : SoapEditorUtils.TypeCreatorDestinationFolderPath; + } + + public override void OnGUI(Rect rect) + { + var center = SoapInspectorUtils.CenterInWindow(editorWindow.position, _rect); + center.y += 20f; + editorWindow.position = center; + SoapInspectorUtils.DrawPopUpHeader(editorWindow, "Create Scriptable Singleton Type"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + DrawNamespace(); + GUILayout.Space(2); + DrawName(); + GUILayout.Space(10); + DrawAutoInstanceCreationToggle(); + GUILayout.Space(5f); + EditorGUILayout.LabelField("Preview", EditorStyles.boldLabel); + SoapInspectorUtils.DrawLine(); + GUILayout.Space(2); + DrawAssetPreview(); + GUILayout.FlexibleSpace(); + DrawPath(); + GUILayout.Space(5); + DrawCreateButton(); + GUILayout.EndVertical(); + } + + private void DrawNamespace() + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isNamespaceInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + var labelStyle = new GUIStyle(GUI.skin.label); + labelStyle.normal.textColor = new Color(0.6f, 0.6f, 0.6f, 1f); + EditorGUILayout.LabelField("Namespace:", labelStyle, GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isNamespaceInvalid ? Color.red : Color.white; + _namespaceText = EditorGUILayout.TextField(_namespaceText, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isNamespaceInvalid = !SoapEditorUtils.IsNamespaceValid(_namespaceText); + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawName() + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isClassNameInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + EditorGUILayout.LabelField("Type Name:", GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isClassNameInvalid ? Color.red : Color.white; + _className = EditorGUILayout.TextField(_className, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isClassNameInvalid = !SoapEditorUtils.IsTypeNameValid(_className) + || !SoapUtils.CanBeCreated(_className); + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawAutoInstanceCreationToggle() + { + GUIStyle firstStyle = new GUIStyle(GUI.skin.toggle); + var toggleLabel = "Create Instance at Resource Path"; + _autoCreateInstance = + GUILayout.Toggle(_autoCreateInstance, toggleLabel, firstStyle); + if (_autoCreateInstance) + { + GUILayout.Space(2f); + DrawResourcePath(); + } + } + + private void DrawResourcePath() + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isResourcePathValid ? texture : _icons[1]; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + var labelStyle = new GUIStyle(GUI.skin.label); + labelStyle.normal.textColor = new Color(0.6f, 0.6f, 0.6f, 1f); + EditorGUILayout.LabelField("Resources Path:", labelStyle, GUILayout.Width(95)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isResourcePathValid ? Color.white : Color.red; + _resourcePath = EditorGUILayout.TextField(_resourcePath, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isResourcePathValid = SoapEditorUtils.IsResourcePathValid(_resourcePath); + } + + EditorGUILayout.EndHorizontal(); + + if (!_isResourcePathValid) + { + var helpStyle = new GUIStyle(EditorStyles.wordWrappedMiniLabel); + helpStyle.wordWrap = true; + EditorGUILayout.LabelField( + "Invalid resource path. It should contain 'Resources' and be within the Assets folder.", + helpStyle); + } + } + + private void DrawAssetPreview() + { + EditorGUILayout.BeginHorizontal(); + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(SoapInspectorUtils.Icons.ScriptableSingleton, style, GUILayout.Width(18), + GUILayout.Height(18)); + GUIStyle firstStyle = new GUIStyle(GUI.skin.label); + firstStyle.normal.textColor = _isClassNameInvalid ? Color.red : Color.white; + GUILayout.Label(_className, firstStyle); + EditorGUILayout.EndHorizontal(); + GUILayout.Space(2f); + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(22f); + var color = _isClassNameInvalid ? InvalidColorHtml : ValidColorHtml; + var typeLabel = $"{_className.CapitalizeFirstLetter()}"; + var classText = $"ScriptableSingleton<{typeLabel}>"; + GUIStyle secondStyle = new GUIStyle(GUI.skin.label); + secondStyle.richText = true; + secondStyle.fontSize = 11; + GUILayout.Label(classText, secondStyle); + EditorGUILayout.EndHorizontal(); + } + + private void DrawPath() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel("Destination Folder:"); + var style = new GUIStyle(EditorStyles.popup); + var options = new[] + { + "Selected in Project", + "Custom" + }; + + if (GUILayout.Button(options[_destinationFolderIndex], style)) + { + SoapInspectorUtils.ShowPathMenu(options, _destinationFolderIndex, + newTag => + { + _destinationFolderIndex = newTag; + SoapEditorUtils.TypeCreatorDestinationFolderIndex = newTag; + }); + } + + EditorGUILayout.EndHorizontal(); + + if (_destinationFolderIndex == 0) + { + GUI.enabled = false; + _path = SoapFileUtils.GetSelectedFolderPathInProjectWindow(); + EditorGUILayout.TextField($"{_path}"); + GUI.enabled = true; + } + else + { + EditorGUI.BeginChangeCheck(); + _path = EditorGUILayout.TextField(SoapEditorUtils.TypeCreatorDestinationFolderPath); + if (EditorGUI.EndChangeCheck()) + { + SoapEditorUtils.TypeCreatorDestinationFolderPath = _path; + } + } + } + + private void DrawCreateButton() + { + GUI.enabled = !_isNamespaceInvalid && !_isClassNameInvalid && SoapUtils.CanBeCreated(_className); + if (SoapInspectorUtils.DrawCallToActionButton("Create", SoapInspectorUtils.ButtonSize.Medium)) + { + var newFilePaths = new List(); + TextAsset newFile = null; + var progress = 0f; + EditorUtility.DisplayProgressBar("Progress", "Start", progress); + + progress += 0.33f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + if (!SoapEditorUtils.CreateClassFromTemplate("ScriptableSingletonTemplate.cs", _namespaceText, + _className, _path, out newFile, false, true)) + { + CloseWindow(); + return; + } + + newFilePaths.Add(AssetDatabase.GetAssetPath(newFile)); + progress += 0.64f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + StoreSingletonInfoToSessionState(); + EditorPrefs.SetString("Soap_NewFilePaths", string.Join(";", newFilePaths)); + EditorUtility.DisplayProgressBar("Progress", "Completed!", progress); + EditorUtility.DisplayDialog("Success", $"{_className} was created!", "OK"); + CloseWindow(false); + EditorGUIUtility.PingObject(newFile); + } + + GUI.enabled = true; + } + + private void StoreSingletonInfoToSessionState() + { + if (!_autoCreateInstance) + { + SoapEditorUtils.SingletonInstanceInfo = string.Empty; + return; + } + + var singletonInfo = new SingletonInstanceInfo + { + ClassName = _className, + ResourcesPath = _resourcePath + }; + + var json = JsonUtility.ToJson(singletonInfo); + SoapEditorUtils.SingletonInstanceInfo = json; + } + + private void CloseWindow(bool hasError = true) + { + EditorUtility.ClearProgressBar(); + editorWindow.Close(); + if (hasError) + EditorUtility.DisplayDialog("Error", $"Failed to create {_className}", "OK"); + } + } + + [Serializable] + public struct SingletonInstanceInfo + { + public string ClassName; + public string ResourcesPath; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapSingletonCreatorPopup.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapSingletonCreatorPopup.cs.meta new file mode 100644 index 000000000..d2d5a9738 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapSingletonCreatorPopup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b0b14bdc194d094eb5c2fb9c5f1b9bd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapTypeCreatorWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapTypeCreatorWindow.cs new file mode 100644 index 000000000..97ab34e5d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapTypeCreatorWindow.cs @@ -0,0 +1,458 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class SoapTypeCreatorWindow : EditorWindow + { + private string _typeText = "NewClass"; + private string _namespaceText = ""; + private bool _baseClass; + private bool _monoBehaviour; + private bool _variable; + private bool _event; + private bool _eventListener; + private bool _list; + private bool _enum; + private bool _save; + private bool _isTypeNameInvalid; + private bool _isNamespaceInvalid; + private string _path; + private Texture[] _icons; + private int _destinationFolderIndex; + private readonly string[] _destinationFolderOptions = { "Selected in Project", "Custom" }; + private readonly Color _validTypeColor = new Color(0.32f, 0.96f, 0.8f); + + private bool AllowMonoBehaviour => !_save; + + [MenuItem("Window/Obvious Game/Soap/Soap Type Creator")] + public new static void Show() + { + var window = GetWindow(typeof(SceneView)); + window.titleContent = new GUIContent("Soap Type Creator", Resources.Load("Icons/icon_soapLogo")); + } + + [MenuItem("Tools/Obvious Game/Soap/Soap Type Creator %#t")] + private static void OpenSoapTypeCreator() => Show(); + + private void OnEnable() + { + _icons = new Texture[2]; + _icons[0] = EditorGUIUtility.IconContent("cs Script Icon").image; + _icons[1] = EditorGUIUtility.IconContent("Error").image; + _destinationFolderIndex = SoapEditorUtils.TypeCreatorDestinationFolderIndex; + _path = _destinationFolderIndex == 0 + ? SoapFileUtils.GetSelectedFolderPathInProjectWindow() + : SoapEditorUtils.TypeCreatorDestinationFolderPath; + _namespaceText = SoapEditorUtils.TypeCreatorNamespace; + AssemblyReloadEvents.afterAssemblyReload += OnAfterAssemblyReloaded; + } + + private void OnDisable() + { + AssemblyReloadEvents.afterAssemblyReload -= OnAfterAssemblyReloaded; + } + + private void OnGUI() + { + EditorGUILayout.LabelField("Create new Type(s)", SoapInspectorUtils.Styles.Header); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + DrawTextFields(); + GUILayout.Space(15); + DrawTypeToggles(); + GUILayout.FlexibleSpace(); + DrawPath(); + GUILayout.Space(5); + DrawButtons(); + GUILayout.EndVertical(); + } + + private void DrawTextFields() + { + //Draw Namespace Text Field + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isNamespaceInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + var labelStyle = new GUIStyle(GUI.skin.label); + labelStyle.normal.textColor = new Color(0.6f, 0.6f, 0.6f, 1f); + EditorGUILayout.LabelField("Namespace:", labelStyle, GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isNamespaceInvalid ? Color.red : Color.white; + _namespaceText = EditorGUILayout.TextField(_namespaceText, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isNamespaceInvalid = !SoapEditorUtils.IsNamespaceValid(_namespaceText); + SoapEditorUtils.TypeCreatorNamespace = _namespaceText; + } + + EditorGUILayout.EndHorizontal(); + } + + //Draw TypeName Text Field + { + EditorGUILayout.BeginHorizontal(); + Texture2D texture = new Texture2D(0, 0); + var icon = _isTypeNameInvalid ? _icons[1] : texture; + var style = new GUIStyle(GUIStyle.none); + style.margin = new RectOffset(10, 0, 5, 0); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + EditorGUILayout.LabelField("Type Name:", GUILayout.Width(75)); + EditorGUI.BeginChangeCheck(); + var textStyle = new GUIStyle(GUI.skin.textField); + textStyle.focused.textColor = _isTypeNameInvalid ? Color.red : Color.white; + _typeText = EditorGUILayout.TextField(_typeText, textStyle); + if (EditorGUI.EndChangeCheck()) + { + _isTypeNameInvalid = !SoapEditorUtils.IsTypeNameValid(_typeText); + } + + EditorGUILayout.EndHorizontal(); + } + } + + + private void DrawTypeToggles() + { + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(10); + EditorGUILayout.BeginVertical(); + EditorGUILayout.BeginHorizontal(); + + var capitalizedType = $"{_typeText.CapitalizeFirstLetter()}"; + if (_enum) + { + GUI.enabled = false; + _baseClass = false; + _variable = false; + _event = false; + _eventListener = false; + _list = false; + DrawCoreToggles(false); + _save = false; + GUI.enabled = true; + } + else + { + DrawCoreToggles(true); + } + + GUILayout.Space(5); + GUI.enabled = true; + DrawToggle(ref _enum, "ScriptableEnum", $"{capitalizedType}", + SoapInspectorUtils.Icons.ScriptableEnum); + GUI.enabled = true; + GUILayout.Space(5); + DrawDictionaryShortcut(); + GUILayout.Space(5); + DrawSingletonShortcut(); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndHorizontal(); + } + + private void DrawCoreToggles(bool allowEnable) + { + var capitalizedType = $"{_typeText.CapitalizeFirstLetter()}"; + if (SoapUtils.CanBeCreated(_typeText)) + { + DrawToggle(ref _baseClass, $"{capitalizedType}", "", _icons[0], true, 140); + if (!AllowMonoBehaviour) + _monoBehaviour = false; + if (_baseClass) + { + GUI.enabled = AllowMonoBehaviour; + _monoBehaviour = GUILayout.Toggle(_monoBehaviour, "MonoBehaviour"); + GUI.enabled = true; + } + } + + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + GUILayout.Space(10); + EditorGUILayout.LabelField("Soap Classes", EditorStyles.boldLabel); + SoapInspectorUtils.DrawLine(); + GUILayout.Space(2); + DrawToggle(ref _variable, $"{capitalizedType}", "Variable", + SoapInspectorUtils.Icons.ScriptableVariable, true, 140); + GUILayout.Space(5); + DrawToggle(ref _event, "ScriptableEvent", $"{capitalizedType}", + SoapInspectorUtils.Icons.ScriptableEvent); + GUILayout.Space(5); + if (!_event) + _eventListener = false; + GUI.enabled = _event; + DrawToggle(ref _eventListener, "EventListener", $"{capitalizedType}", + SoapInspectorUtils.Icons.EventListener); + GUI.enabled = allowEnable; // has to be there to reenable the list toggle + GUILayout.Space(5); + DrawToggle(ref _list, "ScriptableList", $"{capitalizedType}", + SoapInspectorUtils.Icons.ScriptableList); + GUILayout.Space(5); + DrawToggle(ref _save, "ScriptableSave", $"{capitalizedType}", + SoapInspectorUtils.Icons.ScriptableSave); + } + + private void DrawToggle(ref bool toggleValue, string typeName, string second, Texture icon, + bool isFirstRed = false, int maxWidth = 200) + { + EditorGUILayout.BeginHorizontal(); + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(icon, style, GUILayout.Width(18), GUILayout.Height(18)); + toggleValue = GUILayout.Toggle(toggleValue, "", GUILayout.Width(maxWidth)); + GUIStyle firstStyle = new GUIStyle(GUI.skin.label); + firstStyle.padding.left = 15 - maxWidth; + if (isFirstRed) + firstStyle.normal.textColor = _isTypeNameInvalid ? SoapEditorUtils.SoapColor : _validTypeColor; + GUILayout.Label(typeName, firstStyle); + GUIStyle secondStyle = new GUIStyle(GUI.skin.label); + secondStyle.padding.left = -6; + secondStyle.clipping = TextClipping.Clip; + if (!isFirstRed) + secondStyle.normal.textColor = _isTypeNameInvalid ? SoapEditorUtils.SoapColor : _validTypeColor; + GUILayout.Label(second, secondStyle); + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + } + + private void DrawDictionaryShortcut() + { + EditorGUILayout.BeginHorizontal(); + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(SoapInspectorUtils.Icons.ScriptableDictionary, style, GUILayout.Width(18), + GUILayout.Height(18)); + var width = 155; + if (GUILayout.Button("ScriptableDictionary", GUILayout.Width(width))) + { + PopupWindow.Show(position, new SoapDictionaryCreatorPopup(position)); + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawSingletonShortcut() + { + EditorGUILayout.BeginHorizontal(); + var style = new GUIStyle(GUIStyle.none); + GUILayout.Box(SoapInspectorUtils.Icons.ScriptableSingleton, style, GUILayout.Width(18), + GUILayout.Height(18)); + var width = 155; + if (GUILayout.Button("ScriptableSingleton", GUILayout.Width(width))) + { + PopupWindow.Show(position, new SoapSingletonCreatorPopup(position)); + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawPath() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel("Destination Folder:"); + var style = new GUIStyle(EditorStyles.popup); + if (GUILayout.Button(_destinationFolderOptions[_destinationFolderIndex], style)) + { + SoapInspectorUtils.ShowPathMenu(_destinationFolderOptions, _destinationFolderIndex, + newTag => + { + _destinationFolderIndex = newTag; + SoapEditorUtils.TypeCreatorDestinationFolderIndex = newTag; + }); + } + + EditorGUILayout.EndHorizontal(); + + if (_destinationFolderIndex == 0) + { + GUI.enabled = false; + _path = SoapFileUtils.GetSelectedFolderPathInProjectWindow(); + EditorGUILayout.TextField($"{_path}"); + GUI.enabled = true; + } + else + { + EditorGUI.BeginChangeCheck(); + _path = EditorGUILayout.TextField(SoapEditorUtils.TypeCreatorDestinationFolderPath); + if (EditorGUI.EndChangeCheck()) + { + SoapEditorUtils.TypeCreatorDestinationFolderPath = _path; + } + } + } + + + private void DrawButtons() + { + GUI.enabled = !_isTypeNameInvalid && !_isNamespaceInvalid && HasAnythingSelected(); + if (SoapInspectorUtils.DrawCallToActionButton("Create", SoapInspectorUtils.ButtonSize.Medium)) + { + if (!SoapEditorUtils.IsTypeNameValid(_typeText)) + return; + + var newFilePaths = new List(); + var isIntrinsicType = SoapUtils.IsIntrinsicType(_typeText); + TextAsset newFile = null; + var progress = 0f; + EditorUtility.DisplayProgressBar("Progress", "Start", progress); + + if (_baseClass && !isIntrinsicType) + { + var templateName = _monoBehaviour ? "NewTypeMonoTemplate.cs" : "NewTypeTemplate.cs"; + newFile = TryCreateNewFile(templateName, _namespaceText, _typeText, + _path, false, false); + } + + progress += 0.2f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + if (_variable) + { + newFile = TryCreateNewFile("ScriptableVariableTemplate.cs", _namespaceText, _typeText, + _path, isIntrinsicType, true, newFilePaths); + } + + progress += 0.2f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + if (_event) + { + newFile = TryCreateNewFile("ScriptableEventTemplate.cs", _namespaceText, _typeText, + _path, isIntrinsicType, true, newFilePaths); + } + + progress += 0.2f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + if (_eventListener) + { + newFile = TryCreateNewFile("EventListenerTemplate.cs", _namespaceText, _typeText, + _path, isIntrinsicType, true, newFilePaths); + } + + progress += 0.2f; + EditorUtility.DisplayProgressBar("Progress", "Generating...", progress); + + if (_list) + { + newFile = TryCreateNewFile("ScriptableListTemplate.cs", _namespaceText, _typeText, + _path, isIntrinsicType, true, newFilePaths); + } + + if (_enum && !isIntrinsicType) + { + newFile = TryCreateNewFile("ScriptableEnumTemplate.cs", _namespaceText, _typeText, + _path, false, true, newFilePaths); + } + + if (_save && !isIntrinsicType) + { + newFile = TryCreateNewFile("ScriptableSaveTemplate.cs", _namespaceText, _typeText, + _path, false, true, newFilePaths); + } + + progress += 0.2f; + EditorPrefs.SetString("Soap_NewFilePaths", string.Join(";", newFilePaths)); + EditorUtility.DisplayProgressBar("Progress", "Completed!", progress); + EditorUtility.DisplayDialog("Success", $"{_typeText} was created!", "OK"); + Clear(); + EditorGUIUtility.PingObject(newFile); + } + + GUI.enabled = true; + } + + private TextAsset TryCreateNewFile(string fileName, string nameSpace, string type, string path, + bool isIntrisicType, bool isSoapClass, List newFilePaths = null) + { + if (!SoapEditorUtils.CreateClassFromTemplate(fileName, nameSpace, type, path, + out var newFile, isIntrisicType, isSoapClass)) + { + CloseWindow(); + return null; + } + + if (newFilePaths != null) + newFilePaths.Add(AssetDatabase.GetAssetPath(newFile)); + return newFile; + } + + private void OnAfterAssemblyReloaded() + { + //Try to assign Icon + Create Instance if needed + if (EditorPrefs.HasKey("Soap_NewFilePaths")) + { + var savedPaths = EditorPrefs.GetString("Soap_NewFilePaths"); + var filePaths = savedPaths.Split(';').ToList(); + foreach (var path in filePaths) + { + var monoImporter = AssetImporter.GetAtPath(path) as MonoImporter; + //Compilation Error - Abort ! + if (monoImporter == null) + { + EditorPrefs.DeleteKey("Soap_NewFilePaths"); + AssemblyReloadEvents.afterAssemblyReload -= OnAfterAssemblyReloaded; + break; + } + + var monoScript = monoImporter.GetScript(); + SoapInspectorUtils.Icons.TrySetSoapIcon(monoScript, monoImporter); + + //Check if we need to create an instance of a ScriptableSingleton + var singletonInstance = SoapEditorUtils.SingletonInstanceInfo; + try + { + var singletonInstanceInfo = JsonUtility.FromJson(singletonInstance); + var type = monoScript.GetClass(); + var className = singletonInstanceInfo.ClassName; + var resourcePath = singletonInstanceInfo.ResourcesPath; + var instance = SoapEditorUtils.CreateScriptableObject(type, className, resourcePath); + AssetDatabase.SaveAssets(); + EditorGUIUtility.PingObject(instance); + SoapEditorUtils.SingletonInstanceInfo = string.Empty; //reset so we don't try to create it again + } + catch (Exception) + { + //Nothing to create + } + } + + EditorPrefs.DeleteKey("Soap_NewFilePaths"); + } + } + + private bool HasAnythingSelected() + { + return _variable || _event || _eventListener || _list || _enum || _save; + } + + private void Clear() + { + _typeText = "NewClass"; + _baseClass = false; + _monoBehaviour = false; + _variable = false; + _event = false; + _eventListener = false; + _list = false; + _enum = false; + _save = false; + _isTypeNameInvalid = false; + _isNamespaceInvalid = false; + EditorUtility.ClearProgressBar(); + } + + private void CloseWindow(bool hasError = true) + { + Clear(); + Close(); + if (hasError) + EditorUtility.DisplayDialog("Error", $"Failed to create {_typeText}", "OK"); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapTypeCreatorWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapTypeCreatorWindow.cs.meta new file mode 100644 index 000000000..e676a1188 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapTypeCreator/SoapTypeCreatorWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea89485b01e211b469ea3247ac7a6531 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow.meta new file mode 100644 index 000000000..efe0d9d67 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f35fec33f2ed5c24cb95a4bb5c3bbeca +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapPreferences.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapPreferences.cs new file mode 100644 index 000000000..7e7eae7a2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapPreferences.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + public static class SoapPreferences + { + [SettingsProvider] + public static SettingsProvider CreateSoapPreferencesProvider() + { + var soapSettingsWindow = new SoapWindowSettings(null); + + // Create the SettingsProvider with a path and a method to draw the GUI + var provider = new SettingsProvider("Preferences/Soap", SettingsScope.User) + { + label = "Soap", + + // Define the GUI logic inside the OnGUI delegate + guiHandler = (searchContext) => { soapSettingsWindow.Draw(); }, + + // Define keywords to help search for this setting + keywords = new HashSet(new[] + { + "Soap", "Settings" + }) + }; + return provider; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapPreferences.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapPreferences.cs.meta new file mode 100644 index 000000000..554d8b4ae --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapPreferences.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 61b52bb7847c4064ea2848139e212728 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindow.cs new file mode 100644 index 000000000..3d13342ed --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindow.cs @@ -0,0 +1,379 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class SoapWindow : EditorWindow + { + private Texture[] _icons; + private TextAsset[] _texts; + private GUIStyle _bgStyle; + private GUISkin _skin; + private readonly List _leftButtons = new List(); + private Action _onCategoryButtonClicked; + private CategoryButton _currentCategoryButton; + private SoapWindowSettings _soapWindowSettings; + + private string HeaderTitle => $" SOAP - Version {Version}"; + private const string Version = "3.6.1"; + private const string DocURL = "https://obvious-game.gitbook.io/soap"; + private const string SceneDocURL = "https://obvious-game.gitbook.io/soap/scene-documentation/"; + private const string DiscordURL = "https://discord.gg/CVhCNDbxF5"; + + private const string StoreURL = "https://assetstore.unity.com/packages/tools/utilities/soap-scriptableobject-architecture-pattern-232107#reviews"; + + private const string YoutubeURL = "https://www.youtube.com/playlist?list=PLSHqi2dTiNGCncSOksACfJChpfPa6qz9w"; + + private readonly string[] _sceneNames = + { + "1_ScriptableVariables", "2_Bindings", "3_ScriptableLists", "4_ScriptableEvents", "5_ScriptableSaves", + "6_ScriptableEnums", "7_ScriptableSubAssets", "8_RuntimeVariables", "9_ScriptableDictionaries", + "10_ScriptableSingletons" + }; + + [MenuItem("Window/Obvious Game/Soap/Soap Window", priority = 0)] + public static void Open() + { + var window = GetWindow(typeof(SoapWindow), true, "Soap Window"); + window.minSize = new Vector2(650, 520); + window.maxSize = new Vector2(650, 520); + window.Show(); + } + + private void OnEnable() + { + LoadAssets(); + SetUpCategoryButtons(); + _skin = Resources.Load("GUISkins/SoapWizardGUISkin"); + _soapWindowSettings = new SoapWindowSettings(this); + _bgStyle = new GUIStyle(GUIStyle.none); + } + + private void LoadAssets() + { + _icons = new Texture[10]; + _icons[0] = Resources.Load("Icons/icon_discord"); + _icons[1] = Resources.Load("Icons/icon_youtube"); + _icons[2] = EditorGUIUtility.IconContent("SceneAsset Icon").image; + _icons[3] = Resources.Load("Icons/icon_documentation"); + _icons[4] = EditorGUIUtility.IconContent("UnityLogoLarge").image; + _icons[5] = EditorGUIUtility.IconContent("SceneViewTools").image; + _icons[6] = EditorGUIUtility.IconContent("cs Script Icon").image; + _icons[7] = Resources.Load("Icons/icon_docs"); + _icons[8] = Resources.Load("Icons/icon_soapLogo"); + _icons[9] = Resources.Load("Icons/icon_obviousLogo"); + _texts = new TextAsset[_sceneNames.Length]; + for (int i = 0; i < _texts.Length; i++) + _texts[i] = Resources.Load($"Texts/{_sceneNames[i]}_Text"); + } + + private void SetUpCategoryButtons() + { + //General + var gettingStarted = new CategoryButton + { Name = "Getting Started", OnClick = DrawGettingStarted, GroupName = "General" }; + _leftButtons.Add(gettingStarted); + var settingsButton = new CategoryButton { Name = "Settings", OnClick = DrawSettings }; + _leftButtons.Add(settingsButton); + + //Examples Scenes + for (int i = 0; i < _texts.Length; i++) + { + var group = i == 0 ? "Examples Scenes" : string.Empty; + var groupIcon = i == 0 ? _icons[2] : null; + var index = i; + var scene = new CategoryButton + { + Name = _sceneNames[i], OnClick = () => DrawScene(index), GroupName = group, GroupIcon = groupIcon + }; + _leftButtons.Add(scene); + } + + //Tools + var soapWizard = new CategoryButton + { Name = "Soap Wizard", OnClick = DrawSoapWizard, GroupName = "Tools", GroupIcon = _icons[5] }; + _leftButtons.Add(soapWizard); + var soapTypeCreator = new CategoryButton + { Name = "Soap Type Creator", OnClick = DrawSoapTypeCreator }; + _leftButtons.Add(soapTypeCreator); + var eventsDebugWindow = new CategoryButton + { Name = "Events Debug Window", OnClick = DrawEventsDebugWindow }; + _leftButtons.Add(eventsDebugWindow); + + //Select last category + var lastCategory = SoapEditorUtils.WindowLastCategory; + var button = string.IsNullOrEmpty(lastCategory) + ? _leftButtons.FirstOrDefault(b => b.Name == gettingStarted.Name) + : _leftButtons.FirstOrDefault(b => b.Name == lastCategory); + SelectCategory(button); + } + + private void OnGUI() + { + DrawHeader(); + GUILayout.Space(2); + DrawLinkButtons(); + SoapInspectorUtils.DrawLine(2); + GUILayout.Space(2); + EditorGUILayout.BeginHorizontal(); + DrawLeftPanel(); + DrawRightPanel(); + EditorGUILayout.EndHorizontal(); + DrawFooter(); + } + + private void DrawHeader() + { + _bgStyle.normal.background = SoapInspectorUtils.CreateTexture(SoapEditorUtils.SoapColor); + GUILayout.BeginVertical(_bgStyle); + GUILayout.BeginHorizontal(); + GUILayout.BeginHorizontal(); + var iconStyle = new GUIStyle(GUIStyle.none); + iconStyle.margin = new RectOffset(5, 0, 0, 0); + GUILayout.Box(_icons[8], iconStyle, GUILayout.Width(60), GUILayout.Height(60)); + + var titleStyle = _skin.customStyles.ToList().Find(x => x.name == "title"); + EditorGUILayout.LabelField(HeaderTitle, titleStyle); + + GUILayout.EndHorizontal(); + GUILayout.FlexibleSpace(); + var copyrightStyle = _skin.customStyles.ToList().Find(x => x.name == "copyright"); + GUILayout.Label("© 2025 Obvious Game", copyrightStyle); + iconStyle.padding = new RectOffset(0, 1, 35, 1); + GUILayout.Box(_icons[9], iconStyle, GUILayout.Width(25), GUILayout.Height(60)); + GUILayout.EndHorizontal(); + GUILayout.EndVertical(); + } + + private void DrawLinkButtons() + { + GUILayout.BeginHorizontal(); + var buttonWidth = position.width / 4f; + + var guiContent = new GUIContent("Documentation", _icons[7]); + if (GUILayout.Button(guiContent, GUILayout.MaxWidth(buttonWidth), GUILayout.MaxHeight(20f))) + Application.OpenURL(DocURL); + + guiContent = new GUIContent("Discord", _icons[0]); + if (GUILayout.Button(guiContent, GUILayout.MaxWidth(buttonWidth), GUILayout.MaxHeight(20f))) + Application.OpenURL(DiscordURL); + + guiContent = new GUIContent("Asset Store", _icons[4]); + if (GUILayout.Button(guiContent, GUILayout.MaxWidth(buttonWidth), GUILayout.MaxHeight(20f))) + Application.OpenURL(StoreURL); + + guiContent = new GUIContent("Youtube", _icons[1]); + if (GUILayout.Button(guiContent, GUILayout.MaxWidth(buttonWidth), GUILayout.MaxHeight(20f))) + Application.OpenURL(YoutubeURL); + + GUILayout.EndHorizontal(); + } + + private void DrawLeftPanel() + { + EditorGUILayout.BeginVertical("box", GUILayout.MaxWidth(150f), GUILayout.ExpandHeight(true)); + + var index = 0; + foreach (var categoryButton in _leftButtons) + { + if (!string.IsNullOrEmpty(categoryButton.GroupName)) + { + GUILayout.Space(index == 0 ? 0 : 10f); + if (categoryButton.GroupIcon != null) + { + var guiStyle = new GUIStyle(GUI.skin.label); + guiStyle.alignment = TextAnchor.MiddleLeft; + guiStyle.imagePosition = ImagePosition.ImageLeft; + guiStyle.fixedWidth = 150f; + GUILayout.Label(new GUIContent(categoryButton.GroupName, categoryButton.GroupIcon), guiStyle, + GUILayout.MaxHeight(20f)); + } + else + { + EditorGUILayout.LabelField(categoryButton.GroupName, GUILayout.MaxWidth(150)); + } + } + + if (GUILayout.Button(categoryButton.Name)) + SelectCategory(categoryButton); + index++; + } + + EditorGUILayout.EndVertical(); + } + + private string GetScenePath(string sceneName) + { + var guid = AssetDatabase.FindAssets("t:Scene " + sceneName).FirstOrDefault(); + return guid != null ? AssetDatabase.GUIDToAssetPath(guid) : null; + } + + private string GetSoapUserGuidePath() + { + var guid = AssetDatabase.FindAssets("Soap User Guide").FirstOrDefault(); + return guid != null ? AssetDatabase.GUIDToAssetPath(guid) : null; + } + + private void DrawRightPanel() + { + if (_onCategoryButtonClicked == null) + return; + EditorGUILayout.BeginVertical(); + GUILayout.Space(5f); + EditorGUILayout.LabelField(_currentCategoryButton.Name, EditorStyles.boldLabel); + _onCategoryButtonClicked?.Invoke(); + EditorGUILayout.EndVertical(); + } + + private void DrawGettingStarted() + { + EditorGUILayout.LabelField( + "Thank you for purchasing Soap : Scriptable Object Architecture Pattern." + + "\nHow to get started ?", + EditorStyles.wordWrappedLabel); + + DrawGroup( + "- Read the user guide. You can learn about why to use Soap and its features.", + "User Guide", _icons[7], () => + { + // var parentFolder = Path.GetDirectoryName(GetSoapUserGuidePath()); + // var docPath = parentFolder + @"\Soap User Guide.pdf"; + Application.OpenURL(DocURL); + }); + + DrawGroup( + "- Check out the examples scenes and their documentation. They will show you practical examples of using Soap in a game.", + "Example Scenes", _icons[2], + () => SelectCategory(_leftButtons.FirstOrDefault(b => b.Name == _sceneNames[0]))); + + DrawGroup( + "- Watch the Youtube tutorials series. They will show you step-by-step how to make a Roguelite game with Soap.", + "Youtube", _icons[1], () => Application.OpenURL(YoutubeURL)); + } + + private void DrawGroup(string description, string buttonName, Texture icon, Action onButtonClick) + { + GUILayout.Space(5f); + EditorGUILayout.LabelField(description, EditorStyles.wordWrappedLabel); + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + var guiContent = new GUIContent(buttonName, icon); + if (GUILayout.Button(guiContent, GUILayout.MaxWidth(150f), GUILayout.MaxHeight(20f))) + onButtonClick?.Invoke(); + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + } + + private void DrawScene(int i) + { + var sceneName = _sceneNames[i]; + EditorGUILayout.LabelField(_texts[i].text, EditorStyles.wordWrappedLabel); + + GUILayout.Space(25f); + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(50f); + var guiContent = new GUIContent("Open Example Scene", _icons[2]); + if (GUILayout.Button(guiContent, GUILayout.MaxHeight(50), GUILayout.ExpandWidth(true))) + EditorSceneManager.OpenScene(GetScenePath(sceneName + "_Example_Scene")); + + GUILayout.Space(25f); + guiContent = new GUIContent("Open Documentation", _icons[3]); + if (GUILayout.Button(guiContent, GUILayout.MaxHeight(50), GUILayout.ExpandWidth(true))) + { + //var parentFolder = Path.GetDirectoryName(GetSoapUserGuidePath()); + //var docPath = parentFolder + $@"\Example Scenes\{sceneName}.pdf"; + var docPath = SceneDocURL + sceneName; + Application.OpenURL(docPath); + } + + GUILayout.Space(50f); + EditorGUILayout.EndHorizontal(); + } + + private void DrawSoapWizard() + { + EditorGUILayout.LabelField( + "The Soap Wizard enables you to:" + + "\n- Manage and see the value of all SOAP Scriptable Objects in one place" + + "\n- Filter all SOAP SO by tag" + + "\n- Add a Soap SO to favorite" + + "\n- Ping, rename, duplicate, delete a SO" + + "\n \n The Soap Wizard is the ultimate hub you need when using SOAP", EditorStyles.wordWrappedLabel); + GUILayout.Space(50); + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Open Soap Wizard", GUILayout.MaxHeight(50), GUILayout.MaxWidth(200))) + SoapWizardWindow.Show(); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + private void DrawSoapTypeCreator() + { + EditorGUILayout.LabelField( + "The Soap type creator enables you to create automatically your own type of SOAP scriptable objects." + + "\nEasily extend Soap and create the classes your game needs.", + EditorStyles.wordWrappedLabel); + GUILayout.Space(50); + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Open Soap Type Creator", GUILayout.MaxHeight(50), GUILayout.MaxWidth(200))) + SoapTypeCreatorWindow.Show(); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + private void DrawEventsDebugWindow() + { + EditorGUILayout.LabelField( + "If you use EventListeners and call methods from your class in the Unity Events, some IDE won't show you that the method is being used." + + "\nThe Events Debug Window allows you to search for a specific method (by name) to check from which Scriptable Event and EventListener it is called.", + EditorStyles.wordWrappedLabel); + GUILayout.Space(50); + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Open Events Debug Window", GUILayout.MaxHeight(50), GUILayout.MaxWidth(200))) + EventsDebugWindow.Show(); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + private void DrawFooter() + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUILayout.Label( + "For any suggestions or questions, please reach out on discord or by email : obviousgame.contact@gmail.com", + EditorStyles.miniLabel); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + private void SelectCategory(CategoryButton categoryButton) + { + _onCategoryButtonClicked = categoryButton.OnClick; + _currentCategoryButton = categoryButton; + SoapEditorUtils.WindowLastCategory = categoryButton.Name; + } + + private void DrawSettings() + { + if (_soapWindowSettings == null) + _soapWindowSettings = new SoapWindowSettings(this); + + _soapWindowSettings.Draw(); + } + } + + public class CategoryButton + { + public string Name; + public Action OnClick; + public string GroupName; + public Texture GroupIcon; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindow.cs.meta new file mode 100644 index 000000000..b3a957255 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e6adc934fa37ac74abcc3b855e6de642 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowInitializer.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowInitializer.cs new file mode 100644 index 000000000..a64ea7d69 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowInitializer.cs @@ -0,0 +1,23 @@ +using UnityEditor; + +namespace Obvious.Soap.Editor +{ + [InitializeOnLoad] + public class SoapWindowInitializer + { + static SoapWindowInitializer() + { + var hasShownWindow = SoapEditorUtils.HasShownWindow; + if (hasShownWindow) + return; + EditorApplication.update += OnEditorApplicationUpdate; + } + + private static void OnEditorApplicationUpdate() + { + EditorApplication.update -= OnEditorApplicationUpdate; + SoapWindow.Open(); + SoapEditorUtils.HasShownWindow = true; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowInitializer.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowInitializer.cs.meta new file mode 100644 index 000000000..751768f69 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowInitializer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d9bf2731ba92554197faeef44ee076c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowSettings.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowSettings.cs new file mode 100644 index 000000000..6089033eb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowSettings.cs @@ -0,0 +1,232 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class SoapWindowSettings + { + private FloatVariable _floatVariable; + private readonly SerializedObject _exampleClassSerializedObject; + private readonly SerializedProperty _currentHealthProperty; + private readonly Texture[] _icons; + private Vector2 _scrollPosition = Vector2.zero; + private SoapSettings _settings; + private readonly float _defaultLabelWidth = EditorGUIUtility.labelWidth; + private EditorWindow _editorWindow; + private bool _isTagsFoldoutOpen; + private bool _isPrefixFoldoutOpen; + + private static Dictionary _typeNames = new Dictionary() + { + {0, "ScriptableVariable"}, + {1, "ScriptableEvent"}, + {2, "ScriptableList"}, + {3, "ScriptableDictionary"}, + {4, "ScriptableEnum"}, + {5, "ScriptableSave"} + }; + + public SoapWindowSettings(EditorWindow editorWindow) + { + var exampleClass = ScriptableObject.CreateInstance(); + _exampleClassSerializedObject = new SerializedObject(exampleClass); + _currentHealthProperty = _exampleClassSerializedObject.FindProperty("CurrentHealth"); + _icons = new Texture[1]; + _icons[0] = EditorGUIUtility.IconContent("cs Script Icon").image; + _editorWindow = editorWindow; + } + + public void Draw() + { + EditorGUI.BeginChangeCheck(); + //Fixes weird bug with the label width + EditorGUIUtility.labelWidth = _defaultLabelWidth; + if (_settings == null) + _settings = SoapEditorUtils.GetOrCreateSoapSettings(); + EditorGUILayout.BeginVertical(); + _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition); + DrawVariableDisplayMode(); + GUILayout.Space(10); + if (_exampleClassSerializedObject != null) //can take a frame to initialize + { + DrawNamingModeOnCreation(); + } + + GUILayout.Space(10); + DrawAllowRaisingEventsInEditor(); + DrawTags(); + DrawPrefixes(); + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + if (EditorGUI.EndChangeCheck()) + { + EditorUtility.SetDirty(_settings); + AssetDatabase.SaveAssets(); + } + } + + private void DrawVariableDisplayMode() + { +#if ODIN_INSPECTOR + GUI.enabled = false; +#endif + EditorGUILayout.BeginHorizontal(); + + _settings.VariableDisplayMode = + (EVariableDisplayMode)EditorGUILayout.EnumPopup("Variable display mode", + _settings.VariableDisplayMode, GUILayout.Width(225)); + + var infoText = _settings.VariableDisplayMode == EVariableDisplayMode.Default + ? "Displays all the parameters of variables." + : "Only displays the value."; + EditorGUILayout.LabelField(infoText, EditorStyles.wordWrappedMiniLabel); + EditorGUILayout.EndHorizontal(); + +#if ODIN_INSPECTOR + GUI.enabled = true; + EditorGUILayout.HelpBox("The variable display mode cannot be changed when using Odin Inspector.", + MessageType.Warning); +#endif + } + + private void DrawNamingModeOnCreation() + { + EditorGUILayout.BeginVertical(); + + //Draw Naming Mode On Creation + EditorGUILayout.BeginHorizontal(); + _settings.NamingOnCreationMode = + (ENamingCreationMode)EditorGUILayout.EnumPopup("Creation Mode", + _settings.NamingOnCreationMode, GUILayout.Width(225)); + + var namingInfoText = _settings.NamingOnCreationMode == ENamingCreationMode.Auto + ? "Automatically create the asset and assign it a name." + : "Opens the Soap Asset Creator Popup"; + EditorGUILayout.LabelField(namingInfoText, EditorStyles.wordWrappedMiniLabel); + EditorGUILayout.EndHorizontal(); + + //Draw Create Path Mode + EditorGUILayout.BeginHorizontal(); + _settings.CreatePathMode = + (ECreatePathMode)EditorGUILayout.EnumPopup("Create Path Mode", + _settings.CreatePathMode, GUILayout.Width(225)); + + var pathInfoText = _settings.CreatePathMode == ECreatePathMode.Auto + ? "Creates the asset in the selected path of the project window." + : "Creates the asset at a custom path."; + EditorGUILayout.LabelField(pathInfoText, EditorStyles.wordWrappedMiniLabel); + EditorGUILayout.EndHorizontal(); + + //Draw Path + var labelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 40; + if (_settings.CreatePathMode == ECreatePathMode.Auto) + { + var guiStyle = new GUIStyle(EditorStyles.label); + guiStyle.fontStyle = FontStyle.Italic; + var path = SoapFileUtils.GetSelectedFolderPathInProjectWindow(); + EditorGUILayout.LabelField("Path:", $"{path}", guiStyle); + } + else + { + var path = EditorGUILayout.TextField("Path:", SoapEditorUtils.CustomCreationPath); + SoapEditorUtils.CustomCreationPath = path; + } + + EditorGUIUtility.labelWidth = labelWidth; + EditorGUILayout.EndVertical(); + + // //Example + // { + // EditorGUILayout.BeginVertical(_skin.box); + // _exampleClassSerializedObject?.Update(); + // EditorGUILayout.BeginHorizontal(); + // var guiStyle = new GUIStyle(GUIStyle.none); + // guiStyle.contentOffset = new Vector2(0, 2); + // GUILayout.Box(_icons[0], guiStyle, GUILayout.Width(18), GUILayout.Height(18)); + // GUILayout.Space(16); + // EditorGUILayout.LabelField("Example Class (Script)", EditorStyles.boldLabel); + // EditorGUILayout.EndHorizontal(); + // GUILayout.Space(2); + // SoapInspectorUtils.DrawColoredLine(1, new Color(0f, 0f, 0f, 0.2f)); + // EditorGUILayout.PropertyField(_currentHealthProperty); + // _exampleClassSerializedObject?.ApplyModifiedProperties(); + // EditorGUILayout.EndVertical(); + // } + } + + private void DrawAllowRaisingEventsInEditor() + { + EditorGUILayout.BeginHorizontal(); + _settings.RaiseEventsInEditor = (ERaiseEventInEditorMode)EditorGUILayout.EnumPopup("Raise events in editor", + _settings.RaiseEventsInEditor, GUILayout.Width(225)); + var pathInfoText = _settings.RaiseEventsInEditor == ERaiseEventInEditorMode.Disabled + ? "Prevent raising events in editor mode." + : "Allow raising events in editor mode."; + EditorGUILayout.LabelField(pathInfoText, EditorStyles.wordWrappedMiniLabel); + EditorGUILayout.EndHorizontal(); + } + + private void DrawTags() + { + _isTagsFoldoutOpen = EditorGUILayout.Foldout(_isTagsFoldoutOpen, "Tags", true); + if (_isTagsFoldoutOpen) + { + EditorGUI.indentLevel++; + for (int i = 0; i < _settings.Tags.Count; i++) + { + //indent + + GUI.enabled = i != 0; + _settings.Tags[i] = EditorGUILayout.TextField(_settings.Tags[i]); + GUI.enabled = true; + } + + if (GUILayout.Button("Edit Tags")) + { + if (_editorWindow == null) + { + Type preferences = Type.GetType("UnityEditor.PreferenceSettingsWindow,UnityEditor"); + _editorWindow = EditorWindow.GetWindow(preferences); + } + PopupWindow.Show(new Rect(), new TagPopUpWindow(_editorWindow.position)); + } + + EditorGUI.indentLevel--; + } + } + + private void DrawPrefixes() + { + _isPrefixFoldoutOpen = EditorGUILayout.Foldout(_isPrefixFoldoutOpen, "Prefixes", true); + if (_isPrefixFoldoutOpen) + { + EditorGUI.indentLevel++; + + for (int i = 0; i < _settings.Prefixes.Count; i++) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(_typeNames[i]); + var currentPrefix = _settings.Prefixes[i]; + string newValue = EditorGUILayout.TextField(currentPrefix); + if (newValue != currentPrefix) + { + _settings.SetPrefix(i, newValue); + } + + EditorGUILayout.EndHorizontal(); + } + EditorGUI.indentLevel--; + } + } + } + + [Serializable] + public class ExampleClass : ScriptableObject + { + public FloatVariable CurrentHealth; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowSettings.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowSettings.cs.meta new file mode 100644 index 000000000..64f0e9ecf --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWindow/SoapWindowSettings.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bf4fcdc8006a433aa8732db76297f69b +timeCreated: 1703081860 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard.meta new file mode 100644 index 000000000..027da05f3 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 02077aedc6170514fb016117ba03daba +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/ReferencesPopupWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/ReferencesPopupWindow.cs new file mode 100644 index 000000000..01bb584a2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/ReferencesPopupWindow.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; +using Button = UnityEngine.UI.Button; + +namespace Obvious.Soap.Editor +{ + public class ReferencesPopupWindow : EditorWindow + { + private ScriptableBase _scriptableBase; + private Vector2 _scrollPosition = Vector2.zero; + private Texture[] _icons; + private Dictionary _assetReferences; + private List<(GameObject, Type, string, string)> _sceneReferences; + private bool _sceneFoldout = true; + private bool _assetFoldout = true; + private GUIStyle _windowStyle; + private FindReferenceType _findReferenceType = FindReferenceType.All; + private GUIStyle _foldoutStyle; + + + public static void ShowWindow(Rect rect, ScriptableBase scriptableBase, + FindReferenceType findReferenceType = FindReferenceType.All) + { + var window = CreateInstance(); + window.Init(scriptableBase, findReferenceType); + window.titleContent = new GUIContent("Find References"); + window.position = new Rect(rect.x, rect.y, 350, 350); + window.ShowPopup(); + window.position = SoapInspectorUtils.CenterInWindow(window.position, rect); + } + + private void Init(ScriptableBase scriptableBase, FindReferenceType findReferenceType) + { + _scriptableBase = scriptableBase; + _findReferenceType = findReferenceType; + _foldoutStyle = new GUIStyle(EditorStyles.foldout) + { + fontStyle = FontStyle.Bold + }; + LoadIcons(); + if (_findReferenceType.HasFlag(FindReferenceType.Scene)) + { + _sceneReferences = SoapEditorUtils.FindReferencesInScene(_scriptableBase); + EditorApplication.hierarchyChanged += OnHierarchyChanged; + } + + if (_findReferenceType.HasFlag(FindReferenceType.Project)) + { + _assetReferences = SoapEditorUtils.FindReferencesInProject(_scriptableBase); + EditorApplication.projectChanged += OnProjectChanged; + } + + _windowStyle = new GUIStyle(); + var darkness = 0.235f; + _windowStyle.normal.background = + SoapInspectorUtils.CreateTexture(new Color(darkness, darkness, darkness, 1f)); + SoapWizardWindow.IsPopupOpen = true; + } + + private void OnDisable() + { + SoapWizardWindow.IsPopupOpen = false; + EditorApplication.hierarchyChanged -= OnHierarchyChanged; + EditorApplication.projectChanged -= OnProjectChanged; + } + + private void LoadIcons() + { + _icons = new Texture[5]; + _icons[0] = EditorGUIUtility.IconContent("SceneAsset Icon").image; + _icons[1] = EditorGUIUtility.IconContent("Folder Icon").image; + _icons[2] = Resources.Load("Icons/icon_eventListener"); + _icons[3] = EditorGUIUtility.IconContent("Button Icon").image; + _icons[4] = EditorGUIUtility.IconContent("cs Script Icon").image; + } + + public void OnGUI() + { + DrawBorder(new Color(0.388f, 0.388f, 0.388f, 1f)); // Dark grey + GUILayout.BeginArea(new Rect(1, 1, position.width - 2, position.height - 2)); + GUILayout.BeginVertical(_windowStyle); + SoapInspectorUtils.DrawPopUpHeader(this, "Find References (Used by)"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + DrawReferences(); + GUILayout.EndVertical(); + GUILayout.EndVertical(); + GUILayout.EndArea(); + } + + private void DrawBorder(Color color) + { + EditorGUI.DrawRect(new Rect(0, 0, position.width, 1), color); // Top + EditorGUI.DrawRect(new Rect(0, position.height - 1, position.width, 1), color); // Bottom + EditorGUI.DrawRect(new Rect(0, 0, 1, position.height), color); // Left + EditorGUI.DrawRect(new Rect(position.width - 1, 0, 1, position.height), color); // Right + } + + private void DrawReferences() + { + EditorGUILayout.BeginVertical(); + _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition); + + if (_findReferenceType.HasFlag(FindReferenceType.Scene)) + DrawSceneReferences(); + + GUILayout.Space(EditorGUIUtility.singleLineHeight); + + if (_findReferenceType.HasFlag(FindReferenceType.Project)) + DrawProjectReferences(); + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + } + + private void DrawSceneReferences() + { + var suffix = _sceneReferences == null ? "" : $"({_sceneReferences.Count})"; + var foldoutText = $"Scene {suffix}"; + var newFoldoutState = EditorGUILayout.Foldout(_sceneFoldout, new GUIContent(foldoutText, _icons[0]), + true, + _foldoutStyle); + + if (newFoldoutState != _sceneFoldout) + { + _sceneFoldout = newFoldoutState; + if (_sceneFoldout) + { + _sceneReferences = SoapEditorUtils.FindReferencesInScene(_scriptableBase); + } + } + + if (_sceneFoldout) + { + if (_sceneReferences != null) + { + foreach (var sceneReference in _sceneReferences) + { + if (sceneReference.Item1 == null) //object could have been deleted (for manual refresh mode) + continue; + Texture icon = GetComponentIcon(sceneReference.Item2); + var data = new ReferenceEntryData + { + Obj = sceneReference.Item1, + Icon = icon, + Content = $"{sceneReference.Item1.name} ({sceneReference.Item2.Name})", + Argument = sceneReference.Item3 + }; + DrawReferenceEntry(data, 0.7f); + } + } + } + } + + private void DrawProjectReferences() + { + var suffix = _assetReferences == null ? "" : $"({_assetReferences.Count})"; + var foldoutText = $"Assets {suffix}"; + var newFoldoutState = EditorGUILayout.Foldout(_assetFoldout, new GUIContent(foldoutText, _icons[1]), + true, + _foldoutStyle); + + if (newFoldoutState != _assetFoldout) + { + _assetFoldout = newFoldoutState; + if (_assetFoldout) + { + _assetReferences = SoapEditorUtils.FindReferencesInProject(_scriptableBase); + } + } + + if (_assetFoldout) + { + if (_assetReferences != null) + { + foreach (var assetReference in _assetReferences) + { + var assetPath = assetReference.Key; + var mainAsset = AssetDatabase.LoadMainAssetAtPath(assetPath); + if (mainAsset == null) //object could have been deleted (for manual refresh mode) + continue; + var objectContent = EditorGUIUtility.ObjectContent(mainAsset, mainAsset.GetType()); + Texture2D icon = objectContent.image as Texture2D; + var path = assetPath.Remove(0, 7); + var data = new ReferenceEntryData + { + Obj = mainAsset, + Icon = icon, + Content = mainAsset.name, + Argument = assetReference.Value.ToString() + }; + DrawReferenceEntry(data, 0.7f); + } + } + } + } + + + void DrawReferenceEntry(ReferenceEntryData data, float ratio) + { + var width = position.width - 45; //weird offset but hey ! + EditorGUILayout.BeginHorizontal(); + var style = new GUIStyle(EditorStyles.objectField) + { + margin = new RectOffset(4, 0, 2, 2), + padding = new RectOffset(2, 2, 2, 2), + alignment = TextAnchor.MiddleLeft, + fontSize = 10 + }; + if (GUILayout.Button(new GUIContent(data.Content, data.Icon), style, + GUILayout.Height(18), GUILayout.Width(width * ratio))) + { + EditorGUIUtility.PingObject(data.Obj); + } + + style = new GUIStyle(EditorStyles.helpBox) + { + margin = new RectOffset(0, 0, 0, 0), + stretchWidth = false, + wordWrap = false, + alignment = TextAnchor.MiddleLeft + }; + EditorGUILayout.LabelField(data.Argument, style, GUILayout.Width(width * (1 - ratio))); + EditorGUILayout.EndHorizontal(); + } + + Texture GetComponentIcon(Type componentType) + { + if (typeof(EventListenerBase).IsAssignableFrom(componentType)) + { + return _icons[2]; + } + + if (typeof(Button).IsAssignableFrom(componentType)) + { + return _icons[3]; + } + + return _icons[4]; + } + + private void OnHierarchyChanged() + { + _sceneReferences = SoapEditorUtils.FindReferencesInScene(_scriptableBase); + Repaint(); + } + + private void OnProjectChanged() + { + _assetReferences = SoapEditorUtils.FindReferencesInProject(_scriptableBase); + Repaint(); + } + + private struct ReferenceEntryData + { + public Texture Icon; + public Object Obj; + public string Content; + public string Argument; + } + } + + [Flags] + public enum FindReferenceType + { + Scene = 1, + Project = 2, + All = Scene | Project + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/ReferencesPopupWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/ReferencesPopupWindow.cs.meta new file mode 100644 index 000000000..2b48b6cf6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/ReferencesPopupWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c968c096d1fa474887f9bd4fd7d19eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/RenamePopUpWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/RenamePopUpWindow.cs new file mode 100644 index 000000000..26fd3ba51 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/RenamePopUpWindow.cs @@ -0,0 +1,50 @@ +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class RenamePopUpWindow : PopupWindowContent + { + + private string _newName = ""; + private string _initialName = ""; + private readonly Rect _position; + private readonly Vector2 _dimensions = new Vector2(250, 120); + private readonly ScriptableBase _scriptableBase = null; + + public override Vector2 GetWindowSize() => _dimensions; + + public RenamePopUpWindow(Rect origin, ScriptableBase scriptableBase) + { + _position = origin; + _scriptableBase = scriptableBase; + _initialName = _scriptableBase.name; + _newName = _initialName; + SoapWizardWindow.IsPopupOpen = true; + } + + public override void OnClose() + { + SoapWizardWindow.IsPopupOpen = false; + } + + public override void OnGUI(Rect rect) + { + editorWindow.position = SoapInspectorUtils.CenterInWindow(editorWindow.position, _position); + SoapInspectorUtils.DrawPopUpHeader(editorWindow, "Rename"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + + GUILayout.FlexibleSpace(); + _newName = EditorGUILayout.TextField(_newName, EditorStyles.textField); + GUILayout.FlexibleSpace(); + GUI.enabled = _newName != _initialName; + if (SoapInspectorUtils.DrawCallToActionButton("Apply", SoapInspectorUtils.ButtonSize.Medium)) + { + SoapEditorUtils.RenameAsset(_scriptableBase, _newName); + editorWindow.Close(); + } + GUI.enabled = true; + GUILayout.EndVertical(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/RenamePopUpWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/RenamePopUpWindow.cs.meta new file mode 100644 index 000000000..32860b05a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/RenamePopUpWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 766acb5fef531944d9d91f9ce044e966 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizard.FavoriteData.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizard.FavoriteData.cs new file mode 100644 index 000000000..1fb47c077 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizard.FavoriteData.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public partial class SoapWizardWindow + { + [Serializable] + private class FavoriteData + { + public List FavoriteGUIDs = new List(); + private HashSet _favoriteGUIDsSet = new HashSet(); + + public FavoriteData() + { + _favoriteGUIDsSet = new HashSet(FavoriteGUIDs); + } + + public override string ToString() + { + return JsonUtility.ToJson(this, false); + } + + public void AddFavorite(ScriptableBase asset) + { + var guid = SoapEditorUtils.GenerateGuid(asset); + + if (!string.IsNullOrEmpty(guid) && _favoriteGUIDsSet.Add(guid)) + { + FavoriteGUIDs.Add(guid); + Save(); + } + } + + public void RemoveFavorite(ScriptableBase asset) + { + if (asset == null) return; + var guid = SoapEditorUtils.GenerateGuid(asset); + + if (!string.IsNullOrEmpty(guid) && _favoriteGUIDsSet.Remove(guid)) + { + FavoriteGUIDs.Remove(guid); + Save(); + } + } + + public bool IsFavorite(ScriptableBase asset) + { + if (asset == null) + return false; + var guid = SoapEditorUtils.GenerateGuid(asset); + return !string.IsNullOrEmpty(guid) && _favoriteGUIDsSet.Contains(guid); + } + + public List GetFavorites() + { + List assets = new List(); + foreach (var guid in FavoriteGUIDs) + { + //ignore sub assets + if (guid.Length > 32) + continue; + + var path = AssetDatabase.GUIDToAssetPath(guid); + var asset = AssetDatabase.LoadAssetAtPath(path); + if (asset != null) + assets.Add(asset); + } + + return assets; + } + + public void Save() + { + SoapEditorUtils.WizardFavorites = ToString(); + //Debug.Log("Saved Favorites:" + ToString()); + } + + public static FavoriteData Load() + { + var key = SoapEditorUtils.WizardFavoritesKey + Application.dataPath.GetHashCode(); + if (EditorPrefs.HasKey(key)) + { + string json = SoapEditorUtils.WizardFavorites; + FavoriteData data = JsonUtility.FromJson(json) ?? new FavoriteData(); + data._favoriteGUIDsSet = new HashSet(data.FavoriteGUIDs); + return data; + } + + return new FavoriteData(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizard.FavoriteData.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizard.FavoriteData.cs.meta new file mode 100644 index 000000000..89ef13c03 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizard.FavoriteData.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6874233ee03a485db3d6bbaa4105539c +timeCreated: 1737766021 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizardWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizardWindow.cs new file mode 100644 index 000000000..f1689f58d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizardWindow.cs @@ -0,0 +1,835 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; +using PopupWindow = UnityEditor.PopupWindow; + +namespace Obvious.Soap.Editor +{ + public partial class SoapWizardWindow : EditorWindow + { + private Vector2 _scrollPosition = Vector2.zero; + private List _scriptableObjects; + private ScriptableType _currentType = ScriptableType.All; + private float TabWidth => position.width / 6; + private string _searchText = ""; + + [SerializeField] private string _currentFolderPath = "Assets"; + [SerializeField] private int _selectedScriptableIndex; + [SerializeField] private int _typeTabIndex = -1; + [SerializeField] private int _tagMask; + [SerializeField] private bool _isInitialized; + [SerializeField] private ScriptableBase _scriptableBase; + [SerializeField] private ScriptableBase _previousScriptableBase; + [SerializeField] private FavoriteData _favoriteData; + + private SoapSettings _soapSettings; + private readonly float _widthRatio = 0.6f; + + //Cache + private Texture[] _icons; + private UnityEditor.Editor _editor; + private Dictionary _subAssetsLookup; + + private Dictionary _serializedObjects = + new Dictionary(); + + private readonly List _indicesToDraw = new List(); + private GUIStyle _entryStyle; + private GUIStyle _iconStyle; + private GUIStyle _buttonStyle; + private GUIContent _guiContent; + private Rect _bgRect; + private Rect _entryNameRect; + private Rect _iconRect; + private readonly Color _selectedColor = new Color(0.172f, 0.365f, 0.529f); + private readonly Color _hoverColor = new Color(0.3f, 0.3f, 0.3f); + private Event _currentEvent; + private string[] _tags; + private readonly StringBuilder _stringBuilder = new StringBuilder(); + private readonly string[] _tabNames = Enum.GetNames(typeof(ScriptableType)); + public static bool IsPopupOpen = false; + + private enum ScriptableType + { + All, + Variables, + Events, + Collections, + Enums, + Favorites + } + + [MenuItem("Window/Obvious Game/Soap/Soap Wizard")] + public new static void Show() + { + var window = GetWindow(typeof(SceneView)); + window.titleContent = new GUIContent("Soap Wizard", Resources.Load("Icons/icon_soapLogo")); + } + + [MenuItem("Tools/Obvious Game/Soap/Soap Wizard %#w")] + private static void OpenSoapWizard() => Show(); + + private void OnEnable() + { + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + this.wantsMouseMove = true; + LoadIcons(); + LoadSavedData(); + _tags = _soapSettings.Tags.ToArray(); + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + + if (_isInitialized) + { + SelectTab(_typeTabIndex); + return; + } + + SelectTab((int)_currentType, true); //default is 0 + _isInitialized = true; + } + + private void OnDisable() + { + SoapEditorUtils.WizardTags = _tagMask; + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + DestroyImmediate(_editor); + foreach (var serializedObject in _serializedObjects.Values) + { + serializedObject.Dispose(); + } + + _serializedObjects.Clear(); + } + + private void OnFocus() + { + if (_soapSettings == null) + return; + //Tags can be modified from different windows, so always update them when focusing back + _tags = _soapSettings.Tags.ToArray(); + } + + private void LoadIcons() + { + _icons = new Texture[7]; + _icons[0] = EditorGUIUtility.IconContent("Favorite On Icon").image; + _icons[1] = Resources.Load("Icons/icon_edit"); + _icons[2] = Resources.Load("Icons/icon_duplicate"); + _icons[3] = Resources.Load("Icons/icon_delete"); + _icons[4] = EditorGUIUtility.IconContent("Favorite Icon").image; + _icons[5] = EditorGUIUtility.IconContent("Folder Icon").image; + _icons[6] = Resources.Load("Icons/icon_ping"); + } + + private void LoadSavedData() + { + _currentFolderPath = SoapEditorUtils.WizardRootFolderPath; + _favoriteData = FavoriteData.Load(); + _tagMask = SoapEditorUtils.WizardTags; + } + + private void CacheStyles() + { + if (_entryStyle != null) + return; + + _entryStyle = new GUIStyle(EditorStyles.label) + { + normal = { textColor = Color.white } + }; + _iconStyle = new GUIStyle(GUIStyle.none); + _guiContent = new GUIContent(); + _buttonStyle = new GUIStyle(GUI.skin.button); + _buttonStyle.margin = new RectOffset(0, 2, 0, 0); + _buttonStyle.padding = new RectOffset(4, 4, 4, 4); + } + + private void OnGUI() + { + if (_soapSettings == null) + return; + + CacheStyles(); + + _currentEvent = Event.current; + + var padding = 2f; + var paddedArea = new Rect(padding, padding, position.width - (padding * 2), + position.height - (padding * 2)); + + GUILayout.BeginArea(paddedArea); + DrawFolder(); + GUILayout.Space(1); + SoapInspectorUtils.DrawLine(); + GUILayout.Space(1); + DrawTags(); + GUILayout.Space(2); + DrawSearchBar(); + SoapInspectorUtils.DrawColoredLine(1, Color.black.Lighten(0.137f)); + DrawTabs(); + DrawScriptableBases(_scriptableObjects); + DrawBottomButtons(); + GUILayout.EndArea(); + + CheckShortcutInputs(); + if (_currentEvent.type == EventType.MouseMove && !IsPopupOpen) + { + Repaint(); + } + } + + private void CheckShortcutInputs() + { + // Handle arrow key navigation to navigate between tabs + if (_currentEvent.type == EventType.KeyDown) + { + int increment = 0; + if (_currentEvent.keyCode == KeyCode.LeftArrow) + { + increment = -1; + _currentEvent.Use(); + } + else if (_currentEvent.keyCode == KeyCode.RightArrow) + { + increment = 1; + _currentEvent.Use(); + } + + if (increment != 0) + { + _typeTabIndex = (_typeTabIndex + increment + Enum.GetNames(typeof(ScriptableType)).Length) % + Enum.GetNames(typeof(ScriptableType)).Length; + SelectTab(_typeTabIndex, true); + Repaint(); + } + } + + //Handle arrow key up down to navigate between scriptables + if (_currentEvent.type == EventType.KeyDown && _scriptableObjects.Count > 0) + { + int increment = 0; + if (_currentEvent.keyCode == KeyCode.UpArrow) + { + increment = -1; + _currentEvent.Use(); + } + else if (_currentEvent.keyCode == KeyCode.DownArrow) + { + increment = 1; + _currentEvent.Use(); + } + + if (increment != 0) + { + var selected = _selectedScriptableIndex; + Deselect(); + _selectedScriptableIndex = (selected + increment + _scriptableObjects.Count) % + _scriptableObjects.Count; + _scriptableBase = _scriptableObjects[_selectedScriptableIndex]; + Repaint(); + } + } + + if (_currentEvent.type == EventType.KeyDown) + { + // Handle CTRL+F keyboard event to focus search bar + if (_currentEvent.keyCode == KeyCode.F && + _currentEvent.control) + { + _currentEvent.Use(); + EditorGUI.FocusTextInControl("SearchBar"); + return; + } + + if (_scriptableBase == null) + return; + + if (_currentEvent.keyCode == KeyCode.F) + { + if (_favoriteData.IsFavorite(_scriptableBase)) + _favoriteData.RemoveFavorite(_scriptableBase); + else + _favoriteData.AddFavorite(_scriptableBase); + } + else if (_currentEvent.keyCode == KeyCode.P) + { + Selection.activeObject = _scriptableBase; + EditorGUIUtility.PingObject(_scriptableBase); + } + else if (_currentEvent.keyCode == KeyCode.R && + _currentEvent.control) + { + ReferencesPopupWindow.ShowWindow(position, _scriptableBase); + } + else if (_currentEvent.keyCode == KeyCode.R) + { + PopupWindow.Show(new Rect(), new RenamePopUpWindow(position, _scriptableBase)); + } + else if (_currentEvent.keyCode == KeyCode.T) + { + var scriptableBases = new[] { _scriptableBase }; + PopupWindow.Show(new Rect(), new SetTagPopupWindow(scriptableBases)); + } + else if (_currentEvent.keyCode == KeyCode.D) + { + if (AssetDatabase.IsMainAsset(_scriptableBase)) + { + SoapEditorUtils.CreateCopy(_scriptableBase); + Refresh(_currentType); + } + } + else if (_currentEvent.keyCode == KeyCode.Delete) + { + var isDeleted = SoapEditorUtils.DeleteObjectWithConfirmation(_scriptableBase); + if (isDeleted) + { + _scriptableBase = null; + OnTabSelected(_currentType, true); + } + } + + _currentEvent.Use(); + } + } + + + private void DrawFolder() + { + EditorGUILayout.BeginHorizontal(); + _guiContent.image = _icons[5]; + _guiContent.tooltip = "Change Selected Folder"; + if (GUILayout.Button(_guiContent, _buttonStyle, GUILayout.MaxWidth(25f), GUILayout.Height(20f))) + { + var path = EditorUtility.OpenFolderPanel("Select folder to set path.", _currentFolderPath, ""); + + //remove Application.dataPath from path & replace \ with / for cross-platform compatibility + path = path.Replace(Application.dataPath, "Assets").Replace("\\", "/"); + + if (!AssetDatabase.IsValidFolder(path)) + EditorUtility.DisplayDialog("Error: File Path Invalid", + "Make sure the path is a valid folder in the project.", "Ok"); + else + { + _currentFolderPath = path; + SoapEditorUtils.WizardRootFolderPath = _currentFolderPath; + OnTabSelected(_currentType, true); + } + } + + _stringBuilder.Clear(); + _stringBuilder.Append(_currentFolderPath); + _stringBuilder.Append("/"); + var displayedPath = _stringBuilder.ToString(); + + //var displayedPath = $"{_currentFolderPath}/"; + EditorGUILayout.LabelField(displayedPath); + EditorGUILayout.EndHorizontal(); + } + + private void DrawTags() + { + var height = EditorGUIUtility.singleLineHeight; + EditorGUILayout.BeginHorizontal(GUILayout.MaxHeight(height)); + _guiContent.image = _icons[1]; + _guiContent.tooltip = "Edit Tags"; + if (GUILayout.Button(_guiContent, _buttonStyle, GUILayout.MaxWidth(25), GUILayout.MaxHeight(20))) + { + PopupWindow.Show(new Rect(), new TagPopUpWindow(position)); + } + + EditorGUILayout.LabelField("Tags", GUILayout.MaxWidth(70)); + _tagMask = EditorGUILayout.MaskField(_tagMask, _tags); + EditorGUILayout.EndHorizontal(); + } + + private void DrawTabs() + { + EditorGUILayout.BeginHorizontal(); + + var defaultStyle = SoapInspectorUtils.Styles.ToolbarButton; + var selectedStyle = new GUIStyle(defaultStyle); + selectedStyle.normal.textColor = Color.white; + + for (int i = 0; i < _tabNames.Length; i++) + { + var isSelected = i == _typeTabIndex; + + var style = isSelected ? selectedStyle : defaultStyle; + + if (GUILayout.Button(_tabNames[i], style, GUILayout.Width(TabWidth))) + { + _typeTabIndex = i; + OnTabSelected((ScriptableType)_typeTabIndex, true); + } + } + + EditorGUILayout.EndHorizontal(); + + // Draw the bottom line + var lastRect = GUILayoutUtility.GetLastRect(); + var width = lastRect.width / _tabNames.Length; + var x = lastRect.x + _typeTabIndex * width; + EditorGUI.DrawRect(new Rect(x, lastRect.yMax - 2, width, 2), Color.white); + } + + private void DrawSearchBar() + { + GUILayout.BeginHorizontal(); + GUI.SetNextControlName("SearchBar"); + _searchText = GUILayout.TextField(_searchText, EditorStyles.toolbarSearchField); + if (GUILayout.Button("", GUI.skin.FindStyle("SearchCancelButton"))) + { + _searchText = ""; + GUI.FocusControl(null); + } + + GUILayout.EndHorizontal(); + } + + private void DrawScriptableBases(List scriptables) + { + if (scriptables is null) + return; + + EditorGUILayout.BeginVertical(); + _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition); + + EditorGUIUtility.hierarchyMode = true; + + + _indicesToDraw.Clear(); + // Reverse iteration to safely handle deletions + var count = scriptables.Count; + for (int i = count - 1; i >= 0; i--) + { + if (scriptables[i] != null) + _indicesToDraw.Add(i); + } + + count = _indicesToDraw.Count; + for (int i = count - 1; i >= 0; i--) + { + GUILayout.Space(2f); + DrawScriptable(_indicesToDraw[i]); + } + + EditorGUIUtility.hierarchyMode = false; + + // Handle deselection with a single check + if (_currentEvent.type == EventType.MouseDown && _currentEvent.button == 0) + { + var totalRect = GUILayoutUtility.GetLastRect(); + if (!totalRect.Contains(_currentEvent.mousePosition)) + { + Deselect(); + Repaint(); + } + } + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + //The end + + void DrawScriptable(int i) + { + var scriptable = scriptables[i]; + if (scriptable == null) + return; + + //filter tags + if ((_tagMask & (1 << scriptable.TagIndex)) == 0) + return; + + var entryName = GetNameFor(scriptable); + //filter search + if (entryName.IndexOf(_searchText, StringComparison.OrdinalIgnoreCase) < 0) + return; + + var rect = EditorGUILayout.GetControlRect(); + var selected = _selectedScriptableIndex == i; + + _bgRect.position = rect.position; + _bgRect.height = rect.height + 2f; + _bgRect.width = rect.width * 1.2f; + _bgRect.x = rect.x - 10f; + + if (selected) + EditorGUI.DrawRect(_bgRect, _selectedColor); + else if (rect.Contains(_currentEvent.mousePosition)) + EditorGUI.DrawRect(_bgRect, _hoverColor); + + //Draw icon + var icon = GetIconFor(scriptable); + _guiContent.image = icon; + _iconRect.position = rect.position; + _iconRect.width = 18f; + _iconRect.height = 18f; + GUI.Box(_iconRect, _guiContent, _iconStyle); + + _entryNameRect.position = rect.position; + _entryNameRect.width = rect.width * _widthRatio; + _entryNameRect.height = rect.height; + _entryNameRect.x = rect.x + 18f; + + // Handle right-click here + if (_currentEvent.type == EventType.MouseDown && _currentEvent.button == 1 && + rect.Contains(_currentEvent.mousePosition)) + { + ShowContextMenu(scriptable); + _currentEvent.Use(); + } + + // Add favorite icon + _stringBuilder.Clear(); + if (_favoriteData.IsFavorite(scriptable)) + _stringBuilder.Append("\u2605 "); + _stringBuilder.Append(entryName); + entryName = _stringBuilder.ToString(); + + // Draw Label or button + if (selected) + { + GUI.Label(_entryNameRect, entryName, _entryStyle); + EditorGUILayout.BeginVertical(GUI.skin.box); + DrawEditor(scriptable); + EditorGUILayout.EndVertical(); + } + else if (GUI.Button(_entryNameRect, entryName, EditorStyles.label)) // Select + { + Deselect(); + _selectedScriptableIndex = i; + _scriptableBase = scriptable; + } + + // Draw Shortcut + var shortcutRect = new Rect(rect) + { + x = rect.x + rect.width * _widthRatio, + height = EditorGUIUtility.singleLineHeight, + width = rect.width * (1 - _widthRatio) + }; + DrawShortcut(shortcutRect, scriptable); + } + + string GetNameFor(ScriptableBase scriptableBase) + { + _stringBuilder.Clear(); + if (_subAssetsLookup != null && _subAssetsLookup.TryGetValue(scriptableBase, out var mainAsset)) + { + _stringBuilder.Append("["); + _stringBuilder.Append(mainAsset.name); + _stringBuilder.Append("] "); + _stringBuilder.Append(scriptableBase.name); + return _stringBuilder.ToString(); + } + + _stringBuilder.Append(scriptableBase.name); + return _stringBuilder.ToString(); + } + + void ShowContextMenu(ScriptableBase scriptableBase) + { + var menu = new GenericMenu(); + var isFavorite = _favoriteData.IsFavorite(scriptableBase); + var favoriteText = isFavorite ? "Remove from favorite" : "Add to favorite"; + var favoriteIcon = isFavorite ? "\u2730 " : "\u2605 "; + menu.AddItem(new GUIContent(favoriteIcon + favoriteText), false, () => + { + if (isFavorite) + _favoriteData.RemoveFavorite(scriptableBase); + else + _favoriteData.AddFavorite(scriptableBase); + }); + menu.AddItem(new GUIContent("\ud83c\udfaf Ping"), false, () => + { + Selection.activeObject = scriptableBase; + EditorGUIUtility.PingObject(scriptableBase); + }); + menu.AddItem(new GUIContent("\u270f\ufe0f Rename"), false, + () => { PopupWindow.Show(new Rect(), new RenamePopUpWindow(position, scriptableBase)); }); + + if (AssetDatabase.IsMainAsset(scriptableBase)) + { + menu.AddItem(new GUIContent("\ud83d\udcc4 Duplicate"), false, () => + { + SoapEditorUtils.CreateCopy(scriptableBase); + Refresh(_currentType); + }); + } + + menu.AddItem(new GUIContent("\ud83d\udd0d Find References/In Scene and Project"), false, + () => { ReferencesPopupWindow.ShowWindow(position, scriptableBase, FindReferenceType.All); }); + menu.AddItem(new GUIContent("\ud83d\udd0d Find References/In Scene"), false, + () => { ReferencesPopupWindow.ShowWindow(position, scriptableBase, FindReferenceType.Scene); }); + menu.AddItem(new GUIContent("\ud83d\udd0d Find References/In Project"), false, + () => { ReferencesPopupWindow.ShowWindow(position, scriptableBase, FindReferenceType.Project); }); + + menu.AddItem(new GUIContent("\ud83d\udd16 Set Tag"), false, + () => + { + var scriptableBases = new[] { scriptableBase }; + PopupWindow.Show(new Rect(), new SetTagPopupWindow(scriptableBases)); + }); + + menu.AddItem(new GUIContent("\u274c Delete"), false, () => + { + var isDeleted = SoapEditorUtils.DeleteObjectWithConfirmation(scriptableBase); + if (isDeleted) + { + _scriptableBase = null; + OnTabSelected(_currentType, true); + } + }); + menu.ShowAsContext(); + } + } + + private void DrawShortcut(Rect rect, ScriptableBase scriptable) + { + if (!_serializedObjects.TryGetValue(scriptable, out var serializedObject)) + { + serializedObject = new SerializedObject(scriptable); + _serializedObjects[scriptable] = serializedObject; + } + + if (serializedObject == null) //could be destroyed + return; + + serializedObject.Update(); + EditorGUI.BeginChangeCheck(); + + if (scriptable is ScriptableVariableBase scriptableVariableBase) + DrawVariableValue(scriptableVariableBase); + else if (scriptable is ScriptableEventNoParam scriptableEventNoParam) + DrawEventNoParam(scriptableEventNoParam); + else if (scriptable is ScriptableCollection scriptableCollection) + DrawCollection(scriptableCollection); + else if (scriptable is ScriptableEventBase scriptableEventBase) + DrawEventWithParam(scriptableEventBase); + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + + void DrawVariableValue(ScriptableVariableBase variableBase) + { + var valuePropertyDrawer = new ScriptableVariablePropertyDrawer(serializedObject, variableBase); + valuePropertyDrawer.DrawShortcut(rect); + } + + void DrawEventNoParam(ScriptableEventNoParam scriptableEventNoParam) + { + var propertyDrawer = new ScriptableEventNoParamPropertyDrawer(); + propertyDrawer.DrawShortcut(rect, scriptableEventNoParam); + } + + void DrawEventWithParam(ScriptableEventBase scriptableEventBase) + { + var propertyDrawer = new ScriptableEventPropertyDrawer(serializedObject, scriptableEventBase); + propertyDrawer.DrawShortcut(rect); + } + + void DrawCollection(ScriptableCollection scriptableCollection) + { + var propertyDrawer = new ScriptableCollectionPropertyDrawer(serializedObject, scriptableCollection); + propertyDrawer.DrawShortcut(rect); + } + } + + private void DrawEditor(ScriptableBase scriptableBase) + { + EditorGUILayout.BeginVertical(); + if (_editor == null) + UnityEditor.Editor.CreateCachedEditor(scriptableBase, null, ref _editor); + if (scriptableBase == null) + { + DestroyImmediate(_editor); + return; + } + + _editor.OnInspectorGUI(); + EditorGUILayout.EndVertical(); + } + + private void DrawUtilityButtons() + { + EditorGUILayout.BeginHorizontal(); + var buttonStyle = new GUIStyle(GUI.skin.button); + buttonStyle.padding = new RectOffset(0, 0, 3, 3); + var lessPaddingStyle = new GUIStyle(buttonStyle); + lessPaddingStyle.padding = new RectOffset(0, 0, 1, 1); + + var buttonHeight = 20; + + var isFavorite = _favoriteData.IsFavorite(_scriptableBase); + var icon = isFavorite ? _icons[4] : _icons[0]; + var tooltip = isFavorite ? "Remove from favorite" : "Add to favorite"; + var buttonContent = new GUIContent("Favorite", icon, tooltip); + if (GUILayout.Button(buttonContent, lessPaddingStyle, GUILayout.MaxHeight(buttonHeight))) + { + if (isFavorite) + _favoriteData.RemoveFavorite(_scriptableBase); + else + _favoriteData.AddFavorite(_scriptableBase); + } + + buttonContent = new GUIContent("Ping", _icons[6], "Pings the asset in the project"); + if (GUILayout.Button(buttonContent, buttonStyle, GUILayout.MaxHeight(buttonHeight))) + { + Selection.activeObject = _scriptableBase; + EditorGUIUtility.PingObject(_scriptableBase); + } + + buttonContent = new GUIContent("Rename", _icons[1]); + if (GUILayout.Button(buttonContent, buttonStyle, GUILayout.MaxHeight(buttonHeight))) + PopupWindow.Show(new Rect(), new RenamePopUpWindow(position, _scriptableBase)); + + EditorGUI.BeginDisabledGroup(!AssetDatabase.IsMainAsset(_scriptableBase)); + buttonContent = new GUIContent("Duplicate", _icons[2], "Create Copy"); + if (GUILayout.Button(buttonContent, lessPaddingStyle, GUILayout.MaxHeight(buttonHeight))) + { + SoapEditorUtils.CreateCopy(_scriptableBase); + Refresh(_currentType); + } + + EditorGUI.EndDisabledGroup(); + + buttonContent = new GUIContent("Delete", _icons[3]); + if (GUILayout.Button(buttonContent, buttonStyle, GUILayout.MaxHeight(buttonHeight))) + { + var isDeleted = SoapEditorUtils.DeleteObjectWithConfirmation(_scriptableBase); + if (isDeleted) + { + _scriptableBase = null; + OnTabSelected(_currentType, true); + } + } + + EditorGUILayout.EndHorizontal(); + } + + private void DrawBottomButtons() + { + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Create New Type", GUILayout.Height(25f))) + { + SoapTypeCreatorWindow.Show(); + } + + if (GUILayout.Button("Create New Asset", GUILayout.Height(25f))) + { + PopupWindow.Show(new Rect(), + new SoapAssetCreatorPopup(position, + SoapAssetCreatorPopup.EOrigin.SoapWizard)); + } + + EditorGUILayout.EndHorizontal(); + } + + private void OnTabSelected(ScriptableType type, bool deselectCurrent = false) + { + Refresh(type); + _currentType = type; + if (deselectCurrent) + { + Deselect(); + } + } + + private void Deselect() + { + _scriptableBase = null; + _selectedScriptableIndex = -1; + GUIUtility.keyboardControl = 0; //remove focus + DestroyImmediate(_editor); + } + + private void Refresh(ScriptableType type) + { + switch (type) + { + case ScriptableType.All: + _scriptableObjects = + SoapEditorUtils.FindAll(_currentFolderPath, out _subAssetsLookup); + break; + case ScriptableType.Variables: + var variables = + SoapEditorUtils.FindAll(_currentFolderPath, out _subAssetsLookup); + _scriptableObjects = variables.Cast().ToList(); + break; + case ScriptableType.Events: + var events = SoapEditorUtils.FindAll(_currentFolderPath, out _subAssetsLookup); + _scriptableObjects = events.Cast().ToList(); + break; + case ScriptableType.Collections: + var lists = SoapEditorUtils.FindAll(_currentFolderPath, out _subAssetsLookup); + _scriptableObjects = lists.Cast().ToList(); + break; + case ScriptableType.Enums: + var enums = SoapEditorUtils.FindAll(_currentFolderPath, out _subAssetsLookup); + _scriptableObjects = enums.Cast().ToList(); + break; + case ScriptableType.Favorites: + SoapEditorUtils.FindAll(_currentFolderPath, out _subAssetsLookup); + var favorites = _favoriteData.GetFavorites(); + foreach (var kvp in _subAssetsLookup) + { + if (_favoriteData.IsFavorite(kvp.Key)) + { + favorites.Add(kvp.Key); + } + } + + _scriptableObjects = favorites; + break; + } + } + + private void SelectTab(int index, bool deselect = false) + { + _typeTabIndex = index; + OnTabSelected((ScriptableType)_typeTabIndex, deselect); + } + + private Texture GetIconFor(ScriptableBase scriptableBase) + { + var texture = SoapInspectorUtils.Icons.GetIconFor(scriptableBase.GetType()); + return texture ?? _icons[0]; + } + + #region Repaint + + private void OnPlayModeStateChanged(PlayModeStateChange pm) + { + if (pm == PlayModeStateChange.EnteredPlayMode) + { + foreach (var scriptableBase in _scriptableObjects) + { + if (scriptableBase != null) + scriptableBase.RepaintRequest += OnRepaintRequested; + } + } + else if (pm == PlayModeStateChange.EnteredEditMode) + { + foreach (var scriptableBase in _scriptableObjects) + { + if (scriptableBase != null) + scriptableBase.RepaintRequest -= OnRepaintRequested; + } + } + } + + private void OnRepaintRequested() + { + //Debug.Log("Repaint Wizard " + _scriptableBase.name); + Repaint(); + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizardWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizardWindow.cs.meta new file mode 100644 index 000000000..926de995c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/SoapWizardWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fafdcabd8e75d7e48b3d020abdbc4c47 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/TagPopUpWindow.cs b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/TagPopUpWindow.cs new file mode 100644 index 000000000..540f579e4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/TagPopUpWindow.cs @@ -0,0 +1,286 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace Obvious.Soap.Editor +{ + public class TagPopUpWindow : PopupWindowContent + { + private readonly Rect _position; + private readonly Vector2 _dimensions = new Vector2(350, 350); + private readonly float _lineHeight = 20f; + private readonly SoapSettings _soapSettings; + private readonly List _scriptableBases; + private Vector2 _scrollPosition = Vector2.zero; + private Texture[] _icons; + private bool _isAddingNewCategory = false; + private int _categoryBeingRenamed = -1; + private int _categoryBeingDeleted = -1; + private string _categoryName; + + public override Vector2 GetWindowSize() => _dimensions; + + public TagPopUpWindow(Rect origin) + { + _position = origin; + _scriptableBases = SoapEditorUtils.FindAll(); + _soapSettings = SoapEditorUtils.GetOrCreateSoapSettings(); + LoadIcons(); + SoapWizardWindow.IsPopupOpen = true; + } + + public override void OnClose() + { + SoapWizardWindow.IsPopupOpen = false; + } + + private void LoadIcons() + { + _icons = new Texture[4]; + _icons[0] = Resources.Load("Icons/icon_edit"); + _icons[1] = Resources.Load("Icons/icon_delete"); + _icons[2] = EditorGUIUtility.IconContent("Warning").image; + _icons[3] = Resources.Load("Icons/icon_cancel"); + } + + public override void OnGUI(Rect rect) + { + editorWindow.position = SoapInspectorUtils.CenterInWindow(editorWindow.position, _position); + SoapInspectorUtils.DrawPopUpHeader(editorWindow, "Edit Tags"); + GUILayout.BeginVertical(SoapInspectorUtils.Styles.PopupContent); + GUILayout.Space(10f); + DrawCategories(); + GUILayout.Space(10f); + DrawButtons(); + GUILayout.EndVertical(); + } + + private void DrawCategories() + { + GUI.enabled = !_isAddingNewCategory; + EditorGUILayout.BeginVertical(); + + //Draw the default category + var labelStyle = new GUIStyle(GUI.skin.box); + labelStyle.alignment = TextAnchor.MiddleLeft; + labelStyle.normal.textColor = new Color(0.7f, 0.7f, 0.7f, 1f); + _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition); + EditorGUILayout.LabelField("None", labelStyle, GUILayout.ExpandWidth(true)); + + //Draw the rest of the categories + for (int i = 1; i < _soapSettings.Tags.Count; i++) + { + if (i == _categoryBeingRenamed) + DrawCategoryBeingRenamed(i); + else if (i == _categoryBeingDeleted) + DrawCategoryBeingDeleted(i); + else + DrawDefaultCategoryEntry(i); + } + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + GUI.enabled = true; + } + + private void DrawButtons() + { + if (_isAddingNewCategory) + DrawNewCategoryBeingAdded(); + else + { + if (HasReachedMaxCategory) + { + var labelStyle = new GUIStyle(EditorStyles.label); + labelStyle.normal.textColor = Color.red; + labelStyle.alignment = TextAnchor.MiddleCenter; + EditorGUILayout.LabelField("Maximum Amount of Tags reached (32)", labelStyle); + } + else + { + DrawAddNewCategoryButton(); + } + } + + void DrawNewCategoryBeingAdded() + { + EditorGUILayout.BeginHorizontal(); + + DrawRenameLayout(() => + { + _isAddingNewCategory = false; + _soapSettings.Tags.Add(_categoryName); + }, () => { _isAddingNewCategory = false; }); + + EditorGUILayout.EndHorizontal(); + GUILayout.Space(5); + } + + void DrawAddNewCategoryButton() + { + GUI.enabled = IsAllowedToCreateNewCategory; + if (SoapInspectorUtils.DrawCallToActionButton("Add New Tag", SoapInspectorUtils.ButtonSize.Large)) + { + _categoryName = ""; + _isAddingNewCategory = true; + } + GUI.enabled = true; + } + } + + private void DrawCategoryBeingRenamed(int index) + { + EditorGUILayout.BeginHorizontal(GUI.skin.box); + DrawRenameLayout(() => + { + _categoryBeingRenamed = -1; + _soapSettings.Tags[index] = _categoryName; + }, () => { _categoryBeingRenamed = -1; }); + EditorGUILayout.EndHorizontal(); + } + + private void DrawCategoryBeingDeleted(int i) + { + if (IsCategoryUsed(i, out var usedBy)) + { + DrawUseCategoryBeingDeleted(); + } + else + { + DrawConfirmDelete(); + } + + void DrawUseCategoryBeingDeleted() + { + EditorGUILayout.BeginVertical(); + EditorGUILayout.BeginHorizontal(GUI.skin.box); + + //Warning icon + var iconStyle = new GUIStyle(GUIStyle.none); + iconStyle.margin = new RectOffset(0, 0, 5, 0); + GUILayout.Box(_icons[2], iconStyle, GUILayout.Width(_lineHeight), GUILayout.Height(_lineHeight)); + + //Label + EditorGUILayout.LabelField($"{_soapSettings.Tags[i]} can't be deleted because it's used by:"); + + //Cancel Button + if (GUILayout.Button(_icons[3], SoapInspectorUtils.Styles.EditTagHeaderButton, GUILayout.Width(_lineHeight), + GUILayout.Height(_lineHeight))) + _categoryBeingDeleted = -1; + + EditorGUILayout.EndHorizontal(); + + //Draw the list of ScriptableBases that use this category + var originalColor = GUI.backgroundColor; + GUI.backgroundColor = Color.red.Lighten(.75f); + EditorGUILayout.BeginVertical(GUI.skin.box); + foreach (var scriptableBase in usedBy) + { + EditorGUILayout.BeginHorizontal(GUI.skin.box); + EditorGUILayout.LabelField(scriptableBase.name); + var categories = _soapSettings.Tags.ToArray(); + + EditorGUI.BeginChangeCheck(); + int newCategoryIndex = EditorGUILayout.Popup(scriptableBase.TagIndex, categories); + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(scriptableBase, "Change Tag"); + scriptableBase.TagIndex = newCategoryIndex; + EditorUtility.SetDirty(scriptableBase); + break; + } + + EditorGUILayout.EndHorizontal(); + } + + GUI.backgroundColor = originalColor; + if (GUILayout.Button("Set Default category for all", GUILayout.Height(_lineHeight))) + { + foreach (var scriptableBase in usedBy) + { + scriptableBase.TagIndex = 0; + EditorUtility.SetDirty(scriptableBase); + } + } + + EditorGUILayout.EndVertical(); + EditorGUILayout.EndVertical(); + } + + void DrawConfirmDelete() + { + EditorGUILayout.BeginHorizontal(GUI.skin.box); + EditorGUILayout.LabelField($"Confirm Delete {_soapSettings.Tags[i]}?"); + if (GUILayout.Button("Yes", GUILayout.Width(35), GUILayout.Height(_lineHeight))) + { + _soapSettings.Tags.RemoveAt(i); + EditorUtility.SetDirty(_soapSettings); + _categoryBeingDeleted = -1; + } + + if (GUILayout.Button("No", GUILayout.Width(35), GUILayout.Height(_lineHeight))) + _categoryBeingDeleted = -1; + EditorGUILayout.EndHorizontal(); + } + } + + private void DrawDefaultCategoryEntry(int i) + { + EditorGUILayout.BeginHorizontal(GUI.skin.box); + EditorGUILayout.LabelField(_soapSettings.Tags[i]); + if (GUILayout.Button(_icons[0], SoapInspectorUtils.Styles.EditTagHeaderButton, GUILayout.Width(_lineHeight), + GUILayout.Height(_lineHeight))) + { + _categoryBeingRenamed = i; + _categoryName = _soapSettings.Tags[i]; + } + + Color originalColor = GUI.backgroundColor; + GUI.backgroundColor = Color.red.Lighten(.75f); + if (GUILayout.Button(_icons[1], SoapInspectorUtils.Styles.EditTagHeaderButton, GUILayout.Width(_lineHeight), + GUILayout.Height(_lineHeight))) + { + _categoryBeingDeleted = i; + } + + GUI.backgroundColor = originalColor; + EditorGUILayout.EndHorizontal(); + } + + + private void DrawRenameLayout(Action onConfirm, Action onCancel) + { + _categoryName = EditorGUILayout.TextField(_categoryName, EditorStyles.textField, GUILayout.Height(_lineHeight)); + GUI.enabled = IsNameValid(_categoryName); + + if (SoapInspectorUtils.DrawCallToActionButton("Confirm", SoapInspectorUtils.ButtonSize.Small)) + { + onConfirm?.Invoke(); + EditorUtility.SetDirty(_soapSettings); + } + GUI.enabled = true; + if (GUILayout.Button("Cancel", GUILayout.Width(60), GUILayout.Height(_lineHeight))) + { + _categoryName = ""; + onCancel?.Invoke(); + } + } + + private bool IsNameValid(string name) + { + return !string.IsNullOrEmpty(name) && !_soapSettings.Tags.Contains(name); + } + + private bool IsCategoryUsed(int categoryIndex, out List usedBy) + { + usedBy = _scriptableBases.Where(x => x.TagIndex == categoryIndex).ToList(); + return usedBy.Count > 0; + } + + private bool HasReachedMaxCategory => _soapSettings.Tags.Count >= 32; + + private bool IsAllowedToCreateNewCategory => _categoryBeingDeleted == -1 && _categoryBeingRenamed == -1; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/TagPopUpWindow.cs.meta b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/TagPopUpWindow.cs.meta new file mode 100644 index 000000000..ea4f389d2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Editor/Windows/SoapWizard/TagPopUpWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 635092d11353d984a9ed5923f51d86ea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime.meta b/Assets/Obvious/Soap/Core/Runtime.meta new file mode 100644 index 000000000..a4f1c3378 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c980e27432032ff4589096ffd93f4859 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/AssemblyInfo.cs b/Assets/Obvious/Soap/Core/Runtime/AssemblyInfo.cs new file mode 100644 index 000000000..03051a638 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/AssemblyInfo.cs @@ -0,0 +1,2 @@ +using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Obvious.Soap.Editor")] diff --git a/Assets/Obvious/Soap/Core/Runtime/AssemblyInfo.cs.meta b/Assets/Obvious/Soap/Core/Runtime/AssemblyInfo.cs.meta new file mode 100644 index 000000000..2a0b929f7 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: df8c14b9a36686a40883e2f8b501d998 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes.meta new file mode 100644 index 000000000..b9e88be69 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 793fbd4d77362324bbe755cc3c2b332c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/AutoTag.cs b/Assets/Obvious/Soap/Core/Runtime/Attributes/AutoTag.cs new file mode 100644 index 000000000..ca8b6ff6b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/AutoTag.cs @@ -0,0 +1,21 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + public class AutoTag : PropertyAttribute + { + public string Tag { get; } + public int TagIndex { get; } + + public AutoTag(string tag) + { + Tag = tag; + } + public AutoTag(int tagIndex) + { + TagIndex = tagIndex; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/AutoTag.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes/AutoTag.cs.meta new file mode 100644 index 000000000..94cd78ccf --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/AutoTag.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 913f53a0ea7032745a8f5d59573865ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/BeginDisabledGroup.cs b/Assets/Obvious/Soap/Core/Runtime/Attributes/BeginDisabledGroup.cs new file mode 100644 index 000000000..7d0161162 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/BeginDisabledGroup.cs @@ -0,0 +1,10 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [AttributeUsage(AttributeTargets.Field)] + public class BeginDisabledGroup : PropertyAttribute + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/BeginDisabledGroup.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes/BeginDisabledGroup.cs.meta new file mode 100644 index 000000000..06c293552 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/BeginDisabledGroup.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1cf2368cb3484b4287c9693b1774f000 +timeCreated: 1736292126 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/EndDisabledGroup.cs b/Assets/Obvious/Soap/Core/Runtime/Attributes/EndDisabledGroup.cs new file mode 100644 index 000000000..12fda59d4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/EndDisabledGroup.cs @@ -0,0 +1,10 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [AttributeUsage(AttributeTargets.Field)] + public class EndDisabledGroup : PropertyAttribute + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/EndDisabledGroup.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes/EndDisabledGroup.cs.meta new file mode 100644 index 000000000..bea0a76b5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/EndDisabledGroup.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5bd2c68066b34c2b8c448d7dfc474ad3 +timeCreated: 1736297896 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/RuntimeInjectableAttribute.cs b/Assets/Obvious/Soap/Core/Runtime/Attributes/RuntimeInjectableAttribute.cs new file mode 100644 index 000000000..5f9beceb5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/RuntimeInjectableAttribute.cs @@ -0,0 +1,19 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + /// + /// Marks fields to be injected with a runtime-created variable. + /// + [AttributeUsage(AttributeTargets.Field)] + public class RuntimeInjectableAttribute : PropertyAttribute + { + public string Id { get; private set; } + + public RuntimeInjectableAttribute(string id) + { + Id = id; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/RuntimeInjectableAttribute.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes/RuntimeInjectableAttribute.cs.meta new file mode 100644 index 000000000..545878367 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/RuntimeInjectableAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d7328a9d0d01164e9bc10bb2269a820 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/ShowIfAttribute.cs b/Assets/Obvious/Soap/Core/Runtime/Attributes/ShowIfAttribute.cs new file mode 100644 index 000000000..90887ce9a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/ShowIfAttribute.cs @@ -0,0 +1,26 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + /// + /// Show a field in the inspector if a condition is met. Hides it otherwise. + /// + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + public class ShowIfAttribute : PropertyAttribute + { + public readonly string conditionFieldName; + public readonly object comparisonValue; + + public ShowIfAttribute(string conditionFieldName) + { + this.conditionFieldName = conditionFieldName; + } + + public ShowIfAttribute(string conditionFieldName, object comparisonValue = null) + { + this.conditionFieldName = conditionFieldName; + this.comparisonValue = comparisonValue; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/ShowIfAttribute.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes/ShowIfAttribute.cs.meta new file mode 100644 index 000000000..dbf80439d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/ShowIfAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66cce3e5364ae6449b41b0223e7b9c32 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/SubAssetAttribute.cs b/Assets/Obvious/Soap/Core/Runtime/Attributes/SubAssetAttribute.cs new file mode 100644 index 000000000..c21ffda5f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/SubAssetAttribute.cs @@ -0,0 +1,13 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Attributes +{ + [AttributeUsage(AttributeTargets.Field)] + public class SubAssetAttribute : PropertyAttribute + { + public SubAssetAttribute() + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Attributes/SubAssetAttribute.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Attributes/SubAssetAttribute.cs.meta new file mode 100644 index 000000000..7f0a53516 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Attributes/SubAssetAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 29ca5afb7d107004fad13a379011a7e6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings.meta new file mode 100644 index 000000000..16a49438b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 293034c24d29b59468c18b0751bb42a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindComparisonToUnityEvent.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindComparisonToUnityEvent.cs new file mode 100644 index 000000000..f0cefe435 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindComparisonToUnityEvent.cs @@ -0,0 +1,176 @@ +using UnityEngine.Events; +using UnityEngine; + +namespace Obvious.Soap +{ + /// + /// Triggers a UnityEvent when the comparison is true + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindcomparisontounityevent")] + [AddComponentMenu("Soap/Bindings/BindComparisonToUnityEvent")] + public class BindComparisonToUnityEvent : MonoBehaviour + { + public CustomVariableType Type = CustomVariableType.None; + + [SerializeField] private BoolVariable _boolVariable = null; + [SerializeField] private BoolReference _boolComparer = null; + + [SerializeField] private IntVariable _intVariable = null; + [SerializeField] private IntReference _intComparer = null; + + [SerializeField] private FloatVariable _floatVariable = null; + [SerializeField] private FloatReference _floatComparer = null; + + [SerializeField] private StringVariable _stringVariable = null; + [SerializeField] private StringReference _stringComparer = null; + + public Comparator Comparison = Comparator.EQUAL; + + [SerializeField] private UnityEvent _unityEvent = null; + + private void Awake() + { + Subscribe(); + } + + private void Start() + { + Evaluate(); + } + + private void Evaluate() + { + switch (Type) + { + case CustomVariableType.Bool: + Evaluate(_boolVariable.Value); + break; + case CustomVariableType.Int: + Evaluate(_intVariable.Value); + break; + case CustomVariableType.Float: + Evaluate(_floatVariable.Value); + break; + case CustomVariableType.String: + Evaluate(_stringVariable.Value); + break; + } + } + + private void Evaluate(bool value) + { + if (value == _boolComparer) + _unityEvent.Invoke(); + } + + private void Evaluate(int value) + { + switch (Comparison) + { + case Comparator.EQUAL: + if (value == _intComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.SMALLER: + if (value < _intComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.BIGGER: + if (value > _intComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.BIGGER_OR_EQUAL: + if (value >= _intComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.SMALLER_OR_EQUAL: + if (value <= _intComparer.Value) + _unityEvent.Invoke(); + break; + } + } + + private void Evaluate(float value) + { + switch (Comparison) + { + case Comparator.EQUAL: + if (Mathf.Approximately(value, _floatComparer.Value)) + _unityEvent.Invoke(); + break; + case Comparator.SMALLER: + if (value < _floatComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.BIGGER: + if (value > _floatComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.BIGGER_OR_EQUAL: + if (value >= _floatComparer.Value) + _unityEvent.Invoke(); + break; + case Comparator.SMALLER_OR_EQUAL: + if (value <= _floatComparer.Value) + _unityEvent.Invoke(); + break; + } + } + + private void Evaluate(string value) + { + if (value.Equals(_stringComparer.Value)) + _unityEvent.Invoke(); + } + + private void Subscribe() + { + switch (Type) + { + case CustomVariableType.Bool: + _boolVariable.OnValueChanged += Evaluate; + break; + case CustomVariableType.Int: + _intVariable.OnValueChanged += Evaluate; + break; + case CustomVariableType.Float: + _floatVariable.OnValueChanged += Evaluate; + break; + case CustomVariableType.String: + _stringVariable.OnValueChanged += Evaluate; + break; + } + } + + private void OnDestroy() + { + switch (Type) + { + case CustomVariableType.Bool: + _boolVariable.OnValueChanged -= Evaluate; + break; + case CustomVariableType.Int: + _intVariable.OnValueChanged -= Evaluate; + break; + case CustomVariableType.Float: + _floatVariable.OnValueChanged -= Evaluate; + break; + case CustomVariableType.String: + _stringVariable.OnValueChanged -= Evaluate; + break; + } + } + + /// + /// Represents the different comparison operations + /// + public enum Comparator + { + EQUAL, + SMALLER, + BIGGER, + BIGGER_OR_EQUAL, + SMALLER_OR_EQUAL + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindComparisonToUnityEvent.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindComparisonToUnityEvent.cs.meta new file mode 100644 index 000000000..43dec6535 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindComparisonToUnityEvent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 974f833efdfdf284aa66e2cb2f3a3668 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindFillingImage.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindFillingImage.cs new file mode 100644 index 000000000..994370376 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindFillingImage.cs @@ -0,0 +1,54 @@ +using UnityEngine; +using UnityEngine.UI; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif + +namespace Obvious.Soap +{ + /// + /// Binds a float variable to a filling image + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindfillingimage")] + [AddComponentMenu("Soap/Bindings/BindFillingImage")] + [RequireComponent(typeof(Image))] + public class BindFillingImage : CacheComponent + { + [SerializeField] private FloatVariable _floatVariable = null; + [Tooltip("If true, the max value is taken from the bound variable's max value")] + [SerializeField] bool _useMaxValueFromVariable = false; +#if ODIN_INSPECTOR + [HideIf("_useMaxValueFromVariable")] +#endif + [SerializeField] private FloatReference _maxValue = new FloatReference(100,true); + + protected override void Awake() + { + base.Awake(); + _component.type = Image.Type.Filled; + + Refresh(_floatVariable); + _floatVariable.OnValueChanged += Refresh; + + if (_useMaxValueFromVariable) + _floatVariable.MaxReference.OnValueChanged += Refresh; + else + _maxValue.OnValueChanged += Refresh; + } + + private void OnDestroy() + { + _floatVariable.OnValueChanged -= Refresh; + if (_useMaxValueFromVariable) + _floatVariable.MaxReference.OnValueChanged -= Refresh; + else + _maxValue.OnValueChanged -= Refresh; + } + + private void Refresh(float currentValue) + { + var maxValue = _useMaxValueFromVariable ? _floatVariable.MaxReference.Value : _maxValue.Value; + _component.fillAmount = _floatVariable.Value / maxValue; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindFillingImage.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindFillingImage.cs.meta new file mode 100644 index 000000000..1bc6e55ca --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindFillingImage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba1bd61ff5f85b642a175fc402fe4bc7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindGraphicColor.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindGraphicColor.cs new file mode 100644 index 000000000..aa64e6ebd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindGraphicColor.cs @@ -0,0 +1,33 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Obvious.Soap +{ + /// + /// Binds a color variable to a graphic (works with UI and SpriteRenderer) + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindgraphiccolor")] + [AddComponentMenu("Soap/Bindings/BindGraphicColor")] + [RequireComponent(typeof(Graphic))] + public class BindGraphicColor : CacheComponent + { + [SerializeField] private ColorVariable _colorVariable = null; + + protected override void Awake() + { + base.Awake(); + Refresh(_colorVariable); + _colorVariable.OnValueChanged += Refresh; + } + + private void OnDestroy() + { + _colorVariable.OnValueChanged -= Refresh; + } + + private void Refresh(Color color) + { + _component.color = color; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindGraphicColor.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindGraphicColor.cs.meta new file mode 100644 index 000000000..f885885e0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindGraphicColor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f8ac922abe854745b373db06bca49d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindInputField.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindInputField.cs new file mode 100644 index 000000000..5794cc405 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindInputField.cs @@ -0,0 +1,34 @@ +using TMPro; +using UnityEngine; + +namespace Obvious.Soap +{ + /// + /// Binds a string variable to an input field + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindinputfield")] + [AddComponentMenu("Soap/Bindings/BindInputField")] + [RequireComponent(typeof(TMP_InputField))] + public class BindInputField : CacheComponent + { + [SerializeField] private StringVariable _stringVariable = null; + + protected override void Awake() + { + base.Awake(); + _component.onValueChanged.AddListener(SetBoundVariable); + } + + private void Start() + { + //Do it in start, as the variable has to be loaded first. + _component.text = _stringVariable; + } + + private void OnDestroy() => _component.onValueChanged.RemoveListener(SetBoundVariable); + + private void SetBoundVariable(string value) => _stringVariable.Value = value; + + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindInputField.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindInputField.cs.meta new file mode 100644 index 000000000..68ae414c2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindInputField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7403922145c9dee438fee5c369d3a330 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindRendererColor.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindRendererColor.cs new file mode 100644 index 000000000..81946b6a6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindRendererColor.cs @@ -0,0 +1,32 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + /// + /// Binds a color variable to a renderer + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindrenderercolor")] + [AddComponentMenu("Soap/Bindings/BindRendererColor")] + [RequireComponent(typeof(Renderer))] + public class BindRendererColor : CacheComponent + { + [SerializeField] private ColorVariable _colorVariable = null; + + protected override void Awake() + { + base.Awake(); + Refresh(_colorVariable); + _colorVariable.OnValueChanged += Refresh; + } + + private void OnDestroy() + { + _colorVariable.OnValueChanged -= Refresh; + } + + private void Refresh(Color color) + { + _component.material.color = color; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindRendererColor.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindRendererColor.cs.meta new file mode 100644 index 000000000..31d44228a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindRendererColor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 848384699fb6fa6418e5bc4e5ce8a2b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSlider.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSlider.cs new file mode 100644 index 000000000..991632cc9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSlider.cs @@ -0,0 +1,82 @@ +using UnityEngine; +using UnityEngine.UI; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif +namespace Obvious.Soap +{ + /// + /// Binds a float variable to a slider + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindslider")] + [AddComponentMenu("Soap/Bindings/BindSlider")] + [RequireComponent(typeof(Slider))] + public class BindSlider : CacheComponent + { + [SerializeField] private FloatVariable _floatVariable = null; + [Tooltip("If true, the max value is taken from the bound variable's max value")] + [SerializeField] private bool _useMaxValueFromVariable = false; +#if ODIN_INSPECTOR + [HideIf("_useMaxValueFromVariable")] +#endif + [SerializeField] private FloatReference _maxValue = new FloatReference(100, true); + + protected override void Awake() + { + base.Awake(); + OnValueChanged(_floatVariable); + + _component.onValueChanged.AddListener(SetBoundVariable); + _floatVariable.OnValueChanged += OnValueChanged; + + if (_useMaxValueFromVariable) + { + OnMaxValueChanged(_floatVariable.MaxReference.Value); + _floatVariable.MaxReference.OnValueChanged += OnMaxValueChanged; + } + else + { + OnMaxValueChanged(_maxValue.Value); + _maxValue.OnValueChanged += OnMaxValueChanged; + } + } + + private void OnDestroy() + { + _component.onValueChanged.RemoveListener(SetBoundVariable); + _floatVariable.OnValueChanged -= OnValueChanged; + if (_useMaxValueFromVariable) + _floatVariable.MaxReference.OnValueChanged -= OnMaxValueChanged; + else + _maxValue.OnValueChanged -= OnMaxValueChanged; + } + + private void OnValueChanged(float value) + { + _component.value = value; + } + + private void OnMaxValueChanged(float value) + { + _component.maxValue = value; + } + + private void SetBoundVariable(float value) + { + _floatVariable.Value = value; + } + + private void OnValidate() + { + if (_component == null) + return; + + OnValueChanged(_floatVariable.Value); + + if (_useMaxValueFromVariable) + OnMaxValueChanged(_floatVariable.MaxReference.Value); + else + OnMaxValueChanged(_maxValue.Value); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSlider.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSlider.cs.meta new file mode 100644 index 000000000..16afe6d19 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSlider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 586b99df9b2cb32469408b1a47ca09d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSliderInt.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSliderInt.cs new file mode 100644 index 000000000..5fc295d86 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSliderInt.cs @@ -0,0 +1,81 @@ +using UnityEngine; +using UnityEngine.UI; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif +namespace Obvious.Soap +{ + /// + /// Binds an int variable to a slider + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindslider")] + [AddComponentMenu("Soap/Bindings/BindSliderToInt")] + [RequireComponent(typeof(Slider))] + public class BindSliderInt : CacheComponent + { + [SerializeField] private IntVariable _intVariable = null; + [SerializeField] private bool _useMaxValueFromVariable = false; +#if ODIN_INSPECTOR + [ShowIf("_useMaxValueFromVariable", false)] +#endif + [SerializeField] private IntReference _maxValue = new IntReference(100, true); + + protected override void Awake() + { + base.Awake(); + OnValueChanged(_intVariable.Value); + + _component.onValueChanged.AddListener(SetBoundVariable); + _intVariable.OnValueChanged += OnValueChanged; + + if (_useMaxValueFromVariable) + { + OnMaxValueChanged(_intVariable.MaxReference.Value); + _intVariable.MaxReference.OnValueChanged += OnMaxValueChanged; + } + else + { + OnMaxValueChanged(_maxValue.Value); + _maxValue.OnValueChanged += OnMaxValueChanged; + } + } + + private void OnDestroy() + { + _component.onValueChanged.RemoveListener(SetBoundVariable); + _intVariable.OnValueChanged -= OnValueChanged; + if (_useMaxValueFromVariable) + _intVariable.MaxReference.OnValueChanged -= OnMaxValueChanged; + else + _maxValue.OnValueChanged -= OnMaxValueChanged; + } + + private void OnValueChanged(int value) + { + _component.value = value; + } + + private void OnMaxValueChanged(int value) + { + _component.maxValue = value; + } + + private void SetBoundVariable(float value) + { + _intVariable.Value = Mathf.RoundToInt(value); + } + + private void OnValidate() + { + if (_component == null) + return; + + OnValueChanged(_intVariable.Value); + + if (_useMaxValueFromVariable) + OnMaxValueChanged(_intVariable.MaxReference.Value); + else + OnMaxValueChanged(_maxValue.Value); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSliderInt.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSliderInt.cs.meta new file mode 100644 index 000000000..aeacba808 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindSliderInt.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2f637bcca09b49b4d91ff8c9f18d3b15 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindText.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindText.cs new file mode 100644 index 000000000..a0e74c3db --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindText.cs @@ -0,0 +1,146 @@ +using System; +using System.Text; +using UnityEngine; +using UnityEngine.UI; + +namespace Obvious.Soap +{ + /// + /// Binds a variable to a text component + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindtext-textmeshpro")] + [AddComponentMenu("Soap/Bindings/BindText")] + [RequireComponent(typeof(Text))] + public class BindText: CacheComponent + { + public CustomVariableType Type = CustomVariableType.None; + + [SerializeField] private BoolVariable _boolVariable = null; + [SerializeField] private IntVariable _intVariable = null; + [SerializeField] private FloatVariable _floatVariable = null; + [SerializeField] private StringVariable _stringVariable = null; + + private readonly StringBuilder _stringBuilder = new StringBuilder(); + private Action _boolValueChangedHandler; + private Action _intValueChangedHandler; + private Action _floatValueChangedHandler; + private Action _stringValueChangedHandler; + + public string Prefix = string.Empty; + public string Suffix = string.Empty; + + //int specific + [Tooltip("Useful too an offset, for example for Level counts. If your level index is 0, add 1, so it displays Level : 1")] + public int Increment = 0; + [Tooltip("Clamps the value shown to a minimum and a maximum.")] + public Vector2Int MinMaxInt = new Vector2Int(int.MinValue, int.MaxValue); + + //float specific + [Min(1)] + public int DecimalAmount = 2; + [Tooltip("Clamps the value shown to a minimum and a maximum.")] + public bool IsClamped = false; + public Vector2 MinMaxFloat = new Vector2(float.MinValue, float.MaxValue); + + + protected override void Awake() + { + base.Awake(); + if (Type == CustomVariableType.None) + { + Debug.LogError("Select a type for this binding component", gameObject); + return; + } + + Refresh(); + Subscribe(); + } + + private void Refresh() + { + _stringBuilder.Clear(); + _stringBuilder.Append(Prefix); + + switch (Type) + { + case CustomVariableType.Bool: + _stringBuilder.Append(_boolVariable.Value ? "True" : "False"); + break; + case CustomVariableType.Int: + var clampedInt = IsClamped ? Mathf.Clamp(_intVariable.Value, MinMaxInt.x, MinMaxInt.y) : _intVariable.Value; + _stringBuilder.Append(clampedInt + Increment); + break; + case CustomVariableType.Float: + double clampedFloat = IsClamped ? Mathf.Clamp(_floatVariable.Value, MinMaxFloat.x, MinMaxFloat.y) : _floatVariable.Value; + double rounded = System.Math.Round(clampedFloat, DecimalAmount); + _stringBuilder.Append(rounded); + break; + case CustomVariableType.String: + _stringBuilder.Append(_stringVariable.Value); + break; + } + + _stringBuilder.Append(Suffix); + _component.text = _stringBuilder.ToString(); + } + + private void Subscribe() + { + switch (Type) + { + case CustomVariableType.Bool: + if (_boolVariable != null) + { + _boolValueChangedHandler = value => Refresh(); + _boolVariable.OnValueChanged += _boolValueChangedHandler; + } + break; + case CustomVariableType.Int: + if (_intVariable != null) + { + _intValueChangedHandler = value => Refresh(); + _intVariable.OnValueChanged += _intValueChangedHandler; + } + break; + case CustomVariableType.Float: + if (_floatVariable != null) + { + _floatValueChangedHandler = value => Refresh(); + _floatVariable.OnValueChanged += _floatValueChangedHandler; + } + break; + case CustomVariableType.String: + if (_stringVariable != null) + { + _stringValueChangedHandler = value => Refresh(); + _stringVariable.OnValueChanged += _stringValueChangedHandler; + } + break; + } + } + + private void OnDestroy() + { + switch (Type) + { + case CustomVariableType.Bool: + if (_boolVariable != null) + _boolVariable.OnValueChanged -= _boolValueChangedHandler; + break; + case CustomVariableType.Int: + if (_intVariable != null) + _intVariable.OnValueChanged -= _intValueChangedHandler; + break; + case CustomVariableType.Float: + if (_floatVariable != null) + _floatVariable.OnValueChanged -= _floatValueChangedHandler; + break; + case CustomVariableType.String: + if (_stringVariable != null) + _stringVariable.OnValueChanged -= _stringValueChangedHandler; + break; + } + } + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindText.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindText.cs.meta new file mode 100644 index 000000000..428317fd3 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindText.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 773a31c2a4dd4924cb2d27678cf6deb4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindTextMeshPro.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindTextMeshPro.cs new file mode 100644 index 000000000..b507709ab --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindTextMeshPro.cs @@ -0,0 +1,152 @@ +using System; +using System.Text; +using UnityEngine; +using TMPro; + +namespace Obvious.Soap +{ + /// + /// Binds a variable to a TextMeshPro component + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindtext-textmeshpro")] + [AddComponentMenu("Soap/Bindings/BindTextMeshPro")] + [RequireComponent(typeof(TMP_Text))] + public class BindTextMeshPro : CacheComponent + { + public CustomVariableType Type = CustomVariableType.None; + + [SerializeField] private BoolVariable _boolVariable = null; + [SerializeField] private IntVariable _intVariable = null; + [SerializeField] private FloatVariable _floatVariable = null; + [SerializeField] private StringVariable _stringVariable = null; + + private readonly StringBuilder _stringBuilder = new StringBuilder(); + private Action _boolValueChangedHandler; + private Action _intValueChangedHandler; + private Action _floatValueChangedHandler; + private Action _stringValueChangedHandler; + + [Tooltip("Displays before the value")] public string Prefix = string.Empty; + [Tooltip("Displays after the value")] public string Suffix = string.Empty; + + //int specific + [Tooltip( + "Useful too an offset, for example for Level counts. If your level index is 0, add 1, so it displays Level : 1")] + public int Increment = 0; + + [Tooltip("Clamps the value shown to a minimum and a maximum.")] + public Vector2Int MinMaxInt = new Vector2Int(int.MinValue, int.MaxValue); + + //float specific + [Min(1)] public int DecimalAmount = 2; + + [Tooltip("Clamps the value shown to a minimum and a maximum.")] + public bool IsClamped = false; + + public Vector2 MinMaxFloat = new Vector2(float.MinValue, float.MaxValue); + + + protected override void Awake() + { + base.Awake(); + if (Type == CustomVariableType.None) + { + Debug.LogError("Select a type for this binding component", gameObject); + return; + } + + Refresh(); + Subscribe(); + } + + private void Refresh() + { + _stringBuilder.Clear(); + _stringBuilder.Append(Prefix); + + switch (Type) + { + case CustomVariableType.Bool: + _stringBuilder.Append(_boolVariable.Value ? "True" : "False"); + break; + case CustomVariableType.Int: + var clampedInt = IsClamped + ? Mathf.Clamp(_intVariable.Value, MinMaxInt.x, MinMaxInt.y) + : _intVariable.Value; + _stringBuilder.Append(clampedInt + Increment); + break; + case CustomVariableType.Float: + double clampedFloat = IsClamped + ? Mathf.Clamp(_floatVariable.Value, MinMaxFloat.x, MinMaxFloat.y) + : _floatVariable.Value; + double rounded = System.Math.Round(clampedFloat, DecimalAmount); + _stringBuilder.Append(rounded); + break; + case CustomVariableType.String: + _stringBuilder.Append(_stringVariable.Value); + break; + } + + _stringBuilder.Append(Suffix); + _component.SetText(_stringBuilder); + } + + private void Subscribe() + { + switch (Type) + { + case CustomVariableType.Bool: + if (_boolVariable != null) + { + _boolValueChangedHandler = value => Refresh(); + _boolVariable.OnValueChanged += _boolValueChangedHandler; + } + break; + case CustomVariableType.Int: + if (_intVariable != null) + { + _intValueChangedHandler = value => Refresh(); + _intVariable.OnValueChanged += _intValueChangedHandler; + } + break; + case CustomVariableType.Float: + if (_floatVariable != null) + { + _floatValueChangedHandler = value => Refresh(); + _floatVariable.OnValueChanged += _floatValueChangedHandler; + } + break; + case CustomVariableType.String: + if (_stringVariable != null) + { + _stringValueChangedHandler = value => Refresh(); + _stringVariable.OnValueChanged += _stringValueChangedHandler; + } + break; + } + } + + private void OnDestroy() + { + switch (Type) + { + case CustomVariableType.Bool: + if (_boolVariable != null) + _boolVariable.OnValueChanged -= _boolValueChangedHandler; + break; + case CustomVariableType.Int: + if (_intVariable != null) + _intVariable.OnValueChanged -= _intValueChangedHandler; + break; + case CustomVariableType.Float: + if (_floatVariable != null) + _floatVariable.OnValueChanged -= _floatValueChangedHandler; + break; + case CustomVariableType.String: + if (_stringVariable != null) + _stringVariable.OnValueChanged -= _stringValueChangedHandler; + break; + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindTextMeshPro.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindTextMeshPro.cs.meta new file mode 100644 index 000000000..1e80ab749 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindTextMeshPro.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eca49ccdbc3362d4397b0fbd0b2b9d2a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindToggle.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindToggle.cs new file mode 100644 index 000000000..247274f32 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindToggle.cs @@ -0,0 +1,40 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Obvious.Soap +{ + /// + /// Binds a bool variable to a toggle + /// + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/2_bindings/bindtoggle")] + [AddComponentMenu("Soap/Bindings/BindToggle")] + [RequireComponent(typeof(Toggle))] + public class BindToggle : CacheComponent + { + [SerializeField] private BoolVariable _boolVariable = null; + + protected override void Awake() + { + base.Awake(); + OnValueChanged(_boolVariable); + _component.onValueChanged.AddListener(SetBoundVariable); + _boolVariable.OnValueChanged += OnValueChanged; + } + + private void OnDestroy() + { + _component.onValueChanged.RemoveListener(SetBoundVariable); + _boolVariable.OnValueChanged -= OnValueChanged; + } + + private void OnValueChanged(bool value) + { + _component.isOn = value; + } + + private void SetBoundVariable(bool value) + { + _boolVariable.Value = value; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/BindToggle.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindToggle.cs.meta new file mode 100644 index 000000000..ab4ba637f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/BindToggle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c9f6cdac9ade6d644be932ae21ca0d3c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8fafaa2b606c8174d9bbe26515992389, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/CacheComponent.cs b/Assets/Obvious/Soap/Core/Runtime/Bindings/CacheComponent.cs new file mode 100644 index 000000000..1f4d469ad --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/CacheComponent.cs @@ -0,0 +1,30 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + /// + /// a component that caches a reference to a component + /// + /// Type + public class CacheComponent : MonoBehaviour + { + protected T _component; + + protected virtual void Awake() + { + GetReference(); + } + + private void Reset() + { + GetReference(); + } + + private void GetReference() + { + if (_component != null) + return; + _component = GetComponent(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Bindings/CacheComponent.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Bindings/CacheComponent.cs.meta new file mode 100644 index 000000000..f64164dbc --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Bindings/CacheComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 494c134ce1af4561924d823298a6c530 +timeCreated: 1652660641 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Obvious.Soap.asmdef b/Assets/Obvious/Soap/Core/Runtime/Obvious.Soap.asmdef new file mode 100644 index 000000000..83c335b4a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Obvious.Soap.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Obvious.Soap", + "references": [ + "GUID:6546d7765b4165b40850b3667f981c26", + "GUID:6055be8ebefd69e48b49212b09b47b2f" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Obvious.Soap.asmdef.meta b/Assets/Obvious/Soap/Core/Runtime/Obvious.Soap.asmdef.meta new file mode 100644 index 000000000..6a1a73ad8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Obvious.Soap.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ee6baafdecd94804a8714654c4bd097f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors.meta new file mode 100644 index 000000000..f7ac1e8bb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42e3d307dc2ad5d4a9f46fe506aa8f66 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeBoolVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeBoolVariableInjector.cs new file mode 100644 index 000000000..e71115bcb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeBoolVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeBoolVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeBoolVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeBoolVariableInjector.cs.meta new file mode 100644 index 000000000..dcc2f1b04 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeBoolVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9a16f63b5569437983b30d94a8da9448 +timeCreated: 1736292491 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeColorVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeColorVariableInjector.cs new file mode 100644 index 000000000..61eb2b979 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeColorVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeColorVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeColorVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeColorVariableInjector.cs.meta new file mode 100644 index 000000000..240871bb1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeColorVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4309fbcdc5d9498fb9e078a7613db029 +timeCreated: 1736292511 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeComponentVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeComponentVariableInjector.cs new file mode 100644 index 000000000..1245b2514 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeComponentVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeComponentVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeComponentVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeComponentVariableInjector.cs.meta new file mode 100644 index 000000000..a9b50b30b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeComponentVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: aa760b4b8fe24b5c80e72891a88a2d13 +timeCreated: 1736292520 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeFloatVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeFloatVariableInjector.cs new file mode 100644 index 000000000..11ba15830 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeFloatVariableInjector.cs @@ -0,0 +1,8 @@ + +namespace Obvious.Soap +{ + public class RuntimeFloatVariableInjector : RuntimeVariableInjector + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeFloatVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeFloatVariableInjector.cs.meta new file mode 100644 index 000000000..11e2042f4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeFloatVariableInjector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 06526d2f91714f0e882b68eed50d265f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7ac24cd0440b6c941996e400d1a4fda5, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeGameObjectVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeGameObjectVariableInjector.cs new file mode 100644 index 000000000..32cb4b49e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeGameObjectVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeGameObjectVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeGameObjectVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeGameObjectVariableInjector.cs.meta new file mode 100644 index 000000000..dfd45c46a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeGameObjectVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a06f8d87f78f41c58710679bdd408208 +timeCreated: 1736292515 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeIntVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeIntVariableInjector.cs new file mode 100644 index 000000000..cd3edab75 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeIntVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeIntVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeIntVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeIntVariableInjector.cs.meta new file mode 100644 index 000000000..0d38df1e5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeIntVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 947fdc26593546c58402ba0befe7364d +timeCreated: 1736292487 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeQuaternionVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeQuaternionVariableInjector.cs new file mode 100644 index 000000000..18dd66043 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeQuaternionVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeQuaternionVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeQuaternionVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeQuaternionVariableInjector.cs.meta new file mode 100644 index 000000000..7482da5bd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeQuaternionVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c9ae6e7dcdb1449cb8790e9cae8e2b86 +timeCreated: 1736292507 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeStringVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeStringVariableInjector.cs new file mode 100644 index 000000000..e6707d99d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeStringVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeStringVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeStringVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeStringVariableInjector.cs.meta new file mode 100644 index 000000000..58e72cf6a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeStringVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 638a7143be564fdf8a8a8969cdb4a0f8 +timeCreated: 1736292494 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVariableInjector.cs new file mode 100644 index 000000000..41dedb1b8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVariableInjector.cs @@ -0,0 +1,105 @@ +using System.Collections.Generic; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#else +using Obvious.Soap.Attributes; +#endif +using UnityEngine; + +namespace Obvious.Soap +{ + [DefaultExecutionOrder(-1)] + public class RuntimeVariableInjector : MonoBehaviour where TVariable : ScriptableVariableBase + { + [SerializeField] private InjectedVariableWrapper[] _runtimeVariables = null; + + [SerializeField] private bool _debugLogEnabled = false; + + private List> _runtimeInjectedVariables; + + private void Awake() + { + if (_runtimeVariables == null || _runtimeVariables.Length == 0) + { + if (_debugLogEnabled) + Debug.LogWarning($"{nameof(RuntimeVariableInjector)}: No injected variables specified."); + return; + } + + _runtimeInjectedVariables = new List>(); + foreach (var wrapper in _runtimeVariables) + { + var injectedVariable = new InjectedVariable(wrapper); + if (injectedVariable.VariableTemplate != null) + { + var deepCopy = SoapRuntimeUtils.CreateCopy(injectedVariable.VariableTemplate); + injectedVariable.RuntimeVariable = deepCopy; + wrapper.RuntimeVariable = deepCopy; + } + else + { + var runtimeVariable = + SoapRuntimeUtils.CreateRuntimeInstance($"{gameObject.name}_{injectedVariable.Id}"); + injectedVariable.RuntimeVariable = runtimeVariable; + wrapper.RuntimeVariable = runtimeVariable; + } + _runtimeInjectedVariables.Add(injectedVariable); + } + + foreach (var injectedVariable in _runtimeInjectedVariables) + { + SoapRuntimeUtils.InjectInChildren( + gameObject, + injectedVariable.RuntimeVariable, + injectedVariable.Id, + _debugLogEnabled + ); + } + } + } + + [System.Serializable] + internal class InjectedVariableWrapper + { + [Tooltip("This Id has to match the one used in the attribute for a specific variable.")] [SerializeField] + private string _id = ""; + + [SerializeField] +#if ODIN_INSPECTOR + [ReadOnly] +#else + [BeginDisabledGroup] +#endif + private ScriptableVariableBase _runtimeVariable = null; + +#if !ODIN_INSPECTOR + [EndDisabledGroup] +#endif + [SerializeField] + [Tooltip("If set, a deep copy of this variable will be created at runtime. " + + "\n If left null, a new instance will be created.")] + private ScriptableVariableBase _variableTemplate = null; + + public string ID => _id; + public ScriptableVariableBase VariableTemplate => _variableTemplate; + + public ScriptableVariableBase RuntimeVariable + { + get => _runtimeVariable; + set => _runtimeVariable = value; + } + } + + internal class InjectedVariable where TVariable : ScriptableVariableBase + { + public string Id { get; } + public TVariable RuntimeVariable { get; set; } + public TVariable VariableTemplate { get; } + + public InjectedVariable(InjectedVariableWrapper wrapper) + { + Id = wrapper.ID; + VariableTemplate = wrapper.VariableTemplate as TVariable; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVariableInjector.cs.meta new file mode 100644 index 000000000..c42210b73 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVariableInjector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4c0f6cc1127645609af918671a39ce82 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7ac24cd0440b6c941996e400d1a4fda5, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2IntVariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2IntVariableInjector.cs new file mode 100644 index 000000000..638a0b136 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2IntVariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeVector2IntVariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2IntVariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2IntVariableInjector.cs.meta new file mode 100644 index 000000000..cdaab736a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2IntVariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fd97a24a827742039b6c65b0e1a9edae +timeCreated: 1736292501 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2VariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2VariableInjector.cs new file mode 100644 index 000000000..301394e98 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2VariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeVector2VariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2VariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2VariableInjector.cs.meta new file mode 100644 index 000000000..96d94c7a6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector2VariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 64a3fe16b7d342d5955d31d1bda23940 +timeCreated: 1736292497 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector3VariableInjector.cs b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector3VariableInjector.cs new file mode 100644 index 000000000..1cffe461b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector3VariableInjector.cs @@ -0,0 +1,6 @@ +namespace Obvious.Soap +{ + public class RuntimeVector3VariableInjector : RuntimeVariableInjector + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector3VariableInjector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector3VariableInjector.cs.meta new file mode 100644 index 000000000..5920ea492 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/RuntimeInjectors/RuntimeVector3VariableInjector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 671548cdcb164019869c265a53fdb9e8 +timeCreated: 1736292504 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Save.meta b/Assets/Obvious/Soap/Core/Runtime/Save.meta new file mode 100644 index 000000000..698810ebe --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Save.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3dba46d5a730a784db12f430f28fd048 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Save/IReset.cs b/Assets/Obvious/Soap/Core/Runtime/Save/IReset.cs new file mode 100644 index 000000000..56eca0032 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Save/IReset.cs @@ -0,0 +1,17 @@ +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace Obvious.Soap +{ + /// + /// Interface for objects that can be reset to their initial value. + /// + public interface IReset + { + void ResetValue(); +#if UNITY_EDITOR + void OnPlayModeStateChanged(PlayModeStateChange playModeStateChange); +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Save/IReset.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Save/IReset.cs.meta new file mode 100644 index 000000000..30938781f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Save/IReset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2f1a089b4a201e4fa8fb2d1d643b06b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Save/ResettableScriptableObject.cs b/Assets/Obvious/Soap/Core/Runtime/Save/ResettableScriptableObject.cs new file mode 100644 index 000000000..1f38361c9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Save/ResettableScriptableObject.cs @@ -0,0 +1,50 @@ +#if UNITY_EDITOR +using UnityEditor; +#endif +using UnityEngine; + +namespace Obvious.Soap +{ + public abstract class ResettableScriptableObject : ScriptableObject + { + protected string _cachedJson; + +#if UNITY_EDITOR + protected virtual void OnEnable() + { + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + } + + protected virtual void OnDisable() + { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + } + + protected virtual void OnPlayModeStateChanged(PlayModeStateChange playModeStateChange) + { + if (playModeStateChange == PlayModeStateChange.ExitingEditMode) + { + CacheState(); + } + else if (playModeStateChange == PlayModeStateChange.EnteredEditMode) + { + ResetValue(); + } + } + + protected virtual void CacheState() + { + _cachedJson = EditorJsonUtility.ToJson(this, prettyPrint: true); + } + + [ContextMenu("Reset Value")] + public virtual void ResetValue() + { + if (!string.IsNullOrEmpty(_cachedJson)) + { + EditorJsonUtility.FromJsonOverwrite(_cachedJson, this); + } + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Save/ResettableScriptableObject.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Save/ResettableScriptableObject.cs.meta new file mode 100644 index 000000000..addf292bd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Save/ResettableScriptableObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cc0665cf937e17746aab28f77136a40c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableBase.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase.meta new file mode 100644 index 000000000..86fec2b41 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ed6a2c37fbee034182d76727a5af815 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/IDrawObjectsInInspector.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/IDrawObjectsInInspector.cs new file mode 100644 index 000000000..ae1473a02 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/IDrawObjectsInInspector.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Obvious.Soap +{ + /// + /// Interface to get objects that can be drawn in the inspector + /// + public interface IDrawObjectsInInspector + { + IReadOnlyList EditorListeners { get; } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/IDrawObjectsInInspector.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/IDrawObjectsInInspector.cs.meta new file mode 100644 index 000000000..29f77348f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/IDrawObjectsInInspector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e498e4adf2f54a88b454f5402fb01d7f +timeCreated: 1656086814 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/ScriptableBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/ScriptableBase.cs new file mode 100644 index 000000000..e19351774 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/ScriptableBase.cs @@ -0,0 +1,31 @@ +using System; +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif + +namespace Obvious.Soap +{ + /// + /// Base classes of all ScriptableObjects in Soap + /// +#if ODIN_INSPECTOR + public abstract class ScriptableBase : SerializedScriptableObject +#else + public abstract class ScriptableBase : ScriptableObject +#endif + { + internal virtual void Reset() + { + TagIndex = 0; + Description = ""; + } + [HideInInspector] + public Action RepaintRequest; + [HideInInspector] + public int TagIndex = 0; + [HideInInspector] + public string Description = ""; + public virtual Type GetGenericType { get; } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/ScriptableBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/ScriptableBase.cs.meta new file mode 100644 index 000000000..db14041df --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableBase/ScriptableBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d4bb74215c74b0418d738ce69073159 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary.meta new file mode 100644 index 000000000..f9df8825f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ad718c424a97fa4cb2e906e0a7a9b3e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableCollection.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableCollection.cs new file mode 100644 index 000000000..32ed29401 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableCollection.cs @@ -0,0 +1,116 @@ +using System; +using UnityEngine; +using UnityEngine.SceneManagement; +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace Obvious.Soap +{ + public abstract class ScriptableCollection : ScriptableBase, IReset + { + [Tooltip( + "Clear the collection when:\n" + + " Scene Loaded : when a scene is loaded.\n" + + " Application Start : Once, when the application starts. Modifications persist between scenes")] + [SerializeField] protected ResetType _resetOn = ResetType.SceneLoaded; + + [HideInInspector] public Action Modified; + public event Action OnCleared; + public abstract int Count { get; } + public abstract bool CanBeSerialized(); + private ResetType _lastResetType; + + protected virtual void Awake() + { + hideFlags = HideFlags.DontUnloadUnusedAsset; + } + + protected virtual void OnEnable() + { +#if UNITY_EDITOR + _lastResetType = _resetOn; +#endif + if (_resetOn == ResetType.None) + return; + + Clear(); + RegisterResetHooks(_resetOn); + } + + protected virtual void OnDisable() + { + UnregisterResetHooks(_resetOn); + } + + private void RegisterResetHooks(ResetType resetType) + { + if (resetType == ResetType.SceneLoaded) + { + SceneManager.sceneLoaded += OnSceneLoaded; + } +#if UNITY_EDITOR + if (resetType == ResetType.ApplicationStarts || resetType == ResetType.SceneLoaded) + { + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + } +#endif + } + + private void UnregisterResetHooks(ResetType resetType) + { + if (resetType == ResetType.SceneLoaded) + { + SceneManager.sceneLoaded -= OnSceneLoaded; + } +#if UNITY_EDITOR + if (resetType == ResetType.ApplicationStarts || resetType == ResetType.SceneLoaded) + { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + } +#endif + } + + protected virtual void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + if (mode == LoadSceneMode.Single) + { + Clear(); + } + } + + public virtual void Clear() + { + OnCleared?.Invoke(); + Modified?.Invoke(); + } + + internal override void Reset() + { + base.Reset(); + _resetOn = ResetType.SceneLoaded; + Clear(); + } + + public void ResetValue() => Clear(); + +#if UNITY_EDITOR + public virtual void OnPlayModeStateChanged(PlayModeStateChange playModeStateChange) + { + if (playModeStateChange == PlayModeStateChange.EnteredEditMode || + playModeStateChange == PlayModeStateChange.ExitingEditMode) + Clear(); + } + + private void OnValidate() + { + if (_lastResetType != _resetOn) + { + UnregisterResetHooks(_lastResetType); + RegisterResetHooks(_resetOn); + _lastResetType = _resetOn; + } + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableCollection.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableCollection.cs.meta new file mode 100644 index 000000000..6a8fdfb72 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableCollection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0feea8ee55364f4b9683b75d66c3f37c +timeCreated: 1737327539 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionary.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionary.cs new file mode 100644 index 000000000..668112607 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionary.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace Obvious.Soap +{ + public abstract class ScriptableDictionary : ScriptableDictionaryBase, IDictionary + { + [SerializeField] protected Dictionary _dictionary = new Dictionary(); + + public override int Count => _dictionary.Count; + public bool IsReadOnly => false; + public bool IsEmpty => _dictionary.Count == 0; + + /// Event raised when an item is added to the list. + public event Action OnItemAdded; + + /// Event raised when an item is removed from the list. + public event Action OnItemRemoved; + + public V this[T key] + { + get => _dictionary[key]; + set + { + _dictionary[key] = value; + Modified?.Invoke(); + } + } + + public ICollection Keys => _dictionary.Keys; + public ICollection Values => _dictionary.Values; + public override Type GetGenericType => typeof(T); + + + /// + /// Adds an item to the dictionary. + /// Raises OnItemAdded and OnModified event. + /// + /// + public void Add(KeyValuePair item) + { + Add(item.Key, item.Value); + } + + /// + /// Adds a key and value to the dictionary. + /// Raises OnItemAdded and OnModified event. + /// + /// + /// + public void Add(T key, V value) + { + _dictionary.Add(key, value); + OnItemAdded?.Invoke(key, value); + Modified?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + /// + /// Checks if the dictionary contains a key. + /// Then adds the key and value to the dictionary. + /// + /// + /// + /// True if succeeded + public bool TryAdd(T key, V value) + { + if (_dictionary.ContainsKey(key)) + { + return false; + } + + Add(key, value); + return true; + } + + /// + /// Removes an item from the dictionary. + /// + /// + /// + public bool Remove(KeyValuePair item) + { + return Remove(item.Key); + } + + /// + /// Tries to Remove an item from the dictionary using a key. + /// If Success, raises OnItemRemoved and OnModified event. + /// + /// + /// + public bool Remove(T key) + { + if (!_dictionary.TryGetValue(key, out var value)) + return false; + var removedFromList = _dictionary.Remove(key); + if (removedFromList) + { + OnItemRemoved?.Invoke(key,value); + Modified?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + return true; + } + + return false; + } + + /// + /// Tries to get a value from the dictionary using a key. + /// + /// + /// + /// + public bool TryGetValue(T key, out V value) + { + return _dictionary.TryGetValue(key, out value); + } + + public override void Clear() + { + _dictionary.Clear(); + base.Clear(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + public bool Contains(KeyValuePair item) + { + return _dictionary.Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + var i = arrayIndex; + foreach (var pair in _dictionary) + { + array[i] = pair; + i++; + } + } + + public bool ContainsKey(T key) + { + return _dictionary.ContainsKey(key); + } + + public bool ContainsValue(V value) + { + return _dictionary.ContainsValue(value); + } + + public IEnumerator> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public override bool CanBeSerialized() + { + var canKeyBeSerialized = SoapUtils.IsUnityType(typeof(T)) || + SoapUtils.IsSerializable(typeof(T)); + var canValueBeSerialized = SoapUtils.IsUnityType(typeof(V)) || + SoapUtils.IsSerializable(typeof(V)); + var canBeSerialized = canKeyBeSerialized && canValueBeSerialized; + return canBeSerialized; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionary.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionary.cs.meta new file mode 100644 index 000000000..c13396439 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cbd7c4c9626794a4e83edc0f434c235b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionaryBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionaryBase.cs new file mode 100644 index 000000000..5533a7c15 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionaryBase.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-dictionary")] + public abstract class ScriptableDictionaryBase : ScriptableCollection + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionaryBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionaryBase.cs.meta new file mode 100644 index 000000000..ecb2092cb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableDictionary/ScriptableDictionaryBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 574c3e833db7381459a36db968e615a0 +timeCreated: 1675031072 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums.meta new file mode 100644 index 000000000..0f31bf0c2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3226e4cc472d210439f8e9adb777ce72 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums/ScriptableEnumBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums/ScriptableEnumBase.cs new file mode 100644 index 000000000..bc1e7d121 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums/ScriptableEnumBase.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-enum")] + public abstract class ScriptableEnumBase : ScriptableBase + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums/ScriptableEnumBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums/ScriptableEnumBase.cs.meta new file mode 100644 index 000000000..ec79c7929 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEnums/ScriptableEnumBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a968fca847314c5285a5b1586b1ad1c5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents.meta new file mode 100644 index 000000000..a7fde72fe --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4a7850133d8e6584bb9889782f85a552 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener.meta new file mode 100644 index 000000000..31f0c7a41 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 66c9748321f623d458ffaabf2176a2df +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBase.cs new file mode 100644 index 000000000..ecc4d671b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBase.cs @@ -0,0 +1,61 @@ +using System.Threading; +using UnityEngine; + +namespace Obvious.Soap +{ + /// + /// Base class for all event listeners + /// + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/event-listener")] + public abstract class EventListenerBase : MonoBehaviour + { + protected enum Binding + { + UNTIL_DESTROY, + UNTIL_DISABLE + } + + [SerializeField] protected Binding _binding = Binding.UNTIL_DESTROY; + [SerializeField] protected bool _disableAfterSubscribing = false; + protected readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); + + protected abstract void ToggleRegistration(bool toggle); + + /// + /// Returns true if the event listener contains a call to the method with the given name + /// + public abstract bool ContainsCallToMethod(string methodName); + + protected virtual void Awake() + { + if (_binding == Binding.UNTIL_DESTROY) + ToggleRegistration(true); + + gameObject.SetActive(!_disableAfterSubscribing); + } + + protected virtual void OnEnable() + { + if (_binding == Binding.UNTIL_DISABLE) + ToggleRegistration(true); + } + + protected virtual void OnDisable() + { + if (_binding == Binding.UNTIL_DISABLE) + { + ToggleRegistration(false); + _cancellationTokenSource.Cancel(); + } + } + + protected virtual void OnDestroy() + { + if (_binding == Binding.UNTIL_DESTROY) + { + ToggleRegistration(false); + _cancellationTokenSource.Cancel(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBase.cs.meta new file mode 100644 index 000000000..bc57b1dd9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8f4d2d3fb5e4a33b2cc509626f7313f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBool.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBool.cs new file mode 100644 index 000000000..dc77345c8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBool.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Serialization; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventBool + /// + [AddComponentMenu("Soap/EventListeners/EventListenerBool")] + public class EventListenerBool : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventBool _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private BoolUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class BoolUnityEvent : UnityEvent + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBool.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBool.cs.meta new file mode 100644 index 000000000..0f2a7e73b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerBool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e64750262007f204b879cd45e18965e5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerColor.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerColor.cs new file mode 100644 index 000000000..2249d3554 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerColor.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventColor + /// + [AddComponentMenu("Soap/EventListeners/EventListenerColor")] + public class EventListenerColor : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventColor _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private ColorUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class ColorUnityEvent : UnityEvent + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerColor.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerColor.cs.meta new file mode 100644 index 000000000..16d8be1c5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerColor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d16da97870a756e4b9063178aca2c848 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerComponent.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerComponent.cs new file mode 100644 index 000000000..f5cf97c20 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerComponent.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + [AddComponentMenu("Soap/EventListeners/EventListenerComponent")] + public class EventListenerComponent : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventComponent _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private ComponentUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class ComponentUnityEvent : UnityEvent + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerComponent.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerComponent.cs.meta new file mode 100644 index 000000000..a489d51e5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerComponent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 04727cc775fa20d4c821cb3c9f304468 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerFloat.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerFloat.cs new file mode 100644 index 000000000..27642dd30 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerFloat.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Serialization; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventFloat + /// + [AddComponentMenu("Soap/EventListeners/EventListenerFloat")] + public class EventListenerFloat : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventFloat _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private FloatUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class FloatUnityEvent : UnityEvent + { + + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerFloat.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerFloat.cs.meta new file mode 100644 index 000000000..d4a5566f5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerFloat.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1d0e4e54c3505e9428c41e7621def42c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGameObject.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGameObject.cs new file mode 100644 index 000000000..84716a392 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGameObject.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventGameObject + /// + [AddComponentMenu("Soap/EventListeners/EventListenerGameObject")] + public class EventListenerGameObject : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventGameObject _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private GameObjectUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class GameObjectUnityEvent : UnityEvent + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGameObject.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGameObject.cs.meta new file mode 100644 index 000000000..a54e66fa4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGameObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a09b9b4be86d5f4b83fa4de77c033f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGeneric.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGeneric.cs new file mode 100644 index 000000000..023a71548 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGeneric.cs @@ -0,0 +1,149 @@ +using System; +using UnityEngine.Events; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using UnityEngine; +using System.Collections; + +namespace Obvious.Soap +{ + public abstract class EventListenerGeneric : EventListenerBase + { + protected virtual EventResponse[] EventResponses { get; } + + private readonly Dictionary, EventResponse> _dictionary = + new Dictionary, EventResponse>(); + + protected override void ToggleRegistration(bool toggle) + { + foreach (var eventResponse in EventResponses) + { + if (toggle) + { + eventResponse.ScriptableEvent.RegisterListener(this); + if (!_dictionary.ContainsKey(eventResponse.ScriptableEvent)) + _dictionary.Add(eventResponse.ScriptableEvent, eventResponse); + } + else + { + eventResponse.ScriptableEvent.UnregisterListener(this); + if (_dictionary.ContainsKey(eventResponse.ScriptableEvent)) + _dictionary.Remove(eventResponse.ScriptableEvent); + } + } + } + + internal void OnEventRaised(ScriptableEvent eventRaised, T param, bool debug = false) + { + var eventResponse = _dictionary[eventRaised]; + if (eventResponse.Delay > 0) + { + if (gameObject.activeInHierarchy) + StartCoroutine(Cr_DelayInvokeResponse(eventRaised, eventResponse, param, debug)); + else + DelayInvokeResponseAsync(eventRaised, eventResponse, param, debug, _cancellationTokenSource.Token); + } + else + InvokeResponse(eventRaised, eventResponse, param, debug); + } + + private IEnumerator Cr_DelayInvokeResponse(ScriptableEvent eventRaised, EventResponse eventResponse, T param, + bool debug) + { + yield return new WaitForSeconds(eventResponse.Delay); + InvokeResponse(eventRaised, eventResponse, param, debug); + } + + private async void DelayInvokeResponseAsync(ScriptableEvent eventRaised, EventResponse eventResponse, T param, + bool debug, CancellationToken cancellationToken) + { + try + { + await Task.Delay((int)(eventResponse.Delay * 1000), cancellationToken); + InvokeResponse(eventRaised, eventResponse, param, debug); + } + catch (TaskCanceledException) + { + } + } + + private void InvokeResponse(ScriptableEvent eventRaised, EventResponse eventResponse, T param, bool debug) + { + eventResponse.Response?.Invoke(param); + if (debug) + Debug(eventRaised); + } + + protected virtual void Debug(ScriptableEvent eventRaised) + { + var response = _dictionary[eventRaised].Response; + var registeredListenerCount = response.GetPersistentEventCount(); + + for (var i = 0; i < registeredListenerCount; i++) + { + var sb = new StringBuilder(); + sb.Append("[Event] "); + sb.Append(eventRaised.name); + sb.Append(" => "); + sb.Append(response.GetPersistentTarget(i).name); + sb.Append("."); + sb.Append(response.GetPersistentMethodName(i)); + sb.Append("()"); + UnityEngine.Debug.Log(sb.ToString(), gameObject); + } + } + + public override bool ContainsCallToMethod(string methodName) + { + var containsMethod = false; + foreach (var eventResponse in EventResponses) + { + var registeredListenerCount = eventResponse.Response.GetPersistentEventCount(); + + for (var i = 0; i < registeredListenerCount; i++) + { + if (eventResponse.Response.GetPersistentMethodName(i) == methodName) + { + var sb = new StringBuilder(); + sb.Append($"{methodName}()"); + sb.Append(" is called by: [Event] "); + sb.Append(eventResponse.ScriptableEvent.name); + UnityEngine.Debug.Log(sb.ToString(), gameObject); + containsMethod = true; + break; + } + } + } + + return containsMethod; + } + + [Serializable] + public class EventResponse : ISerializationCallbackReceiver + { + public virtual ScriptableEvent ScriptableEvent { get; } + [Tooltip("Delay in seconds before invoking the response.")] + public FloatReference Delay = new FloatReference(0, true); + public virtual UnityEvent Response { get; } + + [NonSerialized] + private bool _isInitialized = false; + + public void OnBeforeSerialize() + { + } + + public void OnAfterDeserialize() + { + // Set Delay to use local only if it hasn't been initialized yet + if (!_isInitialized && Delay.Variable == null) + { + Delay.UseLocal = true; + _isInitialized = true; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGeneric.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGeneric.cs.meta new file mode 100644 index 000000000..9a8502595 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerGeneric.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 85e92f331570c8543ae177f6ad340292 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerInt.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerInt.cs new file mode 100644 index 000000000..e2e516797 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerInt.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventInt. + /// + [AddComponentMenu("Soap/EventListeners/EventListenerInt")] + public class EventListenerInt : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventInt _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private IntUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class IntUnityEvent : UnityEvent + { + } + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerInt.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerInt.cs.meta new file mode 100644 index 000000000..46a10558e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerInt.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f30bb439e6d7dc94489cd1be18593b0e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerNoParam.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerNoParam.cs new file mode 100644 index 000000000..27453a8d5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerNoParam.cs @@ -0,0 +1,155 @@ +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventNoParam. + /// + [AddComponentMenu("Soap/EventListeners/EventListenerNoParam")] + public class EventListenerNoParam : EventListenerBase + { + [SerializeField] private EventResponse[] _eventResponses = null; + + private readonly Dictionary _dictionary = + new Dictionary(); + + protected override void ToggleRegistration(bool toggle) + { + foreach (var eventResponse in _eventResponses) + { + if (toggle) + { + eventResponse.ScriptableEvent.RegisterListener(this); + if (!_dictionary.ContainsKey(eventResponse.ScriptableEvent)) + _dictionary.Add(eventResponse.ScriptableEvent, eventResponse); + } + else + { + eventResponse.ScriptableEvent.UnregisterListener(this); + if (_dictionary.ContainsKey(eventResponse.ScriptableEvent)) + _dictionary.Remove(eventResponse.ScriptableEvent); + } + } + } + + internal void OnEventRaised(ScriptableEventNoParam eventRaised, bool debug = false) + { + var eventResponse = _dictionary[eventRaised]; + if (eventResponse.Delay > 0) + { + if (gameObject.activeInHierarchy) + StartCoroutine(Cr_DelayInvokeResponse(eventRaised, eventResponse, debug)); + else + DelayInvokeResponseAsync(eventRaised, eventResponse, debug, _cancellationTokenSource.Token); + } + else + InvokeResponse(eventRaised, eventResponse, debug); + } + + private IEnumerator Cr_DelayInvokeResponse(ScriptableEventNoParam eventRaised, EventResponse eventResponse, + bool debug) + { + yield return new WaitForSeconds(eventResponse.Delay); + InvokeResponse(eventRaised, eventResponse, debug); + } + + private async void DelayInvokeResponseAsync(ScriptableEventNoParam eventRaised, EventResponse eventResponse, + bool debug, CancellationToken cancellationToken) + { + try + { + await Task.Delay((int)(eventResponse.Delay * 1000), cancellationToken); + InvokeResponse(eventRaised, eventResponse, debug); + } + catch (TaskCanceledException) + { + } + } + + private void InvokeResponse(ScriptableEventNoParam eventRaised, EventResponse eventResponse, bool debug) + { + eventResponse.Response?.Invoke(); + if (debug) + Debug(eventRaised); + } + + [System.Serializable] + internal class EventResponse : ISerializationCallbackReceiver + { + [Tooltip("Delay in seconds before invoking the response.")] + public FloatReference Delay = new FloatReference(0,true); + + public ScriptableEventNoParam ScriptableEvent; + public UnityEvent Response; + + [System.NonSerialized] + private bool _isInitialized = false; + + public void OnBeforeSerialize() + { + } + + public void OnAfterDeserialize() + { + // Set Delay to use local only if it hasn't been initialized yet + if (!_isInitialized && Delay.Variable == null) + { + Delay.UseLocal = true; + _isInitialized = true; + } + } + } + + #region Debugging + + private void Debug(ScriptableEventNoParam eventRaised) + { + var response = _dictionary[eventRaised].Response; + var registeredListenerCount = response.GetPersistentEventCount(); + + for (var i = 0; i < registeredListenerCount; i++) + { + var debugText = "[Event] "; + debugText += eventRaised.name; + debugText += " => "; + debugText += response.GetPersistentTarget(i); + debugText += "."; + debugText += response.GetPersistentMethodName(i); + debugText += "()"; + UnityEngine.Debug.Log(debugText, gameObject); + } + } + + public override bool ContainsCallToMethod(string methodName) + { + var containsMethod = false; + foreach (var eventResponse in _eventResponses) + { + var registeredListenerCount = eventResponse.Response.GetPersistentEventCount(); + + for (int i = 0; i < registeredListenerCount; i++) + { + if (eventResponse.Response.GetPersistentMethodName(i) == methodName) + { + var debugText = $"{methodName}()"; + debugText += " is called by the event: "; + debugText += eventResponse.ScriptableEvent.name; + debugText += ""; + UnityEngine.Debug.Log(debugText, gameObject); + containsMethod = true; + break; + } + } + } + + return containsMethod; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerNoParam.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerNoParam.cs.meta new file mode 100644 index 000000000..9bffdf845 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerNoParam.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d93ba61543949824db31c7cb89b4f009 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerQuaternion.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerQuaternion.cs new file mode 100644 index 000000000..8ef25d881 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerQuaternion.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using UnityEngine.Events; +using Obvious.Soap; + +namespace Obvious.Soap +{ + [AddComponentMenu("Soap/EventListeners/EventListenerQuaternion")] + public class EventListenerQuaternion : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventQuaternion _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + [SerializeField] private QuaternionUnityEvent _response = null; + public override UnityEvent Response => _response; + } + [System.Serializable] + public class QuaternionUnityEvent : UnityEvent + { + + } + } +} diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerQuaternion.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerQuaternion.cs.meta new file mode 100644 index 000000000..9d928899c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerQuaternion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9321b24d9dbc1af43a0062ad96d8a2db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerString.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerString.cs new file mode 100644 index 000000000..b553679aa --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerString.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + /// + /// A listener for a ScriptableEventString. + /// + [AddComponentMenu("Soap/EventListeners/EventListenerString")] + public class EventListenerString : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventString _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private StringUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class StringUnityEvent : UnityEvent + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerString.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerString.cs.meta new file mode 100644 index 000000000..6c0c275a0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerString.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2be4161beb6babe428f8453728aa3300 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2.cs new file mode 100644 index 000000000..37c270882 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + [AddComponentMenu("Soap/EventListeners/EventListenerVector2")] + public class EventListenerVector2 : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventVector2 _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private Vector2UnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class Vector2UnityEvent : UnityEvent + { + } + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2.cs.meta new file mode 100644 index 000000000..314c83d76 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8b46fc160b957184ba7d1ed7716d1fcb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2Int.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2Int.cs new file mode 100644 index 000000000..371ab0f41 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2Int.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + [AddComponentMenu("Soap/EventListeners/EventListenerVector2Int")] + public class EventListenerVector2Int : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventVector2Int _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private Vector2IntUnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class Vector2IntUnityEvent : UnityEvent + { + + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2Int.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2Int.cs.meta new file mode 100644 index 000000000..f89023ffc --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector2Int.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6e4bf021e1d431447a582cf076d374db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector3.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector3.cs new file mode 100644 index 000000000..5e0e4addf --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector3.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap +{ + [AddComponentMenu("Soap/EventListeners/EventListenerVector3")] + public class EventListenerVector3 : EventListenerGeneric + { + [SerializeField] private EventResponse[] _eventResponses = null; + protected override EventResponse[] EventResponses => _eventResponses; + + [System.Serializable] + public class EventResponse : EventResponse + { + [SerializeField] private ScriptableEventVector3 _scriptableEvent = null; + public override ScriptableEvent ScriptableEvent => _scriptableEvent; + + [SerializeField] private Vector3UnityEvent _response = null; + public override UnityEvent Response => _response; + } + + [System.Serializable] + public class Vector3UnityEvent : UnityEvent + { + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector3.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector3.cs.meta new file mode 100644 index 000000000..2071235e2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/EventListener/EventListenerVector3.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 43f91a7ff6f55e448b69d6d2121dcc06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: f26f39c2872ef84439641da6a91f8b92, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEvent.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEvent.cs new file mode 100644 index 000000000..58105424b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEvent.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using UnityEngine; +using Object = UnityEngine.Object; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif + +namespace Obvious.Soap +{ + public abstract class ScriptableEvent : ScriptableEventBase, IDrawObjectsInInspector + { +#if ODIN_INSPECTOR + [HideInInspector] +#endif + [Tooltip("Value used when raising the event in editor.")] + [SerializeField] protected T _debugValue = default(T); + + private readonly List> _eventListeners = new List>(); + private readonly List _listenersObjects = new List(); + protected Action _onRaised = null; + +#if ODIN_INSPECTOR + [HideInEditorMode] + [ShowInInspector,EnableGUI] + public IEnumerable Listeners => EditorListeners; +#endif + + /// + /// Action triggered when this event has been raised. + /// Subscribe to this action if you want to bind methods to this event. + /// + public event Action OnRaised + { + add + { + _onRaised += value; +#if UNITY_EDITOR + var listener = value.Target as Object; + AddListener(listener); +#endif + } + remove + { + _onRaised -= value; +#if UNITY_EDITOR + var listener = value.Target as Object; + RemoveListener(listener); +#endif + } + } + + public override Type GetGenericType => typeof(T); + +#if ODIN_INSPECTOR + [Button] + [DisableInEditorMode] +#endif + public virtual void Raise(T param) + { + if (!Application.isPlaying) + return; + + for (var i = _eventListeners.Count - 1; i >= 0; i--) + _eventListeners[i].OnEventRaised(this, param, _debugLogEnabled); + + _onRaised?.Invoke(param); + +#if UNITY_EDITOR + //As this uses reflection, I only allow it to be called in Editor. + //If you want to display debug in builds, delete the #if UNITY_EDITOR + if (_debugLogEnabled) + Debug(); +#endif + } + + internal void RegisterListener(EventListenerGeneric listener) + { + if (!_eventListeners.Contains(listener)) + _eventListeners.Add(listener); + } + + internal void UnregisterListener(EventListenerGeneric listener) + { + if (_eventListeners.Contains(listener)) + _eventListeners.Remove(listener); + } + + public IReadOnlyList EditorListeners => _listenersObjects.AsReadOnly(); + + protected virtual void Debug() + { + if (_onRaised == null) + return; + var delegates = _onRaised.GetInvocationList(); + foreach (var del in delegates) + { + var sb = new StringBuilder(); + sb.Append("[Event] "); + sb.Append(name); + sb.Append(" => "); + sb.Append(del.GetMethodInfo().Name); + sb.Append("()"); + var monoBehaviour = del.Target as MonoBehaviour; + UnityEngine.Debug.Log(sb.ToString(), monoBehaviour?.gameObject); + } + } + + internal override void Reset() + { + base.Reset(); + _debugLogEnabled = false; + _debugValue = default; + } + +#if UNITY_EDITOR + public void AddListener(Object listener) + { + if (listener != null && !_listenersObjects.Contains(listener)) + _listenersObjects.Add(listener); + } + + public void RemoveListener(Object listener) + { + if (_listenersObjects.Contains(listener)) + _listenersObjects.Remove(listener); + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEvent.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEvent.cs.meta new file mode 100644 index 000000000..a5bd44bd2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEvent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f6138a28930ffe84090896685ef44334 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBase.cs new file mode 100644 index 000000000..b43f856f9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBase.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-event")] + public abstract class ScriptableEventBase : ScriptableBase + { + [Tooltip("Enable console logs when this event is raised.")] + [SerializeField] + protected bool _debugLogEnabled = false; + public bool DebugLogEnabled => _debugLogEnabled; + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBase.cs.meta new file mode 100644 index 000000000..383d95eb1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5042562b9a41436689455a448ce493b9 +timeCreated: 1675031077 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBool.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBool.cs new file mode 100644 index 000000000..50e474ecd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBool.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_bool.asset", menuName = "Soap/ScriptableEvents/bool")] + public class ScriptableEventBool : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBool.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBool.cs.meta new file mode 100644 index 000000000..d0e567cf2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventBool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e2fb1c8bab02427087aa07a952ef4018 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventColor.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventColor.cs new file mode 100644 index 000000000..de4696caa --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventColor.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_color.asset", menuName = "Soap/ScriptableEvents/color")] + public class ScriptableEventColor : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventColor.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventColor.cs.meta new file mode 100644 index 000000000..8cf257d02 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventColor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a43c7f7efecc05440a913fce1435b648 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventComponent.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventComponent.cs new file mode 100644 index 000000000..d544d4fb6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventComponent.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_component.asset", menuName = "Soap/ScriptableEvents/Component")] + public class ScriptableEventComponent: ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventComponent.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventComponent.cs.meta new file mode 100644 index 000000000..a6aa8567a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventComponent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 567d4db8da90a0748b767129f175ca02 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventFloat.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventFloat.cs new file mode 100644 index 000000000..e0b1bacb5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventFloat.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_float.asset", menuName = "Soap/ScriptableEvents/float")] + public class ScriptableEventFloat : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventFloat.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventFloat.cs.meta new file mode 100644 index 000000000..b0329ff6c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventFloat.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 968e031fe5a84c64b770b6a8940c8913 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventGameObject.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventGameObject.cs new file mode 100644 index 000000000..faf6c8d71 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventGameObject.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_gameObject.asset", menuName = "Soap/ScriptableEvents/GameObject")] + public class ScriptableEventGameObject : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventGameObject.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventGameObject.cs.meta new file mode 100644 index 000000000..96d50cce5 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventGameObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3b4ca911a693eb84c8065b54815ee711 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventInt.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventInt.cs new file mode 100644 index 000000000..09af3b997 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventInt.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_int.asset", menuName = "Soap/ScriptableEvents/int")] + public class ScriptableEventInt : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventInt.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventInt.cs.meta new file mode 100644 index 000000000..5533863d0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventInt.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ed2a53a13d3e4066b3ccfe94e017a207 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventNoParam.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventNoParam.cs new file mode 100644 index 000000000..afad03bd8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventNoParam.cs @@ -0,0 +1,129 @@ +using System; +using UnityEngine; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using Object = UnityEngine.Object; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_noParam.asset", menuName = "Soap/ScriptableEvents/No Parameters")] + public class ScriptableEventNoParam : ScriptableEventBase, IDrawObjectsInInspector + { + private readonly List _eventListeners = new List(); + private readonly List _listenersObjects = new List(); + +#if ODIN_INSPECTOR + [HideInEditorMode] + [ShowInInspector,EnableGUI] + public IEnumerable Listeners => EditorListeners; +#endif + + protected Action _onRaised = null; + + /// + /// Action raised when this event is raised. + /// + public event Action OnRaised + { + add + { + _onRaised += value; + +#if UNITY_EDITOR + var listener = value.Target as Object; + AddListener(listener); +#endif + } + remove + { + _onRaised -= value; + +#if UNITY_EDITOR + var listener = value.Target as Object; + RemoveListener(listener); +#endif + } + } + +#if ODIN_INSPECTOR + [Button] + [DisableInEditorMode] +#endif + public virtual void Raise() + { + if (!Application.isPlaying) + return; + + for (var i = _eventListeners.Count - 1; i >= 0; i--) + _eventListeners[i].OnEventRaised(this, _debugLogEnabled); + + _onRaised?.Invoke(); + +#if UNITY_EDITOR + //As this uses reflection, I only allow it to be called in Editor. + //If you want to display debug in builds, delete the #if UNITY_EDITOR + if (_debugLogEnabled) + Debug(); +#endif + } + + internal void RegisterListener(EventListenerNoParam listener) + { + if (!_eventListeners.Contains(listener)) + _eventListeners.Add(listener); + } + + internal void UnregisterListener(EventListenerNoParam listener) + { + if (_eventListeners.Contains(listener)) + _eventListeners.Remove(listener); + } + + public IReadOnlyList EditorListeners => _listenersObjects.AsReadOnly(); + + protected virtual void Debug() + { + if (_onRaised == null) + return; + var delegates = _onRaised.GetInvocationList(); + foreach (var del in delegates) + { + var sb = new StringBuilder(); + sb.Append("[Event] "); + sb.Append(name); + sb.Append(" => "); + sb.Append(del.GetMethodInfo().Name); + sb.Append("()"); + var monoBehaviour = del.Target as MonoBehaviour; + UnityEngine.Debug.Log(sb.ToString(), monoBehaviour?.gameObject); + } + } + + internal override void Reset() + { + base.Reset(); + _debugLogEnabled = false; + } + + public override Type GetGenericType => typeof(void); + + +#if UNITY_EDITOR + public void AddListener(Object listener) + { + if (listener != null && !_listenersObjects.Contains(listener)) + _listenersObjects.Add(listener); + } + + public void RemoveListener(Object listener) + { + if (_listenersObjects.Contains(listener)) + _listenersObjects.Remove(listener); + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventNoParam.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventNoParam.cs.meta new file mode 100644 index 000000000..e50bce8fa --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventNoParam.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a49b7e678b3ebb7418adb84806d24646 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventQuaternion.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventQuaternion.cs new file mode 100644 index 000000000..a9b9d7d1a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventQuaternion.cs @@ -0,0 +1,11 @@ +using UnityEngine; +using Obvious.Soap; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_" + nameof(Quaternion), menuName = "Soap/ScriptableEvents/"+ nameof(Quaternion))] + public class ScriptableEventQuaternion : ScriptableEvent + { + + } +} diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventQuaternion.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventQuaternion.cs.meta new file mode 100644 index 000000000..401b22b8f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventQuaternion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bd2c166b1cb80041b394874c35c54c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventString.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventString.cs new file mode 100644 index 000000000..9ec43f58b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventString.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_string.asset", menuName = "Soap/ScriptableEvents/string")] + public class ScriptableEventString : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventString.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventString.cs.meta new file mode 100644 index 000000000..bd9ad59a3 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventString.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d3f39f579066605409b539400e8d7b94 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2.cs new file mode 100644 index 000000000..6a3b57d38 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_vector2.asset", menuName = "Soap/ScriptableEvents/Vector2")] + public class ScriptableEventVector2 : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2.cs.meta new file mode 100644 index 000000000..7cec51309 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d2cfa1f27044fbc4fa2bc609d1f4010d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2Int.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2Int.cs new file mode 100644 index 000000000..4bd35e670 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2Int.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_vector2Int", menuName = "Soap/ScriptableEvents/Vector2Int")] + public class ScriptableEventVector2Int : ScriptableEvent + { + + } +} diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2Int.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2Int.cs.meta new file mode 100644 index 000000000..701e58b15 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector2Int.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 95458aedb81d064468a15bfe81715111 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector3.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector3.cs new file mode 100644 index 000000000..be238233c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector3.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_event_vector3.asset", menuName = "Soap/ScriptableEvents/Vector3")] + public class ScriptableEventVector3 : ScriptableEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector3.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector3.cs.meta new file mode 100644 index 000000000..a670ed552 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableEvents/ScriptableEventVector3.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 076e8e1f1417a0b4c8e48e5c8e2057b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c90dc5e2923623d4ea37625d5bc56bd8, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists.meta new file mode 100644 index 000000000..3347c3e26 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f46867db7cc94a47948ef3bfba88665 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableList.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableList.cs new file mode 100644 index 000000000..066ea1181 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableList.cs @@ -0,0 +1,264 @@ +using System.Collections.Generic; +using UnityEngine; +using System; +using System.Collections; +using System.Linq; +using Object = UnityEngine.Object; +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace Obvious.Soap +{ + public abstract class ScriptableList : ScriptableListBase, IList, IDrawObjectsInInspector + { + [SerializeField] protected List _list = new List(); + private readonly Dictionary _itemCounts = new Dictionary(); + + public override int Count => _list.Count; + public bool IsReadOnly => false; + public bool IsEmpty => _list.Count == 0; + public override Type GetGenericType => typeof(T); + + /// + /// Indexer: Access an item in the list by index. + /// + public T this[int index] + { + get => _list[index]; + set => _list[index] = value; + } + + /// Event raised when an item is added or removed from the list. + [Obsolete("Use Modified instead")] + public event Action OnItemCountChanged; + + /// Event raised when an item is added to the list. + public event Action OnItemAdded; + + /// Event raised when an item is removed from the list. + public event Action OnItemRemoved; + + /// Event raised when multiple item are added to the list. + public event Action> OnItemsAdded; + + /// Event raised when multiple items are removed from the list. + public event Action> OnItemsRemoved; + + public int IndexOf(T item) => _list.IndexOf(item); + public bool Contains(T item) => _itemCounts.ContainsKey(item); + + /// + /// Adds an item to the list. + /// Raises OnItemCountChanged and OnItemAdded event. + /// + public void Add(T item) + { + _list.Add(item); + TryAddItemToDictionary(item); + RaiseItemAddedEvents(item); + } + + /// + /// Adds an item to the list only if it's not in the list. + /// If success, raises OnItemCountChanged and OnItemAdded event. + /// + public bool TryAdd(T item) + { + if (_itemCounts.ContainsKey(item)) + return false; + + Add(item); + return true; + } + + /// + /// Inserts an item at the specified index. + /// + public void Insert(int index, T item) + { + _list.Insert(index, item); + TryAddItemToDictionary(item); + RaiseItemAddedEvents(item); + } + + /// + /// Adds a range of items to the list. + /// Raises OnItemCountChanged and OnItemsAdded event once, after all items have been added. + /// + public void AddRange(IEnumerable items) + { + var collection = items.ToArray(); + if (collection.Length == 0) + return; + + _list.AddRange(collection); + foreach (var item in collection) + { + TryAddItemToDictionary(item); + } + + RaiseItemsAddedEvents(collection); + } + + /// + /// Adds a range of items to the list. An item is only added if its not in the list. + /// Raises OnItemCountChanged and OnItemsAdded event once, after all items have been added. + /// + public bool TryAddRange(IEnumerable items) + { + var uniqueItems = items.Where(item => !_itemCounts.ContainsKey(item)).ToList(); + if (uniqueItems.Count > 0) + { + AddRange(uniqueItems); + return true; + } + return false; + } + + public void CopyTo(T[] array, int arrayIndex) + { + _list.CopyTo(array, arrayIndex); + } + + /// + /// Removes an item from the list only if it's in the list. + /// If Success, raises OnItemCountChanged and OnItemRemoved event. + /// + /// + public bool Remove(T item) + { + if (!_itemCounts.ContainsKey(item)) + return false; + + _list.Remove(item); + _itemCounts[item]--; + if (_itemCounts[item] == 0) + _itemCounts.Remove(item); + + RaiseItemRemovedEvents(item); + return true; + } + + bool ICollection.Remove(T item) + { + return Remove(item); + } + + /// + /// Removes an item from the list at a specific index. + /// + /// + public void RemoveAt(int index) + { + var item = _list[index]; + _list.RemoveAt(index); + _itemCounts[item]--; + if (_itemCounts[item] == 0) + _itemCounts.Remove(item); + + RaiseItemRemovedEvents(item); + } + + /// + /// Removes a range of items from the list. + /// Raises OnItemCountChanged and OnItemsAdded event once, after all items have been added. + /// + /// Starting Index + /// Amount of Items + public bool RemoveRange(int index, int count) + { + if (index < 0 || count < 0 || index + count > _list.Count) + return false; + + var itemsToRemove = _list.GetRange(index, count); + foreach (var item in itemsToRemove) + { + _itemCounts[item]--; + if (_itemCounts[item] == 0) + _itemCounts.Remove(item); + } + + _list.RemoveRange(index, count); + RaiseItemsRemovedEvents(itemsToRemove); + return true; + } + + public override void Clear() + { + _itemCounts.Clear(); + _list.Clear(); + base.Clear(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + private void TryAddItemToDictionary(T item) + { + if (_itemCounts.ContainsKey(item)) + _itemCounts[item]++; + else + _itemCounts[item] = 1; + } + + private void RaiseItemAddedEvents(T item) + { + OnItemCountChanged?.Invoke(); + OnItemAdded?.Invoke(item); + Modified?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + private void RaiseItemsAddedEvents(IEnumerable items) + { + OnItemCountChanged?.Invoke(); + OnItemsAdded?.Invoke(items); + Modified?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + private void RaiseItemRemovedEvents(T item) + { + OnItemCountChanged?.Invoke(); + OnItemRemoved?.Invoke(item); + Modified?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + private void RaiseItemsRemovedEvents(IEnumerable items) + { + OnItemCountChanged?.Invoke(); + OnItemsRemoved?.Invoke(items); + Modified?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + public IEnumerator GetEnumerator() => _list.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + public void ForEach(Action action) + { + for (var i = _list.Count - 1; i >= 0; i--) + action(_list[i]); + } + + public IReadOnlyList EditorListeners => _list.OfType().ToList().AsReadOnly(); + + public override bool CanBeSerialized() + { + var canBeSerialized = SoapUtils.IsUnityType(typeof(T)) || + SoapUtils.IsSerializable(typeof(T)); + return canBeSerialized; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableList.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableList.cs.meta new file mode 100644 index 000000000..ab6a7feb4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99c698ef9ef007c43a0efae8af5dd5ef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListBase.cs new file mode 100644 index 000000000..8da460627 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListBase.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-list")] + public abstract class ScriptableListBase : ScriptableCollection + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListBase.cs.meta new file mode 100644 index 000000000..2b5ec6cb2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8c32c1d27e154b76abec5061d169389a +timeCreated: 1675031072 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListComponent.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListComponent.cs new file mode 100644 index 000000000..5489db33b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListComponent.cs @@ -0,0 +1,9 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_list_component.asset", menuName = "Soap/ScriptableLists/Component")] + public class ScriptableListComponent : ScriptableList + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListComponent.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListComponent.cs.meta new file mode 100644 index 000000000..d73146bf8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListComponent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9a14a51f0197afc468eaa1a3f48be606 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: e02af6df0d2cfa54b9c0179a889ab2d4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListGameObject.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListGameObject.cs new file mode 100644 index 000000000..cae7d3983 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListGameObject.cs @@ -0,0 +1,9 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_list_gameObject.asset", menuName = "Soap/ScriptableLists/GameObject")] + public class ScriptableListGameObject : ScriptableList + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListGameObject.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListGameObject.cs.meta new file mode 100644 index 000000000..7e5be5b66 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListGameObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 45803f4da29bd9a47aed28e14ed88ea9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: e02af6df0d2cfa54b9c0179a889ab2d4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListVector3.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListVector3.cs new file mode 100644 index 000000000..d4668089c --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListVector3.cs @@ -0,0 +1,9 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_list_vector3.asset", menuName = "Soap/ScriptableLists/Vector3")] + public class ScriptableListVector3 : ScriptableList + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListVector3.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListVector3.cs.meta new file mode 100644 index 000000000..cccd95bd4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableLists/ScriptableListVector3.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3cae990aafd9f284ea563baef5421b1a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: e02af6df0d2cfa54b9c0179a889ab2d4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave.meta new file mode 100644 index 000000000..972e86e00 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e479b3fd23c810149b70289eaeba2e07 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableObjectUpdateSystem.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableObjectUpdateSystem.cs new file mode 100644 index 000000000..8a7735cb6 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableObjectUpdateSystem.cs @@ -0,0 +1,56 @@ +using UnityEngine; +using UnityEngine.LowLevel; +using UnityEngine.PlayerLoop; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Obvious.Soap +{ + public static class ScriptableObjectUpdateSystem + { + private static List _objectsToUpdate = new List(); + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + private static void Init() + { + var playerLoop = PlayerLoop.GetCurrentPlayerLoop(); + var updateSystemIndex = Array.FindIndex(playerLoop.subSystemList, x => x.type == typeof(Update)); + + if (updateSystemIndex != -1) + { + var updateSystem = playerLoop.subSystemList[updateSystemIndex]; + var oldList = updateSystem.subSystemList.ToList(); + oldList.Add(new PlayerLoopSystem + { + type = typeof(ScriptableObjectUpdateSystem), + updateDelegate = UpdateScriptableObjects + }); + updateSystem.subSystemList = oldList.ToArray(); + playerLoop.subSystemList[updateSystemIndex] = updateSystem; + PlayerLoop.SetPlayerLoop(playerLoop); + } + } + + public static void RegisterObject(ScriptableSaveBase scriptableSave) + { + if (!_objectsToUpdate.Contains(scriptableSave)) + { + _objectsToUpdate.Add(scriptableSave); + } + } + + public static void UnregisterObject(ScriptableSaveBase scriptableSave) + { + _objectsToUpdate.Remove(scriptableSave); + } + + private static void UpdateScriptableObjects() + { + foreach (var savableScriptableObject in _objectsToUpdate) + { + savableScriptableObject.Update(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableObjectUpdateSystem.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableObjectUpdateSystem.cs.meta new file mode 100644 index 000000000..1dd7aac3b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableObjectUpdateSystem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 535c1578b709d0740b740ada14b25759 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSave.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSave.cs new file mode 100644 index 000000000..df4855f47 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSave.cs @@ -0,0 +1,237 @@ +using System; +using System.Diagnostics; +using System.IO; +using Obvious.Soap.Attributes; +using UnityEngine; +using Debug = UnityEngine.Debug; +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace Obvious.Soap +{ + public abstract class ScriptableSave : ScriptableSaveBase where T : class, new() + { + [SerializeField] protected bool _debugLogEnabled = false; + [SerializeField] protected ELoadMode _loadMode = ELoadMode.Automatic; + public ELoadMode LoadMode => _loadMode; + [SerializeField] protected ESaveMode _saveMode = ESaveMode.Manual; + public ESaveMode SaveMode => _saveMode; +#if ODIN_INSPECTOR + [ShowIf("_saveMode", ESaveMode.Interval)] +#else + [ShowIf(nameof(_saveMode), ESaveMode.Interval)] +#endif + [SerializeField] + protected double _saveIntervalSeconds = 120f; + + public double SaveIntervalSeconds + { + get => _saveIntervalSeconds; + set => _saveIntervalSeconds = value; + } + + public Action OnSaved = null; + public Action OnLoaded = null; + public Action OnDeleted = null; + + [Header("Runtime Data")] [SerializeField] + protected T _data = new T(); + + protected double _lastSaveTime; + + public virtual string FilePath => $"{Application.persistentDataPath}" + + $"{Path.AltDirectorySeparatorChar}" + + $"{name}.json"; + + private string Directory => Path.GetDirectoryName(FilePath); + public string LastSerializedJson { get; private set; } + + public bool FileExists => File.Exists(FilePath); + public override Type GetGenericType => typeof(T); + + protected virtual void OnEnable() + { +#if UNITY_EDITOR + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; +#else + if (_loadMode == ELoadMode.Automatic) + { + Load(); + } + if (_saveMode == ESaveMode.Interval) + { + ScriptableObjectUpdateSystem.RegisterObject(this); + } +#endif + } + + protected virtual void OnDisable() + { +#if UNITY_EDITOR + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; +#else + ScriptableObjectUpdateSystem.UnregisterObject(this); +#endif + } + + public override void Save() + { + LastSerializedJson = JsonUtility.ToJson(_data, prettyPrint: true); + + try + { + using (StreamWriter writer = new StreamWriter(FilePath)) + { + writer.Write(LastSerializedJson); + } + + OnSaved?.Invoke(); + if (_debugLogEnabled) + Debug.Log("Save Saved: \n" + LastSerializedJson); + + _lastSaveTime = Time.time; +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + catch (Exception e) + { + Debug.LogError($"Error saving file: {e.Message}"); + } + } + + public override void Load() + { + if (!FileExists) + { + Save(); + } + + try + { + using (StreamReader reader = new StreamReader(FilePath)) + { + LastSerializedJson = reader.ReadToEnd(); + if (_debugLogEnabled) + Debug.Log("Save Loaded: \n" + LastSerializedJson); + var saveData = JsonUtility.FromJson(LastSerializedJson, GetGenericType); + RestoreSaveData(saveData); + OnLoaded?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + } + catch (Exception e) + { + Debug.LogError($"Error loading file: {e.Message}"); + } + } + + private void RestoreSaveData(object data) + { + var saveData = data as T; + if (RequiresUpgrade(saveData)) + { + Upgrade(saveData); + } + + _data = saveData; + } + + public override void Delete() + { + if (FileExists) + File.Delete(FilePath); + + Debug.Log("Save Deleted: " + FilePath); + LastSerializedJson = string.Empty; + ResetData(); + OnDeleted?.Invoke(); +#if UNITY_EDITOR + RepaintRequest?.Invoke(); +#endif + } + + public virtual void PrintToConsole() + { + Debug.Log($"Save Data:\n{LastSerializedJson}"); + } + + public override void Update() + { + if (Time.time - _lastSaveTime >= _saveIntervalSeconds) + { + Save(); + _lastSaveTime = Time.time; + } + } + + public void OpenSaveLocation() + { + if (!System.IO.Directory.Exists(Directory)) + { + Debug.LogWarning("Save directory does not exist yet."); + return; + } + + try + { +#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN + Process.Start("explorer.exe", Directory); +#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX + Process.Start("open", Directory); +#elif UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX + Process.Start("xdg-open", Directory); +#else + Debug.LogWarning("Opening save location is not supported on this platform."); +#endif + + if (_debugLogEnabled) + Debug.Log($"Opened save location: {Directory}"); + } + catch (Exception e) + { + Debug.LogError($"Failed to open save location: {e.Message}"); + } + } + + internal override void Reset() + { + base.Reset(); + _debugLogEnabled = false; + _loadMode = ELoadMode.Automatic; + _saveMode = ESaveMode.Manual; + ResetData(); + } + + private void ResetData() => _data = new T(); + protected virtual bool RequiresUpgrade(T saveData) => false; + + protected virtual void Upgrade(T oldData) + { + } + +#if UNITY_EDITOR + private void OnPlayModeStateChanged(PlayModeStateChange playModeStateChange) + { + if (playModeStateChange == PlayModeStateChange.ExitingEditMode) + { + if (_loadMode == ELoadMode.Automatic) + { + Load(); + } + if (_saveMode == ESaveMode.Interval) + { + ScriptableObjectUpdateSystem.RegisterObject(this); + } + } + else if (playModeStateChange == PlayModeStateChange.EnteredEditMode) + { + ScriptableObjectUpdateSystem.UnregisterObject(this); + } + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSave.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSave.cs.meta new file mode 100644 index 000000000..8106c8a4a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSave.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: da429c369cbee6c4ab430b79eb741a7a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSaveBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSaveBase.cs new file mode 100644 index 000000000..1c15b0c78 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSaveBase.cs @@ -0,0 +1,32 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-save")] + public abstract class ScriptableSaveBase : ScriptableBase + { + //Override these methods to implement your own save/load/delete logic + public abstract void Save(); + public abstract void Load(); + public abstract void Delete(); + + /// + /// Called by the ScriptableObjectUpdateSystem if SaveMode is set to Interval. + /// Equivalent to MonoBehaviour.Update(). + /// + public abstract void Update(); + + public enum ELoadMode + { + Automatic, + Manual + } + + public enum ESaveMode + { + Manual, + Interval + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSaveBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSaveBase.cs.meta new file mode 100644 index 000000000..705195fb2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSave/ScriptableSaveBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5ceca6b4d98a475e96d20a97f1798f6d +timeCreated: 1725757344 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton.meta new file mode 100644 index 000000000..73b89e3ff --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce46396f67ecec849bcb7a71ed3e454a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton/ScriptableSingleton.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton/ScriptableSingleton.cs new file mode 100644 index 000000000..d6b8f2a76 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton/ScriptableSingleton.cs @@ -0,0 +1,44 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-singleton")] + public abstract class ScriptableSingleton : ScriptableBase where T : ScriptableObject + { + private static T _instance; + + public static T Instance + { + get + { + if (_instance) + return _instance; + + var assetName = typeof(T).Name; + _instance = Resources.Load(assetName); + + if (_instance) + return _instance; + + var all = Resources.LoadAll(string.Empty); + if (all != null && all.Length > 0) + { + _instance = all[0]; + return _instance; + } + + Debug.LogError("[Soap] No instance of Singleton:" + assetName + " found in Resources folder."); + return null; + } + } + + /// + /// Need for editor if direct access from classes (without passing through Instance property) + /// + protected virtual void OnEnable() + { + if (_instance == null) + _instance = this as T; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton/ScriptableSingleton.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton/ScriptableSingleton.cs.meta new file mode 100644 index 000000000..0a26fee5a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableSingleton/ScriptableSingleton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4993914fb8e01ee4abefb5c9c02f4dee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables.meta new file mode 100644 index 000000000..0fe410999 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e99a7c5ee6e83814c8498aba5ba5b276 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/BoolVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/BoolVariable.cs new file mode 100644 index 000000000..be02c4485 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/BoolVariable.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_bool.asset", menuName = "Soap/ScriptableVariables/bool")] + [System.Serializable] + public class BoolVariable : ScriptableVariable + { + public override void Save() + { + PlayerPrefs.SetInt(Guid, Value ? 1 : 0); + base.Save(); + } + + public override void Load() + { + Value = PlayerPrefs.GetInt(Guid, DefaultValue ? 1 : 0) > 0; + base.Load(); + } + + /// + /// Use this to toggle the value of the variable. + /// + public void Toggle() + { + Value = !Value; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/BoolVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/BoolVariable.cs.meta new file mode 100644 index 000000000..c61188c0a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/BoolVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a11231538da9894d8dce88b47df6a36 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ColorVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ColorVariable.cs new file mode 100644 index 000000000..c5f7cd311 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ColorVariable.cs @@ -0,0 +1,36 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_color.asset", menuName = "Soap/ScriptableVariables/color")] + public class ColorVariable : ScriptableVariable + { + public override void Save() + { + PlayerPrefs.SetFloat(Guid + "_r", Value.r); + PlayerPrefs.SetFloat(Guid + "_g", Value.g); + PlayerPrefs.SetFloat(Guid + "_b", Value.b); + PlayerPrefs.SetFloat(Guid + "_a", Value.a); + base.Save(); + } + + public override void Load() + { + var r = PlayerPrefs.GetFloat(Guid + "_r", DefaultValue.r); + var g = PlayerPrefs.GetFloat(Guid + "_g", DefaultValue.g); + var b = PlayerPrefs.GetFloat(Guid + "_b", DefaultValue.b); + var a = PlayerPrefs.GetFloat(Guid + "_a", DefaultValue.a); + Value = new Color(r, g, b, a); + base.Load(); + } + + /// + /// Sets a random color. + /// + public void SetRandom() + { + var beautifulColor = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f); + Value = beautifulColor; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ColorVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ColorVariable.cs.meta new file mode 100644 index 000000000..5ae264578 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ColorVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b7046b79ca6dcd147b7412e32a7dbb69 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ComponentVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ComponentVariable.cs new file mode 100644 index 000000000..3258224ec --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ComponentVariable.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_component.asset", menuName = "Soap/ScriptableVariables/Component")] + public class ComponentVariable : ScriptableVariable + { + public override string ToString() + { + if (Value == null) + return $"{name} : null"; + return $"{name} : {Value.GetType().Name} (GameObject: {Value.gameObject.name})"; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ComponentVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ComponentVariable.cs.meta new file mode 100644 index 000000000..d40613c59 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ComponentVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6658d50afb1d4574ea142fa9bf4758ad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/FloatVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/FloatVariable.cs new file mode 100644 index 000000000..a393ca774 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/FloatVariable.cs @@ -0,0 +1,99 @@ +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#else +using Obvious.Soap.Attributes; +#endif +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_float.asset", menuName = "Soap/ScriptableVariables/float")] + public class FloatVariable : ScriptableVariable + { + [Tooltip("Clamps the value of this variable to a minimum and maximum.")] +#if ODIN_INSPECTOR + [PropertyOrder(5)] +#endif + [SerializeField] private bool _isClamped = false; + public bool IsClamped + { + get => _isClamped; + set => _isClamped = value; + } + [Tooltip("If clamped, sets the minimum and maximum")] + [SerializeField] +#if ODIN_INSPECTOR + [ShowIf("_isClamped")] + [PropertyOrder(6)][Indent] +#else + [ShowIf("_isClamped")] +#endif + private FloatReference _min = new FloatReference(0,true); + public FloatReference MinReference + { + get => _min; + set => _min = value; + } + public float Min => _min.Value; + + [Tooltip("If clamped, sets the minimum and maximum")] + [SerializeField] +#if ODIN_INSPECTOR + [ShowIf("_isClamped")] + [PropertyOrder(7)][Indent] +#else + [ShowIf("_isClamped")] +#endif + private FloatReference _max = new FloatReference(float.MaxValue,true); + public FloatReference MaxReference + { + get => _max; + set => _max = value; + } + public float Max => _max.Value; + /// + /// Returns the percentage of the value between the minimum and maximum. + /// + public float Ratio => Mathf.InverseLerp( _min.Value, _max.Value, Value); + + public override void Save() + { + PlayerPrefs.SetFloat(Guid, Value); + base.Save(); + } + + public override void Load() + { + Value = PlayerPrefs.GetFloat(Guid, DefaultValue); + base.Load(); + } + + public void Add(float value) + { + Value += value; + } + + public override float Value + { + get => base.Value; + set + { + var clampedValue = _isClamped ? Mathf.Clamp(value, _min.Value, _max.Value) : value; + base.Value = clampedValue; + } + } + +#if UNITY_EDITOR + protected override void OnValidate() + { + if (_isClamped) + { + var clampedValue = Mathf.Clamp(Value, _min.Value, _max.Value); + if (Value < clampedValue || Value > clampedValue) + Value = clampedValue; + } + + base.OnValidate(); + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/FloatVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/FloatVariable.cs.meta new file mode 100644 index 000000000..05a097f63 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/FloatVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a9978ce9c8bdc724896114c9952c52ea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/GameObjectVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/GameObjectVariable.cs new file mode 100644 index 000000000..47fef5aa2 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/GameObjectVariable.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_gameObject.asset", menuName = "Soap/ScriptableVariables/GameObject")] + public class GameObjectVariable : ScriptableVariable + { + + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/GameObjectVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/GameObjectVariable.cs.meta new file mode 100644 index 000000000..c51ffd3f0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/GameObjectVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5798d9261dd3eae4d920ab34987f7ade +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/IntVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/IntVariable.cs new file mode 100644 index 000000000..d565fe13f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/IntVariable.cs @@ -0,0 +1,103 @@ +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#else +using Obvious.Soap.Attributes; +#endif + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_int.asset", menuName = "Soap/ScriptableVariables/int")] + public class IntVariable : ScriptableVariable + { + [Tooltip("Clamps the value of this variable to a minimum and maximum.")] +#if ODIN_INSPECTOR + [PropertyOrder(5)] +#endif + [SerializeField] + private bool _isClamped = false; + public bool IsClamped + { + get => _isClamped; + set => _isClamped = value; + } + + [Tooltip("If clamped, sets the minimum and maximum")] + [SerializeField] +#if ODIN_INSPECTOR + [ShowIf("_isClamped")] + [PropertyOrder(6)][Indent] +#else + [ShowIf("_isClamped")] +#endif + private IntReference _min = new IntReference(0,true); + public IntReference MinReference + { + get => _min; + set => _min = value; + } + public int Min => _min.Value; + + [Tooltip("If clamped, sets the minimum and maximum")] + [SerializeField] +#if ODIN_INSPECTOR + [ShowIf("_isClamped")] + [PropertyOrder(7)][Indent] +#else + [ShowIf("_isClamped")] +#endif + private IntReference _max = new IntReference(int.MaxValue,true); + public IntReference MaxReference + { + get => _max; + set => _max = value; + } + public int Max => _max.Value; + + /// + /// Returns the percentage of the value between the minimum and maximum. + /// + public float Ratio => Mathf.InverseLerp( _min.Value, _max.Value, Value); + + public override void Save() + { + PlayerPrefs.SetInt(Guid, Value); + base.Save(); + } + + public override void Load() + { + Value = PlayerPrefs.GetInt(Guid, DefaultValue); + base.Load(); + } + + public void Add(int value) + { + Value += value; + } + + public override int Value + { + get => base.Value; + set + { + var clampedValue = _isClamped ? Mathf.Clamp(value, _min.Value, _max.Value) : value; + base.Value = clampedValue; + } + } + +#if UNITY_EDITOR + protected override void OnValidate() + { + if (IsClamped) + { + var clampedValue = Mathf.Clamp(Value, _min.Value, _max.Value); + if (Value < clampedValue || Value > clampedValue) + Value = clampedValue; + } + + base.OnValidate(); + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/IntVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/IntVariable.cs.meta new file mode 100644 index 000000000..ae1d5a7db --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/IntVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 56cdb8ad39a5bdd4f8ed3d18fae14a63 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/QuaternionVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/QuaternionVariable.cs new file mode 100644 index 000000000..b0f394d31 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/QuaternionVariable.cs @@ -0,0 +1,11 @@ +using UnityEngine; +using Obvious.Soap; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_" + nameof(Quaternion), menuName = "Soap/ScriptableVariables/"+ nameof(Quaternion))] + public class QuaternionVariable : ScriptableVariable + { + + } +} diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/QuaternionVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/QuaternionVariable.cs.meta new file mode 100644 index 000000000..e806d016b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/QuaternionVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d5e637945a57d243bfbf35cab0eba1e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariable.cs new file mode 100644 index 000000000..e083995ef --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariable.cs @@ -0,0 +1,342 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.SceneManagement; +using Object = UnityEngine.Object; +#if UNITY_EDITOR +using UnityEditor; +#endif +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#else +using Obvious.Soap.Attributes; +#endif + +namespace Obvious.Soap +{ + public abstract class ScriptableVariable : ScriptableVariableBase, IReset, IDrawObjectsInInspector + { + [Tooltip( + "The value of the variable. This will be reset on play mode exit to the value it had before entering play mode.")] + [SerializeField] +#if ODIN_INSPECTOR + [HideInPlayMode][PropertyOrder(-1)] +#endif + protected T _value; + + [Tooltip("Log in the console whenever this variable is changed, loaded or saved.")] [SerializeField] + protected bool _debugLogEnabled; +#if ODIN_INSPECTOR + [PropertyOrder(1)] +#endif + [Tooltip("If true, saves the value to Player Prefs and loads it onEnable.")] [SerializeField] + protected bool _saved; + + [Tooltip( + "The default value of this variable. When loading from PlayerPrefs the first time, it will be set to this value.")] + [SerializeField] +#if ODIN_INSPECTOR + [ShowIf("_saved")] + [PropertyOrder(2)] + [Indent] + [BoxGroup] +#else + [ShowIf("_saved", true)] +#endif + private T _defaultValue; + +#if ODIN_INSPECTOR + [PropertyOrder(5)] +#endif + [Tooltip("Reset to initial value." + + " Scene Loaded : when the scene is loaded." + + " Application Start : Once, when the application starts." + + " None : Never.")] + [SerializeField] + private ResetType _resetOn = ResetType.SceneLoaded; + + public override ResetType ResetType + { + get => _resetOn; + set => _resetOn = value; + } + + protected T _initialValue; + + [SerializeField] +#if ODIN_INSPECTOR + [HideInEditorMode][PropertyOrder(-1)] +#endif + protected T _runtimeValue; + + private readonly List _listenersObjects = new List(); +#if ODIN_INSPECTOR + [HideInEditorMode] + [ShowInInspector,EnableGUI] + [PropertyOrder(100)] + public IEnumerable ObjectsReactingToOnValueChangedEvent => _listenersObjects; +#endif + + protected Action _onValueChanged; + + /// Event raised when the variable value changes. + public event Action OnValueChanged + { + add + { + _onValueChanged += value; +#if UNITY_EDITOR + var listener = value.Target as Object; + AddListener(listener); +#endif + } + remove + { + _onValueChanged -= value; +#if UNITY_EDITOR + var listener = value.Target as Object; + RemoveListener(listener); +#endif + } + } + + /// + /// The previous value just after the value changed. + /// + public T PreviousValue { get; private set; } + + /// + /// The default value this variable is reset to. + /// + public T DefaultValue => _defaultValue; + +#if UNITY_EDITOR + private T Read() => Application.isPlaying ? _runtimeValue : _value; + private void Write(T v) + { + if (Application.isPlaying) + _runtimeValue = v; + else + _value = v; + } +#else + private T Read() => _value; + private void Write(T v) { _value = v; } +#endif + + /// + /// Modify this to change the value of the variable. + /// Triggers OnValueChanged event. + /// + public virtual T Value + { + get => Read(); + set + { + var current = Read(); + if (EqualityComparer.Default.Equals(current, value)) + return; + + Write(value); + ValueChanged(true); + } + } + + public virtual void SetValueWithoutNotify(T value) + { + var current = Read(); + if (EqualityComparer.Default.Equals(current, value)) + return; + + Write(value); + ValueChanged(false); + } + + public virtual void ValueChanged(bool triggerEvent = true) + { + if (_saved) + Save(); + + if (_debugLogEnabled) + { + var suffix = _saved ? " [Saved]" : ""; + Debug.Log($"{GetColorizedString()}{suffix}", this); + } + + if (triggerEvent) + _onValueChanged?.Invoke(Read()); + + PreviousValue = Read(); +#if UNITY_EDITOR + if (this != null) //for runtime variables, the instance will be destroyed so do not repaint. + RepaintRequest?.Invoke(); +#endif + } + + public override Type GetGenericType => typeof(T); + + protected virtual void Awake() + { + //Prevents from resetting if no reference in a scene + hideFlags = HideFlags.DontUnloadUnusedAsset; + } + + protected virtual void OnEnable() + { +#if UNITY_EDITOR + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; +#else + Init(); +#endif + if (_resetOn == ResetType.SceneLoaded) + SceneManager.sceneLoaded += OnSceneLoaded; + } + + protected virtual void OnDisable() + { +#if UNITY_EDITOR + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; +#endif + SceneManager.sceneLoaded -= OnSceneLoaded; + } + + protected virtual void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + //the reset mode can change after the game has started, so we need to check it here. + if (_resetOn != ResetType.SceneLoaded) + return; + + if (mode == LoadSceneMode.Single) + { + if (_saved) + Load(); + else + ResetValue(); + } + } + +#if UNITY_EDITOR + public void OnPlayModeStateChanged(PlayModeStateChange playModeStateChange) + { + if (playModeStateChange == PlayModeStateChange.ExitingEditMode) + { + Init(); + } + else if (playModeStateChange == PlayModeStateChange.EnteredEditMode) + { + if (!_saved) + { + ResetValue(); + } + else + { + if (EqualityComparer.Default.Equals(_value, _runtimeValue)) + return; + + // Set the value to the runtime value + _value = _runtimeValue; + _runtimeValue = _initialValue; + EditorUtility.SetDirty(this); + RepaintRequest?.Invoke(); + } + } + } + + protected virtual void OnValidate() + { + //In default play mode, this get called before OnEnable(). Therefore a saved variable can get saved before loading. + //This check prevents the latter. + if (EqualityComparer.Default.Equals(Read(), PreviousValue)) + return; + ValueChanged(); + } + + /// Reset the SO to default. + internal override void Reset() + { + base.Reset(); + _listenersObjects.Clear(); + Value = default; + _initialValue = default; + _runtimeValue = default; + PreviousValue = default; + _saved = false; + _resetOn = ResetType.SceneLoaded; + _debugLogEnabled = false; + } + + public void AddListener(Object listener) + { + if (listener != null && !_listenersObjects.Contains(listener)) + _listenersObjects.Add(listener); + } + + public void RemoveListener(Object listener) + { + if (_listenersObjects.Contains(listener)) + _listenersObjects.Remove(listener); + } +#endif + + private void Init() + { + if (_saved) + Load(); + + _initialValue = _value; + _runtimeValue = _value; + PreviousValue = _value; + _listenersObjects.Clear(); + } + + /// Reset to initial value + public void ResetValue() + { + Value = _initialValue; + PreviousValue = _initialValue; + _runtimeValue = _initialValue; + } + + public virtual void Save() + { + } + + public virtual void Load() + { + PreviousValue = _value; + + if (_debugLogEnabled) + Debug.Log($"{GetColorizedString()} [Loaded].", this); + } + + public override string ToString() + { + return $"{name} : {Value}"; + } + + protected virtual string GetColorizedString() => $"[Variable] {ToString()}"; + + public IReadOnlyList EditorListeners => _listenersObjects.AsReadOnly(); + + public static implicit operator T(ScriptableVariable variable) => variable.Value; + } + + /// + /// Defines when the variable is reset. + /// + public enum ResetType + { + SceneLoaded, + ApplicationStarts, + None + } + + public enum CustomVariableType + { + None, + Bool, + Int, + Float, + String + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariable.cs.meta new file mode 100644 index 000000000..bb9c60d6b --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9dcab23e1548c9344916733798631cec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariableBase.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariableBase.cs new file mode 100644 index 000000000..02952c3aa --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariableBase.cs @@ -0,0 +1,54 @@ +using UnityEngine; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif + +namespace Obvious.Soap +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-variable")] + public abstract class ScriptableVariableBase : ScriptableBase + { +#if ODIN_INSPECTOR + [PropertyOrder(4)] + [DisableIf("_saveGuid", SaveGuidType.Auto)] + [ShowIf("_saved")] + [Indent] + [BoxGroup] +#endif + [SerializeField] + private string _guid; + +#if ODIN_INSPECTOR + [PropertyOrder(3)] + [ShowIf("_saved")] + [Indent] + [BoxGroup] + //[LabelWidth(80)] +#endif + [Tooltip("ID used as the Player Prefs Key.\n" + + "Auto: Guid is generated automatically base on the asset path.\n" + + "Manual: Guid can be overwritten manually.")] + [SerializeField] + private SaveGuidType _saveGuid; + + public SaveGuidType SaveGuid => _saveGuid; + + /// + /// Guid is needed to save/load the value to PlayerPrefs. + /// + public string Guid + { + get => _guid; + set => _guid = value; + } + + public virtual ResetType ResetType { get; set; } + + } + + public enum SaveGuidType + { + Auto, + Manual, + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariableBase.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariableBase.cs.meta new file mode 100644 index 000000000..e3cc39fa8 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/ScriptableVariableBase.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: dffd90b3e4094da298b30ac2f9553d0b +timeCreated: 1675031065 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/StringVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/StringVariable.cs new file mode 100644 index 000000000..f426024ae --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/StringVariable.cs @@ -0,0 +1,20 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_string.asset", menuName = "Soap/ScriptableVariables/string")] + public class StringVariable : ScriptableVariable + { + public override void Save() + { + PlayerPrefs.SetString(Guid, Value); + base.Save(); + } + + public override void Load() + { + Value = PlayerPrefs.GetString(Guid, DefaultValue); + base.Load(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/StringVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/StringVariable.cs.meta new file mode 100644 index 000000000..215c1de30 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/StringVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fbb51723e892a404a87b22018981eb5d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences.meta new file mode 100644 index 000000000..361f4b4d7 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d709c36840cc4b4986ebe2c5e3ed2b2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/BoolReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/BoolReference.cs new file mode 100644 index 000000000..d69cc6852 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/BoolReference.cs @@ -0,0 +1,7 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class BoolReference : VariableReference + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/BoolReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/BoolReference.cs.meta new file mode 100644 index 000000000..85ba68426 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/BoolReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 04cd28045cfa5ca40b0c1811c7de86af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/ColorReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/ColorReference.cs new file mode 100644 index 000000000..cfc48507e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/ColorReference.cs @@ -0,0 +1,7 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class ColorReference : VariableReference + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/ColorReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/ColorReference.cs.meta new file mode 100644 index 000000000..7c1f4d3e4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/ColorReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0c16be5b350d07740960221d2f880d4b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/FloatReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/FloatReference.cs new file mode 100644 index 000000000..b3ce6f830 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/FloatReference.cs @@ -0,0 +1,16 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class FloatReference : VariableReference + { + public FloatReference() + { + } + + public FloatReference(float initialValue, bool useLocal = false) + { + LocalValue = initialValue; + UseLocal = useLocal; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/FloatReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/FloatReference.cs.meta new file mode 100644 index 000000000..7e7756e31 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/FloatReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d69d26f58cf51154cb43cf597b57d0dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/IntReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/IntReference.cs new file mode 100644 index 000000000..33984a820 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/IntReference.cs @@ -0,0 +1,16 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class IntReference : VariableReference + { + public IntReference() + { + } + + public IntReference(int initialValue, bool useLocal = false) + { + LocalValue = initialValue; + UseLocal = useLocal; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/IntReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/IntReference.cs.meta new file mode 100644 index 000000000..f09c005f1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/IntReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a9c0318cbda96274daa33a0b0a4a65a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/StringReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/StringReference.cs new file mode 100644 index 000000000..641a06dbe --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/StringReference.cs @@ -0,0 +1,7 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class StringReference : VariableReference + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/StringReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/StringReference.cs.meta new file mode 100644 index 000000000..8013f567f --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/StringReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5be4248575855e344ad1a3d62c03d779 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/VariableReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/VariableReference.cs new file mode 100644 index 000000000..37be1e2d1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/VariableReference.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Obvious.Soap +{ + //Unity cannot serialize generic types, so we need to create a non-generic base class + public abstract class VariableReferenceBase { } + + [Serializable] + public abstract class VariableReference : VariableReferenceBase, ISerializationCallbackReceiver where V : ScriptableVariable + { + public bool UseLocal; + public T LocalValue; + public V Variable; + + private Action _onValueChanged; + + [NonSerialized] private T _lastSerializedLocalValue; + + public T Value + { + get + { + if (UseLocal) + return LocalValue; + + if (Variable == null) + return default; + return Variable.Value; + } + set + { + if (UseLocal) + { + if (Equals(LocalValue, value)) + return; + + LocalValue = value; + _onValueChanged?.Invoke(LocalValue); + } + else + { + Variable.Value = value; + } + } + } + + /// Event raised when the variable reference value changes. + /// Is triggered for both local and variable. + public event Action OnValueChanged + { + add + { + _onValueChanged += value; + if (Variable != null) + Variable.OnValueChanged += value; + } + remove + { + _onValueChanged -= value; + if (Variable != null) + Variable.OnValueChanged -= value; + } + } + + public static implicit operator T(VariableReference reference) + { + return reference.Value; + } + + public void OnBeforeSerialize() + { + _lastSerializedLocalValue = LocalValue; + } + + public void OnAfterDeserialize() + { + if (UseLocal && !EqualityComparer.Default.Equals(_lastSerializedLocalValue, LocalValue)) + { + _onValueChanged?.Invoke(LocalValue); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/VariableReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/VariableReference.cs.meta new file mode 100644 index 000000000..e972b4759 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/VariableReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8349e47b1834dc2409db52bf4844dabb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2IntReference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2IntReference.cs new file mode 100644 index 000000000..ba8b4da19 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2IntReference.cs @@ -0,0 +1,7 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class Vector2IntReference : VariableReference + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2IntReference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2IntReference.cs.meta new file mode 100644 index 000000000..64ee96afb --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2IntReference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dbd9d492c80528946a0b29ed44c02f21 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2Reference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2Reference.cs new file mode 100644 index 000000000..220a4a2b9 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2Reference.cs @@ -0,0 +1,7 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class Vector2Reference : VariableReference + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2Reference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2Reference.cs.meta new file mode 100644 index 000000000..a1f81de8e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector2Reference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d2475a2952069444791b28c347f20912 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector3Reference.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector3Reference.cs new file mode 100644 index 000000000..fa48dd017 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector3Reference.cs @@ -0,0 +1,7 @@ +namespace Obvious.Soap +{ + [System.Serializable] + public class Vector3Reference : VariableReference + { + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector3Reference.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector3Reference.cs.meta new file mode 100644 index 000000000..bdbc8af93 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/VariableReferences/Vector3Reference.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 24c4af42bed07564ca5b965a62b3b6ca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2IntVariable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2IntVariable.cs new file mode 100644 index 000000000..39c6e84d1 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2IntVariable.cs @@ -0,0 +1,23 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_vector2Int", menuName = "Soap/ScriptableVariables/Vector2Int")] + public class Vector2IntVariable : ScriptableVariable + { + public override void Save() + { + PlayerPrefs.SetInt(Guid + "_x", Value.x); + PlayerPrefs.SetInt(Guid + "_y", Value.y); + base.Save(); + } + + public override void Load() + { + var x = PlayerPrefs.GetInt(Guid + "_x", DefaultValue.x); + var y = PlayerPrefs.GetInt(Guid + "_y", DefaultValue.y); + Value = new Vector2Int(x,y); + base.Load(); + } + } +} diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2IntVariable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2IntVariable.cs.meta new file mode 100644 index 000000000..55364066e --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2IntVariable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1afa6fbeda4c35d45a09c5812a671a42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2Variable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2Variable.cs new file mode 100644 index 000000000..52d8df24d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2Variable.cs @@ -0,0 +1,23 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_vector2.asset", menuName = "Soap/ScriptableVariables/Vector2")] + public class Vector2Variable : ScriptableVariable + { + public override void Save() + { + PlayerPrefs.SetFloat(Guid + "_x", Value.x); + PlayerPrefs.SetFloat(Guid + "_y", Value.y); + base.Save(); + } + + public override void Load() + { + var x = PlayerPrefs.GetFloat(Guid + "_x", DefaultValue.x); + var y = PlayerPrefs.GetFloat(Guid + "_y", DefaultValue.y); + Value = new Vector2(x,y); + base.Load(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2Variable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2Variable.cs.meta new file mode 100644 index 000000000..2f87d69e4 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector2Variable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 33653d5fffc16644bb2d768701efbabf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector3Variable.cs b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector3Variable.cs new file mode 100644 index 000000000..1cf0b51c0 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector3Variable.cs @@ -0,0 +1,25 @@ +using UnityEngine; + +namespace Obvious.Soap +{ + [CreateAssetMenu(fileName = "scriptable_variable_vector3.asset", menuName = "Soap/ScriptableVariables/Vector3")] + public class Vector3Variable : ScriptableVariable + { + public override void Save() + { + PlayerPrefs.SetFloat(Guid + "_x", Value.x); + PlayerPrefs.SetFloat(Guid + "_y", Value.y); + PlayerPrefs.SetFloat(Guid + "_z", Value.z); + base.Save(); + } + + public override void Load() + { + var x = PlayerPrefs.GetFloat(Guid + "_x", DefaultValue.x); + var y = PlayerPrefs.GetFloat(Guid + "_y", DefaultValue.y); + var z = PlayerPrefs.GetFloat(Guid + "_z", DefaultValue.z); + Value = new Vector3(x,y,z); + base.Load(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector3Variable.cs.meta b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector3Variable.cs.meta new file mode 100644 index 000000000..c5f1654ec --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/ScriptableVariables/Vector3Variable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1300736a6c75069498acdad864241816 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8173878b5f4d7724784454801c58c9c4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Utilities.meta b/Assets/Obvious/Soap/Core/Runtime/Utilities.meta new file mode 100644 index 000000000..504ef4bab --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Utilities.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 45cf21f1f37c8a945a4070bd95a24eb5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapRuntimeUtils.cs b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapRuntimeUtils.cs new file mode 100644 index 000000000..22730831a --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapRuntimeUtils.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Obvious.Soap.Attributes; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace Obvious.Soap +{ + public static class SoapRuntimeUtils + { + /// + /// Creates a new instance of a ScriptableVariableBase subclass with the given name. + /// + /// The type of the ScriptableVariableBase subclass to create. + /// The name of the new ScriptableVariableBase instance. + /// The newly created ScriptableVariableBase instance. + public static T CreateRuntimeInstance(string name = "") where T : ScriptableVariableBase + { + var runtimeVariable = CreateInstance(name); + runtimeVariable.ResetType = ResetType.None; + return runtimeVariable; + } + + /// + /// Creates a new instance of a ScriptableObject subclass with the given name. + /// + /// + /// + /// + public static T CreateInstance(string name = "") where T : ScriptableObject + { + var instance = ScriptableObject.CreateInstance(); + instance.name = string.IsNullOrEmpty(name) ? typeof(T).Name : name; + return instance; + } + + /// + /// Creates a new instance of a ScriptableEvent subclass with the given name. + /// + /// + /// + /// + public static T CreateRuntimeEventInstance(string name = "") where T : ScriptableEventBase + { + return CreateInstance(name); + } + + /// + /// Create a deep copy of the template + /// + /// The type of the subclass to create. + /// Template to copy. + /// The newly created or copied instance. + public static T CreateCopy(T template) where T : ScriptableObject + { + // Create a deep copy of the template + T copy = Object.Instantiate(template); + return copy; + } + + private static readonly Dictionary<(Type, string), List> _cachedInjectableFields = + new Dictionary<(Type, string), List>(); + + public static void InjectInChildren(GameObject gameObject, + TVariable runtimeVariable, string id, bool debugLogEnabled) + where TVariable : ScriptableObject + { + var components = gameObject.GetComponentsInChildren(); + foreach (var component in components) + { + if (component == null) + continue; + + var type = component.GetType(); + var cacheKey = (type, variableName: id); + if (!_cachedInjectableFields.TryGetValue(cacheKey, out var fields)) + { + fields = new List(); + foreach (var field in type.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | + BindingFlags.Public)) + { + if (Attribute.IsDefined(field, typeof(RuntimeInjectableAttribute)) && + field.FieldType == typeof(TVariable)) + { + // Check if the field has the correct variable name + var attribute = field.GetCustomAttribute(); + if (attribute.Id != id || string.IsNullOrEmpty(attribute.Id)) + continue; + + fields.Add(field); + } + } + + _cachedInjectableFields[cacheKey] = fields; + } + + foreach (var field in fields) + { + field.SetValue(component, runtimeVariable); + if (debugLogEnabled) + { + Debug.Log( + $"[Injected] {runtimeVariable.name} into {component.GetType().Name}.{field.Name}"); + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapRuntimeUtils.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapRuntimeUtils.cs.meta new file mode 100644 index 000000000..23b2b6b7d --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapRuntimeUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca4d627fedfbb3946bb2553a6169a16a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapUtils.cs b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapUtils.cs new file mode 100644 index 000000000..58e38e868 --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapUtils.cs @@ -0,0 +1,207 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; + +namespace Obvious.Soap +{ + //TODO: Rename to SoapTypeUtils when doing major Update + public static class SoapUtils + { + private static readonly Dictionary intrinsicToSystemTypeMap = new Dictionary + { + { "byte", "System.Byte" }, + { "sbyte", "System.SByte" }, + { "char", "System.Char" }, + { "decimal", "System.Decimal" }, //not serializable by unity [DO NOT USE]. Use float or double instead. + { "double", "System.Double" }, + { "uint", "System.UInt32" }, + { "nint", "System.IntPtr" }, + { "nuint", "System.UIntPtr" }, + { "long", "System.Int64" }, + { "ulong", "System.UInt64" }, + { "short", "System.Int16" }, + { "ushort", "System.UInt16" }, + { "int", "System.Int32" }, + { "float", "System.Single" }, + { "string", "System.String" }, + { "object", "System.Object" }, + { "bool", "System.Boolean" } + }; + + private static readonly HashSet unityTypes = new HashSet() + { + typeof(string), typeof(Vector4), typeof(Vector3), typeof(Vector2), typeof(Rect), + typeof(Quaternion), typeof(Color), typeof(Color32), typeof(LayerMask), typeof(Bounds), + typeof(Matrix4x4), typeof(AnimationCurve), typeof(Gradient), typeof(RectOffset), + typeof(bool[]), typeof(byte[]), typeof(sbyte[]), typeof(char[]), + typeof(double[]), typeof(float[]), typeof(int[]), typeof(uint[]), typeof(long[]), + typeof(ulong[]), typeof(short[]), typeof(ushort[]), typeof(string[]), + typeof(Vector4[]), typeof(Vector3[]), typeof(Vector2[]), typeof(Rect[]), + typeof(Quaternion[]), typeof(Color[]), typeof(Color32[]), typeof(LayerMask[]), typeof(Bounds[]), + typeof(Matrix4x4[]), typeof(AnimationCurve[]), typeof(Gradient[]), typeof(RectOffset[]), + typeof(List), typeof(List), typeof(List), typeof(List), + typeof(List), typeof(List), typeof(List), typeof(List), typeof(List), + typeof(List), typeof(List), typeof(List), typeof(List), + typeof(List), typeof(List), typeof(List), typeof(List), + typeof(List), typeof(List), typeof(List), typeof(List), + typeof(List), + typeof(List), typeof(List), typeof(List), typeof(List), + typeof(Vector3Int), typeof(Vector2Int), typeof(RectInt), typeof(BoundsInt), + typeof(Vector3Int[]), typeof(Vector2Int[]), typeof(RectInt[]), typeof(BoundsInt[]), + typeof(List), typeof(List), typeof(List), typeof(List), + }; + + private static readonly HashSet unityTypesAsString = new HashSet() + { + "string", "Vector4", "Vector3", "Vector2", "Rect", + "Quaternion", "Color", "Color32", "LayerMask", "Bounds", + "Matrix4x4", "AnimationCurve", "Gradient", "RectOffset", + "GameObject", "Transform", "Material", "Texture", "Sprite", + "AudioClip", "Mesh", "Shader", "Font", "TextAsset", + "Rigidbody", "Rigidbody2D", "Camera", "Light", "AudioSource", + "Vector2Int", "Vector3Int", "Collider", "Collider2D", "BoundsInt", + "RectInt", "MeshRenderer", "SpriteRenderer", "BoxCollider", + "BoxCollider2D", "CircleCollider2D", "PolygonCollider2D", "CapsuleCollider", + "CapsuleCollider2D", "MeshCollider", "MeshCollider2D", "SphereCollider", + "SphereCollider2D", "TerrainCollider", "WheelCollider", "WheelCollider2D", + "CharacterController", "CharacterJoint", "ConfigurableJoint", "FixedJoint", + "HingeJoint", "SpringJoint", "SliderJoint", "TargetJoint2D", + "AnimationCurve", "AnimationClip", "Animator", "AnimatorController", + }; + + + public static bool IsIntrinsicType(string typeName) + { + if (intrinsicToSystemTypeMap.TryGetValue(typeName.ToLower(), out var qualifiedName)) + typeName = qualifiedName; + + Type type = Type.GetType(typeName); + if (type?.Namespace != null && type.Namespace.StartsWith("System")) + return true; + + return false; + } + + public static string GetIntrinsicType(string systemType) + { + return intrinsicToSystemTypeMap.FirstOrDefault(x => + x.Value == $"System.{systemType}").Key ?? systemType; + } + + public static bool IsUnityType(Type type) => unityTypes.Contains(type); + public static bool IsUnityType(string type) => unityTypesAsString.Contains(type); + + internal static bool CanBeCreated(string typeName) + { + if (IsIntrinsicType(typeName) || IsUnityType(typeName)) + return false; + return true; + } + + public static bool IsSerializable(Type type) + { + if (type == null) + return false; + + if (typeof(UnityEngine.Object).IsAssignableFrom(type) || type.IsEnum) + return true; + + if (type.IsArray) + { + //dont support multi-dimensional arrays + if (type.GetArrayRank() != 1) + return false; + return IsSerializable(type.GetElementType()); + } + + if (type.IsGenericType) + { + var genericDefinition = type.GetGenericTypeDefinition(); + if (genericDefinition == typeof(Nullable<>) + || genericDefinition == typeof(List<>)) + { + return IsSerializable(type.GetGenericArguments()[0]); + } + + // Generic types are allowed on 2020.1 and later +#if !UNITY_2020_1_OR_NEWER + return false; +#endif + } + + return Attribute.IsDefined(type, typeof(SerializableAttribute), false); + } + + // public static bool IsSerializableLazy(Type type) + // { + // var isSerializable = false; + // isSerializable |= type.IsSerializable; + // isSerializable |= type.Namespace == "UnityEngine"; + // isSerializable |= type.IsSubclassOf(typeof(MonoBehaviour)); + // return isSerializable; + // } + + internal static Type GetTypeByName(string name) + { + foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + foreach (Type type in assembly.GetTypes()) + { + if (string.Equals(type.Name, name, StringComparison.OrdinalIgnoreCase)) + { + return type; + } + } + } + return null; + } + + public static bool IsCollection(Type type) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (type.IsArray) + return true; + + if (type.IsGenericType && type.GetInterfaces().Any(i => + i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable<>))) + return true; + + // Check if it's a non-generic collection + if (typeof(IEnumerable).IsAssignableFrom(type)) + return true; + + return false; + } + + public static bool InheritsFromOpenGeneric(Type type, Type openGenericBase) + { + if (type == null || openGenericBase == null) return false; + + // walk class hierarchy + for (var t = type; t != null && t != typeof(object); t = t.BaseType) + { + var candidate = t.IsGenericType ? t.GetGenericTypeDefinition() : t; + if (candidate == openGenericBase) + return true; + } + + // optionally check interfaces as well (useful if your base is an interface) + if (openGenericBase.IsInterface) + { + foreach (var itf in type.GetInterfaces()) + { + var candidate = itf.IsGenericType ? itf.GetGenericTypeDefinition() : itf; + if (candidate == openGenericBase) + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapUtils.cs.meta b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapUtils.cs.meta new file mode 100644 index 000000000..82c8ca8fd --- /dev/null +++ b/Assets/Obvious/Soap/Core/Runtime/Utilities/SoapUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf7a2d5b4db6ed14fb41e4f1d73d62a9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Documentation.url b/Assets/Obvious/Soap/Documentation.url new file mode 100644 index 000000000..0573a88b2 --- /dev/null +++ b/Assets/Obvious/Soap/Documentation.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://obvious-game.gitbook.io/soap \ No newline at end of file diff --git a/Assets/Obvious/Soap/Documentation.url.meta b/Assets/Obvious/Soap/Documentation.url.meta new file mode 100644 index 000000000..f61f32313 --- /dev/null +++ b/Assets/Obvious/Soap/Documentation.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e3d7589d2e266049bb73a951d261f44 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples.meta b/Assets/Obvious/Soap/Examples.meta new file mode 100644 index 000000000..d65ea56dd --- /dev/null +++ b/Assets/Obvious/Soap/Examples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb2998ea3b7a4c245adbb1387430ca35 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content.meta b/Assets/Obvious/Soap/Examples/Content.meta new file mode 100644 index 000000000..8fca6cbbb --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 022adfc6431e73344b0efc7e682b7ac3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Editor.meta b/Assets/Obvious/Soap/Examples/Content/Editor.meta new file mode 100644 index 000000000..d76ee97ec --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc940f53325970c40ab781252983d71f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Editor/Obvious.Soap.Example.Editor.asmdef b/Assets/Obvious/Soap/Examples/Content/Editor/Obvious.Soap.Example.Editor.asmdef new file mode 100644 index 000000000..e84620576 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Editor/Obvious.Soap.Example.Editor.asmdef @@ -0,0 +1,19 @@ +{ + "name": "Obvious.Soap.Example.Editor", + "references": [ + "GUID:7bfe539b077dc974898ee3ed5a4be674", + "GUID:ee6baafdecd94804a8714654c4bd097f", + "GUID:d077ff18d774b9d479c2ce4c35deb3a1" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Editor/Obvious.Soap.Example.Editor.asmdef.meta b/Assets/Obvious/Soap/Examples/Content/Editor/Obvious.Soap.Example.Editor.asmdef.meta new file mode 100644 index 000000000..23eb8dd5b --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Editor/Obvious.Soap.Example.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 63a94bf298e26084badd91eb5fe3c960 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Editor/ScriptableSaveExampleEditor.cs b/Assets/Obvious/Soap/Examples/Content/Editor/ScriptableSaveExampleEditor.cs new file mode 100644 index 000000000..a6aaef50d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Editor/ScriptableSaveExampleEditor.cs @@ -0,0 +1,83 @@ +using UnityEngine; +using UnityEditor; + +namespace Obvious.Soap.Example.Editor +{ + [CustomEditor(typeof(ScriptableSaveExample))] + public class ScriptableSaveExampleEditor : UnityEditor.Editor + { + private string newItemName = "NewItem"; + private int levelValue = 0; + + private float Spacing => EditorGUIUtility.singleLineHeight * 0.5f; + + public override void OnInspectorGUI() + { + DrawDefaultInspector(); + + ScriptableSaveExample scriptableSave = (ScriptableSaveExample)target; + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Useful Methods", EditorStyles.boldLabel); + GUILayout.Space(Spacing); + + EditorGUILayout.BeginHorizontal(); + levelValue = EditorGUILayout.IntField("Level", levelValue); + if (GUILayout.Button("Set Level")) + { + scriptableSave.SetLevel(levelValue); + } + + EditorGUILayout.EndHorizontal(); + + GUILayout.Space(Spacing); + + EditorGUILayout.BeginHorizontal(); + newItemName = EditorGUILayout.TextField("Item Name", newItemName); + if (GUILayout.Button("Add Item")) + { + scriptableSave.AddItem(new Item(newItemName)); + } + + EditorGUILayout.EndHorizontal(); + + if (GUILayout.Button("Clear Items")) + { + scriptableSave.ClearItems(); + } + + GUILayout.Space(EditorGUIUtility.singleLineHeight); + + EditorGUILayout.BeginHorizontal(); + + if (GUILayout.Button("Save", GUILayout.Height(30f))) + { + scriptableSave.Save(); + } + + if (GUILayout.Button("Load", GUILayout.Height(30f))) + { + scriptableSave.Load(); + } + + if (GUILayout.Button("Print", GUILayout.Height(30f))) + { + scriptableSave.PrintToConsole(); + } + + EditorGUILayout.EndHorizontal(); + EditorGUILayout.BeginHorizontal(); + + if (GUILayout.Button("Delete", GUILayout.Height(30f))) + { + scriptableSave.Delete(); + } + + if (GUILayout.Button("Open Save Location", GUILayout.Height(30f))) + { + scriptableSave.OpenSaveLocation(); + } + + EditorGUILayout.EndHorizontal(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Editor/ScriptableSaveExampleEditor.cs.meta b/Assets/Obvious/Soap/Examples/Content/Editor/ScriptableSaveExampleEditor.cs.meta new file mode 100644 index 000000000..b328e4873 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Editor/ScriptableSaveExampleEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 911286e00f665dc4aa3915bd1fbfb766 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials.meta b/Assets/Obvious/Soap/Examples/Content/Materials.meta new file mode 100644 index 000000000..08dfba64f --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f2fe30760dabed4a9655528a0614ec1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/coin_mat.mat b/Assets/Obvious/Soap/Examples/Content/Materials/coin_mat.mat new file mode 100644 index 000000000..12e38e7f9 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/coin_mat.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: coin_mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.9607843, g: 0.80726486, b: 0.20392154, a: 1} + - _EmissionColor: {r: 0.49019608, g: 0.44415444, b: 0, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/coin_mat.mat.meta b/Assets/Obvious/Soap/Examples/Content/Materials/coin_mat.mat.meta new file mode 100644 index 000000000..33ba14e03 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/coin_mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c044e8afa2059d54f94ef87c5d60624d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/floor_mat.mat b/Assets/Obvious/Soap/Examples/Content/Materials/floor_mat.mat new file mode 100644 index 000000000..6b57d79ff --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/floor_mat.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: floor_mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.47058824, g: 0.43529412, b: 0.6509804, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/floor_mat.mat.meta b/Assets/Obvious/Soap/Examples/Content/Materials/floor_mat.mat.meta new file mode 100644 index 000000000..a6134b602 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/floor_mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42733ad9bd661c544a6cad40c3e10d8c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/obstacle1_mat.mat b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle1_mat.mat new file mode 100644 index 000000000..e10d50462 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle1_mat.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: obstacle1_mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 1, g: 0, b: 0, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/obstacle1_mat.mat.meta b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle1_mat.mat.meta new file mode 100644 index 000000000..c3d389641 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle1_mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 520ee656973d1eb458d99e80ee8a04f8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/obstacle2_mat.mat b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle2_mat.mat new file mode 100644 index 000000000..0dd7dd51a --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle2_mat.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: obstacle2_mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.066497564, g: 1, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 1, b: 0.1271038, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/obstacle2_mat.mat.meta b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle2_mat.mat.meta new file mode 100644 index 000000000..7dc13ac78 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle2_mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/obstacle3_mat.mat b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle3_mat.mat new file mode 100644 index 000000000..bb55e2fae --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle3_mat.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: obstacle3_mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.37695265, g: 0, b: 0.6431373, a: 1} + - _EmissionColor: {r: 0.36752784, g: 0, b: 0.49019608, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/obstacle3_mat.mat.meta b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle3_mat.mat.meta new file mode 100644 index 000000000..b30ba2216 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/obstacle3_mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 44182b698b966ef4582eb1e2a30f8f6e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/player_mat.mat b/Assets/Obvious/Soap/Examples/Content/Materials/player_mat.mat new file mode 100644 index 000000000..0eee609f6 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/player_mat.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: player_mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: -0.27, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0.2830189, g: 0.2830189, b: 0.2830189, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/Materials/player_mat.mat.meta b/Assets/Obvious/Soap/Examples/Content/Materials/player_mat.mat.meta new file mode 100644 index 000000000..fd36fa039 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Materials/player_mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 66221ca8454932c44b06d3920e1842c6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs.meta new file mode 100644 index 000000000..8d92673d8 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 209ac7dcbf6874249beaa14c610e18bc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI.meta new file mode 100644 index 000000000..8791ea4e0 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f5a516ce79c79b54d9886f84cf705b8d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_changeColor_button.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_changeColor_button.prefab new file mode 100644 index 000000000..baf49d2e2 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_changeColor_button.prefab @@ -0,0 +1,399 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8206848585801840196 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8206848585801840199} + - component: {fileID: 8206848585801840195} + - component: {fileID: 8206848585801840193} + m_Layer: 5 + m_Name: prefab_ui_changeColor_button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8206848585801840199 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848585801840196} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 8206848586155155497} + - {fileID: 8206848586058523731} + - {fileID: 8206848587207049362} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 210, y: 50} + m_Pivot: {x: 1, y: 0} +--- !u!222 &8206848585801840195 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848585801840196} + m_CullTransparentMesh: 0 +--- !u!114 &8206848585801840193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848585801840196} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 0} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400000, guid: 1e41cb1a09a2ee243b5bc12fc79fc070, type: 2} + m_MethodName: SetRandom + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 1 + m_FloatArgument: 25 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 +--- !u!1 &8206848586058523728 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8206848586058523731} + - component: {fileID: 8206848586058523740} + - component: {fileID: 8206848586058523741} + - component: {fileID: 8206848586058523730} + m_Layer: 5 + m_Name: Borders + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8206848586058523731 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586058523728} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8206848585801840199} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8206848586058523740 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586058523728} + m_CullTransparentMesh: 0 +--- !u!114 &8206848586058523741 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586058523728} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 9dc88382a3b6a304cb16eca5862431eb, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 0 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 0.5 +--- !u!114 &8206848586058523730 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586058523728} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1f8ac922abe854745b373db06bca49d0, type: 3} + m_Name: + m_EditorClassIdentifier: + _colorVariable: {fileID: 11400000, guid: 1e41cb1a09a2ee243b5bc12fc79fc070, type: 2} +--- !u!1 &8206848586155155502 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8206848586155155497} + - component: {fileID: 8206848586155155498} + - component: {fileID: 8206848586155155496} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8206848586155155497 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586155155502} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8206848585801840199} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8206848586155155498 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586155155502} + m_CullTransparentMesh: 0 +--- !u!114 &8206848586155155496 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848586155155502} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.4433962, g: 0.4433962, b: 0.4433962, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &8206848587207049363 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8206848587207049362} + - component: {fileID: 8206848587207049372} + - component: {fileID: 8206848587207049373} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8206848587207049362 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848587207049363} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8206848585801840199} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8206848587207049372 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848587207049363} + m_CullTransparentMesh: 0 +--- !u!114 &8206848587207049373 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8206848587207049363} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Random Color + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 26.85 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_changeColor_button.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_changeColor_button.prefab.meta new file mode 100644 index 000000000..27bdac815 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_changeColor_button.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2e24e5d08f768694a820bc2b2882dcd8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_header.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_header.prefab new file mode 100644 index 000000000..892825ffa --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_header.prefab @@ -0,0 +1,942 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &859456506387901743 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3051998810640862448} + - component: {fileID: 7178025087368458688} + - component: {fileID: 4346605077676505983} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3051998810640862448 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859456506387901743} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8759090477870489071} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 25, y: 0} + m_SizeDelta: {x: -100, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7178025087368458688 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859456506387901743} + m_CullTransparentMesh: 0 +--- !u!114 &4346605077676505983 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859456506387901743} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'SCENE + + DOCUMENTATION' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 21.05 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &3454474520374491224 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3454474520374491225} + - component: {fileID: 3454474520374491231} + - component: {fileID: 3454474520374491230} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3454474520374491225 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474520374491224} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3454474521701678447} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -25} + m_SizeDelta: {x: 500, y: 50} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3454474520374491231 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474520374491224} + m_CullTransparentMesh: 0 +--- !u!114 &3454474520374491230 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474520374491224} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Scriptable Variables + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 44.75 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &3454474521014021480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3454474521014021481} + - component: {fileID: 3454474521014021484} + - component: {fileID: 3454474521014021487} + - component: {fileID: 3454474521014021486} + m_Layer: 5 + m_Name: Level Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3454474521014021481 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521014021480} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3454474521701678447} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -100} + m_SizeDelta: {x: 200, y: 40} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3454474521014021484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521014021480} + m_CullTransparentMesh: 0 +--- !u!114 &3454474521014021487 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521014021480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Level + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 35.8 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &3454474521014021486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521014021480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eca49ccdbc3362d4397b0fbd0b2b9d2a, type: 3} + m_Name: + m_EditorClassIdentifier: + Type: 2 + _boolVariable: {fileID: 0} + _intVariable: {fileID: 11400000, guid: b08cb27373ceb6145928118d45e09460, type: 2} + _floatVariable: {fileID: 0} + _stringVariable: {fileID: 0} + Prefix: 'Level: ' + Suffix: + Increment: 1 + MinMaxInt: {x: 0, y: 2147483647} + DecimalAmount: 2 + IsClamped: 0 + MinMaxFloat: {x: -3.4028235e+38, y: 3.4028235e+38} +--- !u!1 &3454474521286132942 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3454474521286132943} + - component: {fileID: 3454474521286132941} + - component: {fileID: 3454474521286132940} + m_Layer: 5 + m_Name: ControlsText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3454474521286132943 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521286132942} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3454474521701678447} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 400, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3454474521286132941 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521286132942} + m_CullTransparentMesh: 0 +--- !u!114 &3454474521286132940 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521286132942} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: WASD / Arrow Keys to Move + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 31.5 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &3454474521701678446 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3454474521701678447} + - component: {fileID: 3454474521701678444} + m_Layer: 5 + m_Name: prefab_ui_header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3454474521701678447 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521701678446} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 3454474520374491225} + - {fileID: 3454474521014021481} + - {fileID: 3454474521286132943} + - {fileID: 8759090477870489071} + - {fileID: 1734438905986725588} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3454474521701678444 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3454474521701678446} + m_CullTransparentMesh: 0 +--- !u!1 &5237745985678464855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5549245581154991105} + - component: {fileID: 4426701169910941911} + - component: {fileID: 9046135200098658701} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5549245581154991105 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5237745985678464855} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8759090477870489071} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: 50, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &4426701169910941911 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5237745985678464855} + m_CullTransparentMesh: 0 +--- !u!114 &9046135200098658701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5237745985678464855} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 7af0ef0eada21fd41834f726e7b0d6f7, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6063097664747846997 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8759090477870489071} + - component: {fileID: 4589258355047752094} + - component: {fileID: 4525317312688967501} + - component: {fileID: 1971565838835510219} + - component: {fileID: 3604273938976312906} + m_Layer: 5 + m_Name: Doc Button + m_TagString: EditorOnly + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8759090477870489071 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6063097664747846997} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5549245581154991105} + - {fileID: 3051998810640862448} + m_Father: {fileID: 3454474521701678447} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -35, y: -10} + m_SizeDelta: {x: 300, y: 70} + m_Pivot: {x: 1, y: 1} +--- !u!222 &4589258355047752094 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6063097664747846997} + m_CullTransparentMesh: 0 +--- !u!114 &4525317312688967501 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6063097664747846997} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 0.55 +--- !u!114 &1971565838835510219 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6063097664747846997} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.8396226, g: 0.8396226, b: 0.8396226, a: 1} + m_PressedColor: {r: 0.6037736, g: 0.6037736, b: 0.6037736, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4525317312688967501} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &3604273938976312906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6063097664747846997} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9a194c73921123245a96d83fcef520de, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &3454474521693897277 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 3454474521701678447} + m_Modifications: + - target: {fileID: 4026557508952224998, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_Name + value: prefab_ui_hyperlink_panel + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_SizeDelta.x + value: 250 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_SizeDelta.y + value: 140 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d61aa41cf47602e429e4832cc6367297, type: 3} +--- !u!224 &1734438905986725588 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4026557508952225001, guid: d61aa41cf47602e429e4832cc6367297, + type: 3} + m_PrefabInstance: {fileID: 3454474521693897277} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_header.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_header.prefab.meta new file mode 100644 index 000000000..6550ea317 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_header.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 20f1ea5b050953a43a4f999867c05334 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_hyperlink_panel.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_hyperlink_panel.prefab new file mode 100644 index 000000000..118a511e7 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_hyperlink_panel.prefab @@ -0,0 +1,368 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4026557508952224998 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4026557508952225001} + - component: {fileID: 4026557508952225002} + - component: {fileID: 4026557508952225003} + - component: {fileID: 4026557508952225000} + m_Layer: 5 + m_Name: prefab_ui_hyperlink_panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4026557508952225001 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557508952224998} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4026557509609455825} + - {fileID: 4026557511015700433} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 250, y: 140} + m_Pivot: {x: 0, y: 1} +--- !u!222 &4026557508952225002 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557508952224998} + m_CullTransparentMesh: 0 +--- !u!114 &4026557508952225003 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557508952224998} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4026557508952225000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557508952224998} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 1 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 +--- !u!1 &4026557509609455790 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4026557509609455825} + - component: {fileID: 4026557509609455826} + - component: {fileID: 4026557509609455827} + - component: {fileID: 4026557509609455824} + - component: {fileID: 4026557509609455829} + m_Layer: 5 + m_Name: DiscordButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4026557509609455825 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557509609455790} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4026557508952225001} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 125, y: -35} + m_SizeDelta: {x: 250, y: 70} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4026557509609455826 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557509609455790} + m_CullTransparentMesh: 0 +--- !u!114 &4026557509609455827 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557509609455790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: c4f13e22e47d02d49916d5c0699b91c3, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4026557509609455824 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557509609455790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.8396226, g: 0.8396226, b: 0.8396226, a: 1} + m_PressedColor: {r: 0.6037736, g: 0.6037736, b: 0.6037736, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4026557509609455827} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &4026557509609455829 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557509609455790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c06c8dabea8fce541a2e7c0d79890fc4, type: 3} + m_Name: + m_EditorClassIdentifier: + _url: https://discord.gg/CVhCNDbxF5 +--- !u!1 &4026557511015700398 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4026557511015700433} + - component: {fileID: 4026557511015700434} + - component: {fileID: 4026557511015700435} + - component: {fileID: 4026557511015700432} + - component: {fileID: 4026557511015700437} + m_Layer: 5 + m_Name: AssetStoreButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4026557511015700433 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557511015700398} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4026557508952225001} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 125, y: -105} + m_SizeDelta: {x: 250, y: 70} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4026557511015700434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557511015700398} + m_CullTransparentMesh: 0 +--- !u!114 &4026557511015700435 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557511015700398} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 93cc5d02a7f44a6469bf7ded956520f4, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4026557511015700432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557511015700398} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.8396226, g: 0.8396226, b: 0.8396226, a: 1} + m_PressedColor: {r: 0.6037736, g: 0.6037736, b: 0.6037736, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4026557511015700435} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &4026557511015700437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4026557511015700398} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c06c8dabea8fce541a2e7c0d79890fc4, type: 3} + m_Name: + m_EditorClassIdentifier: + _url: https://assetstore.unity.com/packages/tools/utilities/soap-scriptableobject-architecture-pattern-232107#reviews diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_hyperlink_panel.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_hyperlink_panel.prefab.meta new file mode 100644 index 000000000..409b2fe24 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/UI/prefab_ui_hyperlink_panel.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d61aa41cf47602e429e4832cc6367297 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_event.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_event.prefab new file mode 100644 index 000000000..a04a881b8 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_event.prefab @@ -0,0 +1,709 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1740615074012290535 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615074012290534} + - component: {fileID: 1740615074012290531} + - component: {fileID: 1740615074012290528} + - component: {fileID: 1740615074012290529} + m_Layer: 0 + m_Name: View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615074012290534 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074012290535} + m_LocalRotation: {x: 0.35355338, y: -0.1464466, z: 0.35355338, w: 0.8535535} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1740615074275428392} + - {fileID: 1740615075326362515} + - {fileID: 1740615074790202999} + - {fileID: 1740615074812674658} + - {fileID: 1740615074877278432} + - {fileID: 1740615075167058044} + m_Father: {fileID: 1740615074482576884} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 45} +--- !u!33 &1740615074012290531 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074012290535} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615074012290528 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074012290535} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 520ee656973d1eb458d99e80ee8a04f8, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &1740615074012290529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074012290535} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a002038577b91f04ba47737c2c6cd02a, type: 3} + m_Name: + m_EditorClassIdentifier: + _speed: 350 +--- !u!1 &1740615074275428393 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615074275428392} + - component: {fileID: 1740615074275428394} + - component: {fileID: 1740615074275428395} + m_Layer: 0 + m_Name: Cylinder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615074275428392 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074275428393} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 1740615074012290534} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1740615074275428394 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074275428393} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615074275428395 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074275428393} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1740615074482576885 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615074482576884} + - component: {fileID: 1740615074482576883} + - component: {fileID: 1740615074482576881} + - component: {fileID: 1740615074482576886} + - component: {fileID: 1740615074482576887} + m_Layer: 0 + m_Name: prefab_enemy_event + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615074482576884 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074482576885} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1740615074012290534} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1740615074482576883 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074482576885} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30ad49a59816cef419f00ca84fc44181, type: 3} + m_Name: + m_EditorClassIdentifier: + _onHitPlayerEvent: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400000, guid: ad78f0160964f764394463d049e63142, type: 2} + m_MethodName: Raise + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 30 + m_FloatArgument: 25 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1740615074482576881 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074482576885} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 51bcfe43449e44d5a38179065b42c189, type: 3} + m_Name: + m_EditorClassIdentifier: + _onStartMoving: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1740615074012290529} + m_MethodName: SetRotationSpeed + m_Mode: 4 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 600 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _onStopMoving: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1740615074012290529} + m_MethodName: SetRotationSpeed + m_Mode: 4 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 100 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _speed: + UseLocal: 1 + LocalValue: 10 + Variable: {fileID: 0} +--- !u!135 &1740615074482576886 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074482576885} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 1, z: 0} +--- !u!54 &1740615074482576887 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074482576885} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!1 &1740615074790202996 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615074790202999} + - component: {fileID: 1740615074790202993} + - component: {fileID: 1740615074790202998} + m_Layer: 0 + m_Name: Cylinder (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615074790202999 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074790202996} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0.5, y: 0, z: -0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 1740615074012290534} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!33 &1740615074790202993 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074790202996} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615074790202998 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074790202996} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1740615074812674659 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615074812674658} + - component: {fileID: 1740615074812674684} + - component: {fileID: 1740615074812674685} + m_Layer: 0 + m_Name: Cylinder (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615074812674658 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074812674659} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: -0.5, y: 0, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 1740615074012290534} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!33 &1740615074812674684 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074812674659} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615074812674685 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074812674659} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1740615074877278433 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615074877278432} + - component: {fileID: 1740615074877278434} + - component: {fileID: 1740615074877278435} + m_Layer: 0 + m_Name: Cylinder (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615074877278432 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074877278433} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: -0.5} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 1740615074012290534} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!33 &1740615074877278434 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074877278433} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615074877278435 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615074877278433} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1740615075167058045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615075167058044} + - component: {fileID: 1740615075167058046} + - component: {fileID: 1740615075167058047} + m_Layer: 0 + m_Name: Cylinder (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615075167058044 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615075167058045} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0, y: -0, z: 0.5} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 1740615074012290534} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!33 &1740615075167058046 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615075167058045} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615075167058047 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615075167058045} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &1740615075326362512 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1740615075326362515} + - component: {fileID: 1740615075326362605} + - component: {fileID: 1740615075326362514} + m_Layer: 0 + m_Name: Cylinder (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1740615075326362515 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615075326362512} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.5, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 1740615074012290534} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1740615075326362605 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615075326362512} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1740615075326362514 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1740615075326362512} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_event.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_event.prefab.meta new file mode 100644 index 000000000..1beb28d69 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_event.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc13e50625e4feb42a5521ab8dd26d36 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_variable.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_variable.prefab new file mode 100644 index 000000000..f2474235f --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_variable.prefab @@ -0,0 +1,709 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4674458054544990714 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458054544990713} + - component: {fileID: 4674458054544990711} + - component: {fileID: 4674458054544990712} + m_Layer: 0 + m_Name: Cylinder (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458054544990713 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458054544990714} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: -0.5, y: 0, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 4674458055284598583} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!33 &4674458054544990711 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458054544990714} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458054544990712 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458054544990714} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &4674458055030867048 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458055030867047} + - component: {fileID: 4674458055030867045} + - component: {fileID: 4674458055030867046} + m_Layer: 0 + m_Name: Cylinder (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458055030867047 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055030867048} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0.5, y: 0, z: -0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 4674458055284598583} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!33 &4674458055030867045 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055030867048} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458055030867046 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055030867048} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &4674458055284598584 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458055284598583} + - component: {fileID: 4674458055284598580} + - component: {fileID: 4674458055284598581} + - component: {fileID: 4674458055284598582} + m_Layer: 0 + m_Name: View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458055284598583 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055284598584} + m_LocalRotation: {x: 0.35355338, y: -0.1464466, z: 0.35355338, w: 0.8535535} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 4674458055440483580} + - {fileID: 4674458055620607495} + - {fileID: 4674458055030867047} + - {fileID: 4674458054544990713} + - {fileID: 4674458056316812285} + - {fileID: 4674458055739741463} + m_Father: {fileID: 4674458056370438928} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 45} +--- !u!33 &4674458055284598580 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055284598584} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458055284598581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055284598584} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44182b698b966ef4582eb1e2a30f8f6e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &4674458055284598582 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055284598584} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a002038577b91f04ba47737c2c6cd02a, type: 3} + m_Name: + m_EditorClassIdentifier: + _speed: 350 +--- !u!1 &4674458055440483581 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458055440483580} + - component: {fileID: 4674458055440483578} + - component: {fileID: 4674458055440483579} + m_Layer: 0 + m_Name: Cylinder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458055440483580 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055440483581} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 4674458055284598583} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4674458055440483578 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055440483581} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458055440483579 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055440483581} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &4674458055620607496 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458055620607495} + - component: {fileID: 4674458055620607493} + - component: {fileID: 4674458055620607494} + m_Layer: 0 + m_Name: Cylinder (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458055620607495 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055620607496} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.5, z: 0} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 4674458055284598583} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4674458055620607493 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055620607496} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458055620607494 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055620607496} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &4674458055739741464 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458055739741463} + - component: {fileID: 4674458055739741461} + - component: {fileID: 4674458055739741462} + m_Layer: 0 + m_Name: Cylinder (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458055739741463 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055739741464} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0, y: -0, z: 0.5} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 4674458055284598583} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!33 &4674458055739741461 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055739741464} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458055739741462 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458055739741464} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &4674458056316812286 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458056316812285} + - component: {fileID: 4674458056316812283} + - component: {fileID: 4674458056316812284} + m_Layer: 0 + m_Name: Cylinder (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458056316812285 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056316812286} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: -0.5} + m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} + m_Children: [] + m_Father: {fileID: 4674458055284598583} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!33 &4674458056316812283 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056316812286} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4674458056316812284 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056316812286} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6d2cc2180c9c5ae4ba432f0e8d26ed88, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &4674458056370438929 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4674458056370438928} + - component: {fileID: 4674458056370439020} + - component: {fileID: 4674458056370439021} + - component: {fileID: 4674458056370439022} + - component: {fileID: 4674458056370439023} + m_Layer: 0 + m_Name: prefab_enemy_variable + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4674458056370438928 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056370438929} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4674458055284598583} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4674458056370439020 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056370438929} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30ad49a59816cef419f00ca84fc44181, type: 3} + m_Name: + m_EditorClassIdentifier: + _onHitPlayerEvent: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400000, guid: 4d77b00fc59b6c043aa93d4165cb1355, type: 2} + m_MethodName: Add + m_Mode: 4 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: -20 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &4674458056370439021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056370438929} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 51bcfe43449e44d5a38179065b42c189, type: 3} + m_Name: + m_EditorClassIdentifier: + _onStartMoving: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4674458055284598582} + m_MethodName: SetRotationSpeed + m_Mode: 4 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: -600 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _onStopMoving: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4674458055284598582} + m_MethodName: SetRotationSpeed + m_Mode: 4 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: -100 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _speed: + UseLocal: 1 + LocalValue: 10 + Variable: {fileID: 0} +--- !u!135 &4674458056370439022 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056370438929} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 1, z: 0} +--- !u!54 &4674458056370439023 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4674458056370438929} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_variable.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_variable.prefab.meta new file mode 100644 index 000000000..28ecb854b --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_enemy_variable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bcd93c3c7464b974499d569fce8594f3 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_game_manager.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_game_manager.prefab new file mode 100644 index 000000000..db9bf98b8 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_game_manager.prefab @@ -0,0 +1,82 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4231746325602199150 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4231746325602199144} + - component: {fileID: 4231746325602199145} + - component: {fileID: 1981558924888359082} + m_Layer: 0 + m_Name: prefab_game_manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4231746325602199144 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4231746325602199150} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4231746325602199145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4231746325602199150} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00504177c39509d4fa87cec76aaa964d, type: 3} + m_Name: + m_EditorClassIdentifier: + _reloadSceneKey: 114 + _deletePlayerPrefs: 112 +--- !u!114 &1981558924888359082 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4231746325602199150} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d93ba61543949824db31c7cb89b4f009, type: 3} + m_Name: + m_EditorClassIdentifier: + _binding: 0 + _disableAfterSubscribing: 0 + _eventResponses: + - Delay: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + ScriptableEvent: {fileID: 11400000, guid: 91803624f3bcac240a834f04fcd56022, type: 2} + Response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4231746325602199145} + m_MethodName: ReloadScene + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_game_manager.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_game_manager.prefab.meta new file mode 100644 index 000000000..6c74c037a --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_game_manager.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8d6db96846126544eaaae48ea12d027d +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_player.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_player.prefab new file mode 100644 index 000000000..fcd9da04e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_player.prefab @@ -0,0 +1,10231 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &445633268897393020 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1824076109137066574} + - component: {fileID: 8042402746377698409} + m_Layer: 0 + m_Name: Mark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1824076109137066574 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 445633268897393020} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.8, z: -0} + m_LocalScale: {x: 1, y: 0.3, z: 1} + m_Children: [] + m_Father: {fileID: 1487974447016756360} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &8042402746377698409 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 445633268897393020} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: cb29b326a2aa2814caa9eaf258f26b85, type: 3} + m_Color: {r: 1, g: 0, b: 0, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &4194882291692124485 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2750274560617560720} + - component: {fileID: 4194882291692124480} + - component: {fileID: 4194882291692124487} + - component: {fileID: 664370991783885924} + m_Layer: 0 + m_Name: View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2750274560617560720 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291692124485} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4194882292261393421} + - {fileID: 4194882292320040149} + - {fileID: 4194882293096305290} + - {fileID: 1487974447016756360} + m_Father: {fileID: 4194882291932569374} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4194882291692124480 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291692124485} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4194882291692124487 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291692124485} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 66221ca8454932c44b06d3920e1842c6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &664370991783885924 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291692124485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 848384699fb6fa6418e5bc4e5ce8a2b0, type: 3} + m_Name: + m_EditorClassIdentifier: + _colorVariable: {fileID: 11400000, guid: 1e41cb1a09a2ee243b5bc12fc79fc070, type: 2} +--- !u!1 &4194882291932569361 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4194882291932569374} + - component: {fileID: 4194882291932569363} + - component: {fileID: 4194882291932569362} + - component: {fileID: 4194882291932569375} + - component: {fileID: 2745443148538405618} + - component: {fileID: 3976929907702811706} + m_Layer: 0 + m_Name: prefab_player + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4194882291932569374 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291932569361} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2750274560617560720} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4194882291932569363 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291932569361} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b28d45e23cb4144c9c78325951921c3, type: 3} + m_Name: + m_EditorClassIdentifier: + _inputsEnabled: {fileID: 11400000, guid: 6c455a299abc5e348bd98f6344a7a512, type: 2} + _inputs: {fileID: 11400000, guid: 942121ed39c0d7444b86b1d1eba32708, type: 2} +--- !u!114 &4194882291932569362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291932569361} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 57bd829b9478fa7489ccd49858729de9, type: 3} + m_Name: + m_EditorClassIdentifier: + _inputs: {fileID: 11400000, guid: 942121ed39c0d7444b86b1d1eba32708, type: 2} + _speed: + UseLocal: 0 + LocalValue: 0 + Variable: {fileID: 11400000, guid: 12c72dffb97d7bd47bb9fcaf283a2cbb, type: 2} +--- !u!114 &4194882291932569375 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291932569361} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 96975d436de63944ba2d377cc7845e5a, type: 3} + m_Name: + m_EditorClassIdentifier: + _currentHealth: {fileID: 11400000, guid: 4d77b00fc59b6c043aa93d4165cb1355, type: 2} + _maxHealth: + UseLocal: 0 + LocalValue: 0 + Variable: {fileID: 11400000, guid: 8f6a7757cb902e2439f0278bb02cc076, type: 2} + _onPlayerDamaged: {fileID: 11400000, guid: c7763aedbe7be0c40a542b792395a449, type: 2} + _onPlayerHealed: {fileID: 11400000, guid: a6a20d8ae577ba640ae4778b26c41a34, type: 2} + _onPlayerDeath: {fileID: 11400000, guid: 3852337de49c88a43a36f79b4a7d8769, type: 2} +--- !u!114 &2745443148538405618 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291932569361} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c2d1b2c85cdd0c247bdc557fe5e9fb17, type: 3} + m_Name: + m_EditorClassIdentifier: + scriptableListPlayer: {fileID: 11400000, guid: dacfa78ccde7e0f4e9821e281a0fd4af, + type: 2} + _playerVariable: {fileID: 11400000, guid: 7a54df0fd5906294fb972c78db1e99cd, type: 2} + _onNotified: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 9137711995773346479} + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 +--- !u!136 &3976929907702811706 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882291932569361} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 1, z: 0} +--- !u!1 &4194882292261393420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4194882292261393421} + - component: {fileID: 4194882292261393422} + m_Layer: 0 + m_Name: Trail + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4194882292261393421 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882292261393420} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -0.8, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2750274560617560720} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!96 &4194882292261393422 +TrailRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882292261393420} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Time: 1 + m_Parameters: + serializedVersion: 3 + widthMultiplier: 0.8 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0.041666627 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 0} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 90 + alignment: 1 + textureMode: 0 + shadowBias: 0.5 + generateLightingData: 0 + m_MinVertexDistance: 0.001 + m_Autodestruct: 0 + m_Emitting: 1 +--- !u!1 &4194882292320040138 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4194882292320040149} + - component: {fileID: 4194882292320040148} + - component: {fileID: 4194882292320040139} + - component: {fileID: 2744277699489329186} + m_Layer: 0 + m_Name: DamageVFX + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4194882292320040149 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882292320040138} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2750274560617560720} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!198 &4194882292320040148 +ParticleSystem: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882292320040138} + serializedVersion: 6 + lengthInSec: 0.3 + simulationSpeed: 1 + stopAction: 0 + cullingMode: 0 + ringBufferMode: 0 + ringBufferLoopRange: {x: 0, y: 1} + looping: 0 + prewarm: 0 + playOnAwake: 0 + useUnscaledTime: 0 + autoRandomSeed: 1 + useRigidbodyForVelocity: 1 + startDelay: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 1 + moveWithCustomTransform: {fileID: 0} + scalingMode: 1 + randomSeed: 0 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.3 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 5 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 0, b: 0, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + startSize: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 100 + size3D: 0 + rotation3D: 0 + gravityModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 6 + enabled: 1 + type: 0 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 1, y: 1, z: 1} + placementMode: 0 + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_MeshSpawn: + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_Sprite: {fileID: 0} + m_SpriteRenderer: {fileID: 0} + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + m_Texture: {fileID: 0} + m_TextureClipChannel: 3 + m_TextureClipThreshold: 0 + m_TextureUVChannel: 0 + m_TextureColorAffectsParticles: 1 + m_TextureAlphaAffectsParticles: 1 + m_TextureBilinearFiltering: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 0.5 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 1 + serializedVersion: 4 + rateOverTime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 1 + m_Bursts: + - serializedVersion: 2 + time: 0 + countCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 20 + minScalar: 30 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + cycleCount: 1 + repeatInterval: 0.01 + probability: 1 + SizeModule: + enabled: 1 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -2 + outSlope: -2 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 0.47058824} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + UVModule: + serializedVersion: 2 + enabled: 0 + mode: 0 + timeMode: 0 + fps: 30 + frameOverTime: + serializedVersion: 2 + minMaxState: 1 + scalar: 0.9999 + minScalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedRange: {x: 0, y: 1} + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + rowMode: 1 + sprites: + - sprite: {fileID: 0} + flipU: 0 + flipV: 0 + VelocityModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + radial: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + serializedVersion: 2 + enabled: 0 + multiplierCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + influenceFilter: 0 + influenceMask: + serializedVersion: 2 + m_Bits: 4294967295 + influenceList: [] + ClampVelocityModule: + enabled: 1 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + multiplyDragByParticleSize: 1 + multiplyDragByParticleVelocity: 1 + dampen: 0 + drag: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + NoiseModule: + enabled: 1 + strength: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 2 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 0 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - serializedVersion: 3 + emitter: {fileID: 0} + type: 0 + properties: 0 + emitProbability: 1 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 1 + mode: 0 + ratio: 0.5 + lifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + ribbonCount: 1 + shadowBias: 0.5 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + splitSubEmitterRibbons: 0 + attachRibbonsToTransform: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + widthOverTrail: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel0: Color + vector0_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_0: X + vector0_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_1: Y + vector0_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_2: Z + vector0_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_3: W + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel1: Color + vector1_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_0: X + vector1_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_1: Y + vector1_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_2: Z + vector1_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_3: W +--- !u!199 &4194882292320040139 +ParticleSystemRenderer: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882292320040138} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10308, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_ShadowBias: 0 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Flip: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_EnableGPUInstancing: 1 + m_ApplyActiveColorSpace: 1 + m_AllowRoll: 1 + m_VertexStreams: 00010304 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 +--- !u!114 &2744277699489329186 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882292320040138} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f30bb439e6d7dc94489cd1be18593b0e, type: 3} + m_Name: + m_EditorClassIdentifier: + _binding: 0 + _disableAfterSubscribing: 0 + _eventResponses: + - Delay: 0 + _scriptableEvent: {fileID: 11400000, guid: c7763aedbe7be0c40a542b792395a449, type: 2} + _response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4194882292320040148} + m_MethodName: Emit + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &4194882293096305289 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4194882293096305290} + - component: {fileID: 4194882293096305301} + - component: {fileID: 4194882293096305300} + - component: {fileID: 8083483766513885492} + m_Layer: 0 + m_Name: HealFX + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4194882293096305290 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882293096305289} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2750274560617560720} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!198 &4194882293096305301 +ParticleSystem: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882293096305289} + serializedVersion: 6 + lengthInSec: 0.3 + simulationSpeed: 1 + stopAction: 0 + cullingMode: 0 + ringBufferMode: 0 + ringBufferLoopRange: {x: 0, y: 1} + looping: 0 + prewarm: 0 + playOnAwake: 0 + useUnscaledTime: 0 + autoRandomSeed: 1 + useRigidbodyForVelocity: 1 + startDelay: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 1 + moveWithCustomTransform: {fileID: 0} + scalingMode: 1 + randomSeed: 0 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.3 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 5 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 0.11532295, g: 1, b: 0, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + startSize: + serializedVersion: 2 + minMaxState: 3 + scalar: 0.5 + minScalar: 0.1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeY: + serializedVersion: 2 + minMaxState: 3 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + serializedVersion: 2 + minMaxState: 3 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 30 + size3D: 0 + rotation3D: 0 + gravityModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: -1 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 6 + enabled: 1 + type: 2 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 1, y: 1, z: 1} + placementMode: 0 + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_MeshSpawn: + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_Sprite: {fileID: 0} + m_SpriteRenderer: {fileID: 0} + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + m_Texture: {fileID: 0} + m_TextureClipChannel: 3 + m_TextureClipThreshold: 0 + m_TextureUVChannel: 0 + m_TextureColorAffectsParticles: 1 + m_TextureAlphaAffectsParticles: 1 + m_TextureBilinearFiltering: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 0.5 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 1 + serializedVersion: 4 + rateOverTime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 1 + m_Bursts: + - serializedVersion: 2 + time: 0 + countCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 50 + minScalar: 30 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + cycleCount: 1 + repeatInterval: 0.01 + probability: 1 + SizeModule: + enabled: 1 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -2 + outSlope: -2 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 0} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + UVModule: + serializedVersion: 2 + enabled: 0 + mode: 0 + timeMode: 0 + fps: 30 + frameOverTime: + serializedVersion: 2 + minMaxState: 1 + scalar: 0.9999 + minScalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedRange: {x: 0, y: 1} + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + rowMode: 1 + sprites: + - sprite: {fileID: 0} + flipU: 0 + flipV: 0 + VelocityModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + radial: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + serializedVersion: 2 + enabled: 0 + multiplierCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + influenceFilter: 0 + influenceMask: + serializedVersion: 2 + m_Bits: 4294967295 + influenceList: [] + ClampVelocityModule: + enabled: 1 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + multiplyDragByParticleSize: 1 + multiplyDragByParticleVelocity: 1 + dampen: 0 + drag: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + NoiseModule: + enabled: 0 + strength: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 2 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 0 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - serializedVersion: 3 + emitter: {fileID: 0} + type: 0 + properties: 0 + emitProbability: 1 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 1 + mode: 0 + ratio: 0.5 + lifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + ribbonCount: 1 + shadowBias: 0.5 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + splitSubEmitterRibbons: 0 + attachRibbonsToTransform: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + widthOverTrail: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel0: Color + vector0_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_0: X + vector0_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_1: Y + vector0_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_2: Z + vector0_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_3: W + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel1: Color + vector1_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_0: X + vector1_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_1: Y + vector1_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_2: Z + vector1_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_3: W +--- !u!199 &4194882293096305300 +ParticleSystemRenderer: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882293096305289} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10308, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_ShadowBias: 0 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Flip: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_EnableGPUInstancing: 1 + m_ApplyActiveColorSpace: 1 + m_AllowRoll: 1 + m_VertexStreams: 00010304 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 +--- !u!114 &8083483766513885492 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4194882293096305289} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f30bb439e6d7dc94489cd1be18593b0e, type: 3} + m_Name: + m_EditorClassIdentifier: + _binding: 0 + _disableAfterSubscribing: 0 + _eventResponses: + - Delay: 0 + _scriptableEvent: {fileID: 11400000, guid: a6a20d8ae577ba640ae4778b26c41a34, type: 2} + _response: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4194882293096305301} + m_MethodName: Emit + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &9137711995773346479 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1487974447016756360} + - component: {fileID: 4495697441240584313} + - component: {fileID: 5512463778446690053} + m_Layer: 0 + m_Name: Notification + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1487974447016756360 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9137711995773346479} + m_LocalRotation: {x: 0.13052616, y: 0, z: 0, w: 0.9914449} + m_LocalPosition: {x: 0, y: 2.5, z: 0.14} + m_LocalScale: {x: 0.25, y: 1, z: 1} + m_Children: + - {fileID: 1824076109137066574} + m_Father: {fileID: 2750274560617560720} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 15, y: 0, z: 0} +--- !u!212 &4495697441240584313 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9137711995773346479} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: cb29b326a2aa2814caa9eaf258f26b85, type: 3} + m_Color: {r: 1, g: 0, b: 0, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!114 &5512463778446690053 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9137711995773346479} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e810beda65faeb40a9ebdc7e0a1eeb9, type: 3} + m_Name: + m_EditorClassIdentifier: + _duration: 0.5 diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_player.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_player.prefab.meta new file mode 100644 index 000000000..d06fa3ccd --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_player.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e69dca4bd58fece40ba215f5c02c0e7a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onDestroy.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onDestroy.prefab new file mode 100644 index 000000000..f541d586b --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onDestroy.prefab @@ -0,0 +1,4828 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2365040246576945952 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2365040246576946013} + - component: {fileID: 2365040246576945954} + - component: {fileID: 2365040246576945955} + - component: {fileID: 2365040246576946012} + m_Layer: 0 + m_Name: prefab_vfx_onDestroy + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2365040246576946013 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2365040246576945952} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!198 &2365040246576945954 +ParticleSystem: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2365040246576945952} + serializedVersion: 6 + lengthInSec: 0.3 + simulationSpeed: 1 + stopAction: 0 + cullingMode: 0 + ringBufferMode: 0 + ringBufferLoopRange: {x: 0, y: 1} + looping: 0 + prewarm: 0 + playOnAwake: 1 + useUnscaledTime: 0 + autoRandomSeed: 1 + useRigidbodyForVelocity: 1 + startDelay: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 1 + moveWithCustomTransform: {fileID: 0} + scalingMode: 1 + randomSeed: 0 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.3 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 5 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 0.7735849, g: 0, b: 0, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + startSize: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 100 + size3D: 0 + rotation3D: 0 + gravityModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 6 + enabled: 1 + type: 0 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 1, y: 1, z: 1} + placementMode: 0 + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_MeshSpawn: + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_Sprite: {fileID: 0} + m_SpriteRenderer: {fileID: 0} + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + m_Texture: {fileID: 0} + m_TextureClipChannel: 3 + m_TextureClipThreshold: 0 + m_TextureUVChannel: 0 + m_TextureColorAffectsParticles: 1 + m_TextureAlphaAffectsParticles: 1 + m_TextureBilinearFiltering: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 0.5 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 1 + serializedVersion: 4 + rateOverTime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 1 + m_Bursts: + - serializedVersion: 2 + time: 0 + countCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 20 + minScalar: 30 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + cycleCount: 1 + repeatInterval: 0.01 + probability: 1 + SizeModule: + enabled: 1 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -2 + outSlope: -2 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 0.47058824} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + UVModule: + serializedVersion: 2 + enabled: 0 + mode: 0 + timeMode: 0 + fps: 30 + frameOverTime: + serializedVersion: 2 + minMaxState: 1 + scalar: 0.9999 + minScalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedRange: {x: 0, y: 1} + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + rowMode: 1 + sprites: + - sprite: {fileID: 0} + flipU: 0 + flipV: 0 + VelocityModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + radial: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + serializedVersion: 2 + enabled: 0 + multiplierCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + influenceFilter: 0 + influenceMask: + serializedVersion: 2 + m_Bits: 4294967295 + influenceList: [] + ClampVelocityModule: + enabled: 1 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + multiplyDragByParticleSize: 1 + multiplyDragByParticleVelocity: 1 + dampen: 0 + drag: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + NoiseModule: + enabled: 1 + strength: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 2 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 0 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - serializedVersion: 3 + emitter: {fileID: 0} + type: 0 + properties: 0 + emitProbability: 1 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 1 + mode: 0 + ratio: 0.5 + lifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + ribbonCount: 1 + shadowBias: 0.5 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + splitSubEmitterRibbons: 0 + attachRibbonsToTransform: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + widthOverTrail: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel0: Color + vector0_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_0: X + vector0_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_1: Y + vector0_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_2: Z + vector0_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_3: W + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel1: Color + vector1_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_0: X + vector1_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_1: Y + vector1_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_2: Z + vector1_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_3: W +--- !u!199 &2365040246576945955 +ParticleSystemRenderer: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2365040246576945952} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10308, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_ShadowBias: 0 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Flip: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_EnableGPUInstancing: 1 + m_ApplyActiveColorSpace: 1 + m_AllowRoll: 1 + m_VertexStreams: 00010304 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 +--- !u!114 &2365040246576946012 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2365040246576945952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e810beda65faeb40a9ebdc7e0a1eeb9, type: 3} + m_Name: + m_EditorClassIdentifier: + _duration: 0.5 diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onDestroy.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onDestroy.prefab.meta new file mode 100644 index 000000000..49e4dcd99 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onDestroy.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 37f87ae65bea04e4c8285e0424671c2a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onSpawn.prefab b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onSpawn.prefab new file mode 100644 index 000000000..57193c072 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onSpawn.prefab @@ -0,0 +1,4828 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6065571146392576349 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6065571146392576344} + - component: {fileID: 6065571146392576347} + - component: {fileID: 6065571146392576346} + - component: {fileID: 6065571146392576345} + m_Layer: 0 + m_Name: prefab_vfx_onSpawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6065571146392576344 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6065571146392576349} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!198 &6065571146392576347 +ParticleSystem: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6065571146392576349} + serializedVersion: 6 + lengthInSec: 0.3 + simulationSpeed: 1 + stopAction: 0 + cullingMode: 0 + ringBufferMode: 0 + ringBufferLoopRange: {x: 0, y: 1} + looping: 0 + prewarm: 0 + playOnAwake: 1 + useUnscaledTime: 0 + autoRandomSeed: 1 + useRigidbodyForVelocity: 1 + startDelay: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 1 + moveWithCustomTransform: {fileID: 0} + scalingMode: 1 + randomSeed: 0 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.3 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 5 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 0.32156864, g: 0.8352941, b: 0.9490196, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + startSize: + serializedVersion: 2 + minMaxState: 3 + scalar: 0.5 + minScalar: 0.1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeY: + serializedVersion: 2 + minMaxState: 3 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + serializedVersion: 2 + minMaxState: 3 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 30 + size3D: 0 + rotation3D: 0 + gravityModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: -1 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 6 + enabled: 1 + type: 2 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 1, y: 1, z: 1} + placementMode: 0 + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_MeshSpawn: + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_Sprite: {fileID: 0} + m_SpriteRenderer: {fileID: 0} + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + m_Texture: {fileID: 0} + m_TextureClipChannel: 3 + m_TextureClipThreshold: 0 + m_TextureUVChannel: 0 + m_TextureColorAffectsParticles: 1 + m_TextureAlphaAffectsParticles: 1 + m_TextureBilinearFiltering: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 0.5 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 1 + serializedVersion: 4 + rateOverTime: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 1 + m_Bursts: + - serializedVersion: 2 + time: 0 + countCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 50 + minScalar: 30 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + cycleCount: 1 + repeatInterval: 0.01 + probability: 1 + SizeModule: + enabled: 1 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -2 + outSlope: -2 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 0} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + UVModule: + serializedVersion: 2 + enabled: 0 + mode: 0 + timeMode: 0 + fps: 30 + frameOverTime: + serializedVersion: 2 + minMaxState: 1 + scalar: 0.9999 + minScalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedRange: {x: 0, y: 1} + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + rowMode: 1 + sprites: + - sprite: {fileID: 0} + flipU: 0 + flipV: 0 + VelocityModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + orbitalOffsetZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + radial: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + serializedVersion: 2 + enabled: 0 + multiplierCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + influenceFilter: 0 + influenceMask: + serializedVersion: 2 + m_Bits: 4294967295 + influenceList: [] + ClampVelocityModule: + enabled: 1 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + multiplyDragByParticleSize: 1 + multiplyDragByParticleVelocity: 1 + dampen: 0 + drag: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + NoiseModule: + enabled: 0 + strength: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 2 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 0 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - serializedVersion: 3 + emitter: {fileID: 0} + type: 0 + properties: 0 + emitProbability: 1 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 1 + mode: 0 + ratio: 0.5 + lifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + ribbonCount: 1 + shadowBias: 0.5 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + splitSubEmitterRibbons: 0 + attachRibbonsToTransform: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + widthOverTrail: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel0: Color + vector0_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_0: X + vector0_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_1: Y + vector0_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_2: Z + vector0_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_3: W + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel1: Color + vector1_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_0: X + vector1_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_1: Y + vector1_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_2: Z + vector1_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_3: W +--- !u!199 &6065571146392576346 +ParticleSystemRenderer: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6065571146392576349} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10308, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_ShadowBias: 0 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Flip: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_EnableGPUInstancing: 1 + m_ApplyActiveColorSpace: 1 + m_AllowRoll: 1 + m_VertexStreams: 00010304 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 +--- !u!114 &6065571146392576345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6065571146392576349} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e810beda65faeb40a9ebdc7e0a1eeb9, type: 3} + m_Name: + m_EditorClassIdentifier: + _duration: 0.5 diff --git a/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onSpawn.prefab.meta b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onSpawn.prefab.meta new file mode 100644 index 000000000..a3e06989b --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Prefabs/prefab_vfx_onSpawn.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3b8773243501dc24692b437353e716eb +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Resources.meta b/Assets/Obvious/Soap/Examples/Content/Resources.meta new file mode 100644 index 000000000..fb6794fe4 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8cb8abcbd29fc154eb08d8f1f476fb33 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Resources/SoapGameParams.asset b/Assets/Obvious/Soap/Examples/Content/Resources/SoapGameParams.asset new file mode 100644 index 000000000..b06751f5c --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Resources/SoapGameParams.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eae59c7c78e908c4cb7be44b945d6726, type: 3} + m_Name: SoapGameParams + m_EditorClassIdentifier: + TagIndex: 0 + Description: + PlayerHealth: {fileID: 11400000, guid: 4d77b00fc59b6c043aa93d4165cb1355, type: 2} + ReloadSceneEvent: {fileID: 11400000, guid: 91803624f3bcac240a834f04fcd56022, type: 2} + CoinSpawnedAmount: 20 + CoinRotateSpeed: 200 + RandomPlayerColorMode: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/Resources/SoapGameParams.asset.meta b/Assets/Obvious/Soap/Examples/Content/Resources/SoapGameParams.asset.meta new file mode 100644 index 000000000..528105c89 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Resources/SoapGameParams.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 326b2294e2b358c4d915d5964249d510 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableCollections.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections.meta new file mode 100644 index 000000000..9f249cc6e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f1ce51f4edfcb10439a5806bb98a7723 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_dictionary_elementInt.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_dictionary_elementInt.asset new file mode 100644 index 000000000..b1569606f --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_dictionary_elementInt.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 88ea3ccfd1db6c141adacae2643c9a5d, type: 3} + m_Name: example_dictionary_elementInt + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _resetOn: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_dictionary_elementInt.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_dictionary_elementInt.asset.meta new file mode 100644 index 000000000..f95577290 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_dictionary_elementInt.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e076084365e2e4d4da8a333f1aa6c06d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_playerList.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_playerList.asset new file mode 100644 index 000000000..b214d2ce9 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_playerList.asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5768c59cc2f9eb84fab620f5678dfb99, type: 3} + m_Name: example_playerList + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _resetOn: 0 + _list: [] diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_playerList.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_playerList.asset.meta new file mode 100644 index 000000000..0ebc2bcce --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableCollections/example_playerList.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dacfa78ccde7e0f4e9821e281a0fd4af +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums.meta new file mode 100644 index 000000000..8e4ecd0b2 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 496ee4393a8210d4ba5bc8136ffcfad8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_air.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_air.asset new file mode 100644 index 000000000..0c2d4a3a8 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_air.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a1b445334bd6cf4e8317f719a730122, type: 3} + m_Name: example_enum_air + m_EditorClassIdentifier: + TagIndex: 0 + Description: + Icon: {fileID: 21300000, guid: 6338b630033766946a85c13ef29446ac, type: 3} + Color: {r: 1, g: 1, b: 1, a: 1} + Defeats: + - {fileID: 11400000, guid: 09386c3649aed8343aaa9e5a37be341f, type: 2} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_air.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_air.asset.meta new file mode 100644 index 000000000..2cf2b32b7 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_air.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06b02d4a34c26934d8c7a03789142ddf +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_earth.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_earth.asset new file mode 100644 index 000000000..0959cbaad --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_earth.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a1b445334bd6cf4e8317f719a730122, type: 3} + m_Name: example_enum_earth + m_EditorClassIdentifier: + TagIndex: 0 + Description: + Icon: {fileID: 21300000, guid: 6983f9dd33c7c694294a6bf3602318b7, type: 3} + Color: {r: 0.33962262, g: 0.06186023, b: 0.059273757, a: 1} + Defeats: + - {fileID: 11400000, guid: 06b02d4a34c26934d8c7a03789142ddf, type: 2} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_earth.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_earth.asset.meta new file mode 100644 index 000000000..a787ccdb0 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_earth.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 709a36ede0322f448a172bb6797f7662 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_fire.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_fire.asset new file mode 100644 index 000000000..d8d444cb2 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_fire.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a1b445334bd6cf4e8317f719a730122, type: 3} + m_Name: example_enum_fire + m_EditorClassIdentifier: + TagIndex: 0 + Description: + Icon: {fileID: 21300000, guid: d7622a650ec96414fa44fa48fd36a40e, type: 3} + Color: {r: 1, g: 0, b: 0, a: 1} + Defeats: + - {fileID: 11400000, guid: 709a36ede0322f448a172bb6797f7662, type: 2} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_fire.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_fire.asset.meta new file mode 100644 index 000000000..f2a2e1b58 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_fire.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 08fa3e71195fe81428873c3e80c73ef3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_water.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_water.asset new file mode 100644 index 000000000..b6c44a919 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_water.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a1b445334bd6cf4e8317f719a730122, type: 3} + m_Name: example_enum_water + m_EditorClassIdentifier: + TagIndex: 0 + Description: + Icon: {fileID: 21300000, guid: 9a31c5fe9cd646a4d889dbdc1a33f49c, type: 3} + Color: {r: 0, g: 0.4419775, b: 1, a: 1} + Defeats: + - {fileID: 11400000, guid: 08fa3e71195fe81428873c3e80c73ef3, type: 2} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_water.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_water.asset.meta new file mode 100644 index 000000000..93388f1d0 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEnums/example_enum_water.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09386c3649aed8343aaa9e5a37be341f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents.meta new file mode 100644 index 000000000..5acdd8ebd --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: febb64f4ac052904eb96ef699cd504e3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onEnemyHitPlayer.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onEnemyHitPlayer.asset new file mode 100644 index 000000000..63e654cd7 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onEnemyHitPlayer.asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed2a53a13d3e4066b3ccfe94e017a207, type: 3} + m_Name: example_onEnemyHitPlayer + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 + _debugValue: 50 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onEnemyHitPlayer.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onEnemyHitPlayer.asset.meta new file mode 100644 index 000000000..5052f228f --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onEnemyHitPlayer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad78f0160964f764394463d049e63142 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDamaged.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDamaged.asset new file mode 100644 index 000000000..8e29d93aa --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDamaged.asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed2a53a13d3e4066b3ccfe94e017a207, type: 3} + m_Name: example_onPlayerDamaged + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 + _debugValue: 50 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDamaged.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDamaged.asset.meta new file mode 100644 index 000000000..dbb7d73d4 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDamaged.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7763aedbe7be0c40a542b792395a449 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDeath.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDeath.asset new file mode 100644 index 000000000..dc3c4715e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDeath.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a49b7e678b3ebb7418adb84806d24646, type: 3} + m_Name: example_onPlayerDeath + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDeath.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDeath.asset.meta new file mode 100644 index 000000000..d36f455e4 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerDeath.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3852337de49c88a43a36f79b4a7d8769 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerHealed.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerHealed.asset new file mode 100644 index 000000000..28fb38d35 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerHealed.asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed2a53a13d3e4066b3ccfe94e017a207, type: 3} + m_Name: example_onPlayerHealed + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 + _debugValue: 50 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerHealed.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerHealed.asset.meta new file mode 100644 index 000000000..22cb8806f --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_onPlayerHealed.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6a20d8ae577ba640ae4778b26c41a34 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_reloadScene.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_reloadScene.asset new file mode 100644 index 000000000..de223e348 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_reloadScene.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a49b7e678b3ebb7418adb84806d24646, type: 3} + m_Name: example_reloadScene + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_reloadScene.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_reloadScene.asset.meta new file mode 100644 index 000000000..fb9802958 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableEvents/example_reloadScene.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 91803624f3bcac240a834f04fcd56022 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSave.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableSave.meta new file mode 100644 index 000000000..8fb5781da --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSave.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d7d812bb84b96549bdbcede43bf2f29 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSave/scriptable_save_example.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableSave/scriptable_save_example.asset new file mode 100644 index 000000000..3cc78408e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSave/scriptable_save_example.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: feefce10467f6394d81da2717c129df0, type: 3} + m_Name: scriptable_save_example + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 + _loadMode: 1 + _saveMode: 0 + _secondsBetweenSave: 120 + _saveData: + Version: 1 + Level: 0 + Items: [] diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSave/scriptable_save_example.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableSave/scriptable_save_example.asset.meta new file mode 100644 index 000000000..ee2150a2c --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSave/scriptable_save_example.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f2fcbeeffa98a143937da4d38be2bc7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets.meta new file mode 100644 index 000000000..52bc8f9f0 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 609375a7fca8c6049962e7affa0e7b84 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerEvents.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerEvents.asset new file mode 100644 index 000000000..4fa650cd6 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerEvents.asset @@ -0,0 +1,64 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4203086613181210815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed2a53a13d3e4066b3ccfe94e017a207, type: 3} + m_Name: _onDamaged + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 + _debugValue: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 46c5bf15c65a44a2b0dd7e12cfccb0fc, type: 3} + m_Name: PlayerEvents + m_EditorClassIdentifier: + _onDamaged: {fileID: -4203086613181210815} + _onHealed: {fileID: 769645553601730620} + _onDeath: {fileID: 3668189497678090764} +--- !u!114 &769645553601730620 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed2a53a13d3e4066b3ccfe94e017a207, type: 3} + m_Name: _onHealed + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 + _debugValue: 0 +--- !u!114 &3668189497678090764 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a49b7e678b3ebb7418adb84806d24646, type: 3} + m_Name: _onDeath + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _debugLogEnabled: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerEvents.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerEvents.asset.meta new file mode 100644 index 000000000..05302e9c1 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerEvents.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6db70b2a151efcd469f9ecbe4fd3ac67 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerStats.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerStats.asset new file mode 100644 index 000000000..1c6b68e0d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerStats.asset @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7494678335964545613 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: Health + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 44b7ad22e3f4f7e468f62aa4e623efde-7494 + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 3.4028235e+38 + Variable: {fileID: 0} +--- !u!114 &-3856768904149576566 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: MaxHealth + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 44b7ad22e3f4f7e468f62aa4e623efde-3856 + _saveGuid: 0 + _value: 100 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 3.4028235e+38 + Variable: {fileID: 0} +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e164c585022d1ad40be6edb2ea60864d, type: 3} + m_Name: PlayerStats + m_EditorClassIdentifier: + _speed: {fileID: 7398432759180287494} + Health: {fileID: -7494678335964545613} + MaxHealth: {fileID: -3856768904149576566} +--- !u!114 &7398432759180287494 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: _speed + m_EditorClassIdentifier: + TagIndex: 0 + Description: The move speed of the player + _guid: 44b7ad22e3f4f7e468f62aa4e623efde73984 + _saveGuid: 0 + _value: 5 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 3.4028235e+38 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerStats.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerStats.asset.meta new file mode 100644 index 000000000..6416d8db8 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableSubAssets/PlayerStats.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 44b7ad22e3f4f7e468f62aa4e623efde +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables.meta new file mode 100644 index 000000000..ff756cb53 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9bbbefb7efd0e0a46b4dc25df3770fcb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_inputsEnabled.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_inputsEnabled.asset new file mode 100644 index 000000000..ce2a7a996 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_inputsEnabled.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6a11231538da9894d8dce88b47df6a36, type: 3} + m_Name: example_bool_inputsEnabled + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 6c455a299abc5e348bd98f6344a7a512 + _saveGuid: 0 + _value: 1 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 1 + _runtimeValue: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_inputsEnabled.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_inputsEnabled.asset.meta new file mode 100644 index 000000000..f7e17ed02 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_inputsEnabled.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6c455a299abc5e348bd98f6344a7a512 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_tutorialCompleted.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_tutorialCompleted.asset new file mode 100644 index 000000000..df941e968 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_tutorialCompleted.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6a11231538da9894d8dce88b47df6a36, type: 3} + m_Name: example_bool_tutorialCompleted + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 1afe66c634254d647bce4ea62658436e + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 1 + _defaultValue: 0 + _resetOn: 1 + _runtimeValue: 0 diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_tutorialCompleted.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_tutorialCompleted.asset.meta new file mode 100644 index 000000000..97d8943de --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_bool_tutorialCompleted.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1afe66c634254d647bce4ea62658436e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_bossHealth.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_bossHealth.asset new file mode 100644 index 000000000..bbf8cea3a --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_bossHealth.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: example_float_bossHealth + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: b2d46b6b13f41244aae1f6acd82fd69e + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 1 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 100 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_bossHealth.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_bossHealth.asset.meta new file mode 100644 index 000000000..30c849b1c --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_bossHealth.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b2d46b6b13f41244aae1f6acd82fd69e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_enemyHealthTemplate.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_enemyHealthTemplate.asset new file mode 100644 index 000000000..147126802 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_enemyHealthTemplate.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: example_float_enemyHealthTemplate + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 0bd7da7363c6c0544be8f081ed05cd90 + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 1 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 50 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_enemyHealthTemplate.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_enemyHealthTemplate.asset.meta new file mode 100644 index 000000000..9a78c18f0 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_enemyHealthTemplate.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0bd7da7363c6c0544be8f081ed05cd90 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerHealth.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerHealth.asset new file mode 100644 index 000000000..28039fb63 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerHealth.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: example_float_playerHealth + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 4d77b00fc59b6c043aa93d4165cb1355 + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 3.4028235e+38 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerHealth.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerHealth.asset.meta new file mode 100644 index 000000000..3a3a3a4eb --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerHealth.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d77b00fc59b6c043aa93d4165cb1355 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerMaxHealth.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerMaxHealth.asset new file mode 100644 index 000000000..3943a647e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerMaxHealth.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: example_float_playerMaxHealth + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 8f6a7757cb902e2439f0278bb02cc076 + _saveGuid: 0 + _value: 100 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 3.4028235e+38 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerMaxHealth.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerMaxHealth.asset.meta new file mode 100644 index 000000000..dce8180ab --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerMaxHealth.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f6a7757cb902e2439f0278bb02cc076 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerSpeed.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerSpeed.asset new file mode 100644 index 000000000..b6dd8cfac --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerSpeed.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9978ce9c8bdc724896114c9952c52ea, type: 3} + m_Name: example_float_playerSpeed + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 12c72dffb97d7bd47bb9fcaf283a2cbb + _saveGuid: 0 + _value: 5 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 5 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 3.4028235e+38 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerSpeed.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerSpeed.asset.meta new file mode 100644 index 000000000..c96fe6629 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_float_playerSpeed.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 12c72dffb97d7bd47bb9fcaf283a2cbb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_coinCollected.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_coinCollected.asset new file mode 100644 index 000000000..f63351bb8 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_coinCollected.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56cdb8ad39a5bdd4f8ed3d18fae14a63, type: 3} + m_Name: example_int_coinCollected + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 77bd38e7b1d725e46bcdd87734c3d4eb + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 0 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 2147483647 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_coinCollected.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_coinCollected.asset.meta new file mode 100644 index 000000000..4514f0d42 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_coinCollected.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77bd38e7b1d725e46bcdd87734c3d4eb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_level.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_level.asset new file mode 100644 index 000000000..bed565b77 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_level.asset @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56cdb8ad39a5bdd4f8ed3d18fae14a63, type: 3} + m_Name: example_int_level + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: b08cb27373ceb6145928118d45e09460 + _saveGuid: 0 + _value: 0 + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: 0 + _resetOn: 0 + _runtimeValue: 0 + _isClamped: 1 + _min: + UseLocal: 1 + LocalValue: 0 + Variable: {fileID: 0} + _max: + UseLocal: 1 + LocalValue: 2147483647 + Variable: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_level.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_level.asset.meta new file mode 100644 index 000000000..ca30fc529 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_int_level.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b08cb27373ceb6145928118d45e09460 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player.asset new file mode 100644 index 000000000..fc4f2f541 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cde10cb980a03854c82629e2c3d31826, type: 3} + m_Name: example_player + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 7a54df0fd5906294fb972c78db1e99cd + _saveGuid: 0 + _value: {fileID: 0} + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: {fileID: 0} + _resetOn: 1 + _runtimeValue: {fileID: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player.asset.meta new file mode 100644 index 000000000..86fc8dafe --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a54df0fd5906294fb972c78db1e99cd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player_color.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player_color.asset new file mode 100644 index 000000000..66d8b49dc --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player_color.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b7046b79ca6dcd147b7412e32a7dbb69, type: 3} + m_Name: example_player_color + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 1e41cb1a09a2ee243b5bc12fc79fc070 + _saveGuid: 0 + _value: {r: 1, g: 1, b: 1, a: 1} + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: {r: 1, g: 1, b: 1, a: 1} + _resetOn: 0 + _runtimeValue: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player_color.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player_color.asset.meta new file mode 100644 index 000000000..a898cca74 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_player_color.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1e41cb1a09a2ee243b5bc12fc79fc070 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_string_playerName.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_string_playerName.asset new file mode 100644 index 000000000..405b96ea4 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_string_playerName.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbb51723e892a404a87b22018981eb5d, type: 3} + m_Name: example_string_playerName + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: bd90fbafdd38a5f4c8a2d12a493ad471 + _saveGuid: 0 + _value: + _debugLogEnabled: 0 + _saved: 1 + _defaultValue: + _resetOn: 0 + _runtimeValue: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_string_playerName.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_string_playerName.asset.meta new file mode 100644 index 000000000..d98a3f0ba --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_string_playerName.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd90fbafdd38a5f4c8a2d12a493ad471 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector2_inputs.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector2_inputs.asset new file mode 100644 index 000000000..c4fe1653e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector2_inputs.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 33653d5fffc16644bb2d768701efbabf, type: 3} + m_Name: example_vector2_inputs + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 942121ed39c0d7444b86b1d1eba32708 + _saveGuid: 0 + _value: {x: 0, y: 0} + _debugLogEnabled: 0 + _saved: 0 + _defaultValue: {x: 0, y: 0} + _resetOn: 0 + _runtimeValue: {x: 0, y: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector2_inputs.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector2_inputs.asset.meta new file mode 100644 index 000000000..216f29bab --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector2_inputs.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 942121ed39c0d7444b86b1d1eba32708 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector3_player_position.asset b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector3_player_position.asset new file mode 100644 index 000000000..51ed650b6 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector3_player_position.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 32 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1300736a6c75069498acdad864241816, type: 3} + m_Name: example_vector3_player_position + m_EditorClassIdentifier: + TagIndex: 0 + Description: + _guid: 0cc87064c35209041b219350ef5f4fd1 + _saveGuid: 0 + _value: {x: 0, y: 0, z: 0} + _debugLogEnabled: 0 + _saved: 1 + _defaultValue: {x: 0, y: 0, z: 0} + _resetOn: 0 + _runtimeValue: {x: 0, y: 0, z: 0} diff --git a/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector3_player_position.asset.meta b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector3_player_position.asset.meta new file mode 100644 index 000000000..bb25d59c2 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/ScriptableVariables/example_vector3_player_position.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0cc87064c35209041b219350ef5f4fd1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts.meta b/Assets/Obvious/Soap/Examples/Content/Scripts.meta new file mode 100644 index 000000000..1e6bc4dbb --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16543ec6c1dfe3b4caed9b720f094482 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AddRemoveElementToDictionary.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/AddRemoveElementToDictionary.cs new file mode 100644 index 000000000..f582657fe --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AddRemoveElementToDictionary.cs @@ -0,0 +1,38 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/9_scriptabledictionaries")] + [SelectionBase] + [RequireComponent(typeof(Element))] + public class AddRemoveElementToDictionary : MonoBehaviour + { + [SerializeField] private ScriptableDictionaryElementInt _scriptableDictionary = null; + private Element _element; + + private void Start() + { + _element = GetComponent(); + + //Try to add the first element of this type + if (!_scriptableDictionary.TryAdd(_element.ElementType, 1)) + { + //If its already in, just increment the count + _scriptableDictionary[_element.ElementType]++; + } + } + + private void OnDestroy() + { + //Decrement the count of the element + _scriptableDictionary[_element.ElementType]--; + + //If the count is 0, remove the element from the dictionary + if (_scriptableDictionary[_element.ElementType] == 0) + { + _scriptableDictionary.Remove(_element.ElementType); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AddRemoveElementToDictionary.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/AddRemoveElementToDictionary.cs.meta new file mode 100644 index 000000000..d365ea09d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AddRemoveElementToDictionary.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 97b4640ee301c4d4ea574d7a3dfb8650 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AutoDisabler.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoDisabler.cs new file mode 100644 index 000000000..43d2bc057 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoDisabler.cs @@ -0,0 +1,21 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + + + public class AutoDisabler : MonoBehaviour + { + [SerializeField] private float _duration = 0.5f; + + public void OnEnable() + { + Invoke(nameof(Disable),_duration); + } + + private void Disable() + { + gameObject.SetActive(false); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AutoDisabler.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoDisabler.cs.meta new file mode 100644 index 000000000..4e291268a --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoDisabler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3e810beda65faeb40a9ebdc7e0a1eeb9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs new file mode 100644 index 000000000..a0996e15d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + public class AutoRotator : MonoBehaviour + { + [SerializeField] private float _speed = 350f; + + public void Update() + { + transform.localEulerAngles += _speed * Vector3.up * Time.deltaTime; + } + + public void SetRotationSpeed(float value) + { + _speed = value; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs.meta new file mode 100644 index 000000000..8eb2af7e1 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a002038577b91f04ba47737c2c6cd02a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotatorWithSingleton.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotatorWithSingleton.cs new file mode 100644 index 000000000..b4f66a862 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotatorWithSingleton.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + public class AutoRotatorWithSingleton : MonoBehaviour + { + public void Update() + { + transform.localEulerAngles += SoapGameParams.Instance.CoinRotateSpeed * Vector3.up * Time.deltaTime; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotatorWithSingleton.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotatorWithSingleton.cs.meta new file mode 100644 index 000000000..3f7cb034f --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/AutoRotatorWithSingleton.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a1d708df8b59405b8692b667623cd489 +timeCreated: 1746103191 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/CoinCollector.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinCollector.cs new file mode 100644 index 000000000..6bf9d2d52 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinCollector.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + public class CoinCollector : MonoBehaviour + { + [SerializeField] private IntVariable _coinCollected; + + private void OnTriggerEnter(Collider other) + { + if (other.transform.parent.name.Contains("Coin")) + { + _coinCollected.Add(1); + Destroy(other.gameObject); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/CoinCollector.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinCollector.cs.meta new file mode 100644 index 000000000..8b35139ac --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinCollector.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 98f1921ce0b047ccbc1bd1994fb13c93 +timeCreated: 1746103708 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/CoinSpawner.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinSpawner.cs new file mode 100644 index 000000000..1577003e6 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinSpawner.cs @@ -0,0 +1,41 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + public class CoinSpawner : MonoBehaviour + { + [SerializeField] private GameObject _prefab = null; + [SerializeField] private float _radius = 10f; + + private void Start() + { + Spawn(SoapGameParams.Instance.CoinSpawnedAmount); + } + + private void Spawn(int amount) + { + for (int i = 0; i < amount; i++) + { + var spawnInfo = GetRandomPositionAndRotation(); + var obj = Instantiate(_prefab, spawnInfo.position, spawnInfo.rotation, transform); + obj.AddComponent(); + obj.SetActive(true); + } + } + + private (Vector3 position, Quaternion rotation) GetRandomPositionAndRotation() + { + var randomPosition = Random.insideUnitSphere * _radius; + randomPosition.y = 0f; + var spawnPos = transform.position + randomPosition; + var randomRotation = Quaternion.Euler(0, Random.Range(0, 360), 0); + return (spawnPos, randomRotation); + } + + private void OnDrawGizmos() + { + Gizmos.color = Color.red; + Gizmos.DrawWireSphere(transform.position, _radius); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/CoinSpawner.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinSpawner.cs.meta new file mode 100644 index 000000000..7f7c282ca --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/CoinSpawner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9ef6e5b65ad7402f8024f23f702e0de7 +timeCreated: 1746102664 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/DestroyObjectOnTrigger.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/DestroyObjectOnTrigger.cs new file mode 100644 index 000000000..cf07df9aa --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/DestroyObjectOnTrigger.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + public class DestroyObjectOnTrigger : MonoBehaviour + { + private void OnTriggerEnter(Collider other) + { + Destroy(other.gameObject); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/DestroyObjectOnTrigger.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/DestroyObjectOnTrigger.cs.meta new file mode 100644 index 000000000..7728c7f70 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/DestroyObjectOnTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7e1274d4ec307a841a288e92a60ada20 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/Element.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/Element.cs new file mode 100644 index 000000000..c40bea3d1 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/Element.cs @@ -0,0 +1,28 @@ +using TMPro; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/6_scriptableenums")] + [SelectionBase] + public class Element : MonoBehaviour + { + [SerializeField] private ScriptableEnumElement _elementType = null; + public ScriptableEnumElement ElementType => _elementType; + + private void Start() + { + GetComponent().material.color = _elementType.Color; + GetComponentInChildren().text = _elementType.Icon.name; + } + + private void OnCollisionEnter(Collision other) + { + if (other.gameObject.TryGetComponent(out var element)) + { + if (_elementType.Defeats.Contains(element.ElementType)) + Destroy(other.gameObject); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/Element.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/Element.cs.meta new file mode 100644 index 000000000..45c09ab39 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/Element.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 37e08cda6051a0041915da424a98a94e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs new file mode 100644 index 000000000..f91d5ff12 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap.Example +{ + public class Enemy : MonoBehaviour + { + [SerializeField] private UnityEvent _onHitPlayerEvent = null; + + private void OnTriggerEnter(Collider other) + { + if (other.CompareTag("Player")) + _onHitPlayerEvent?.Invoke(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs.meta new file mode 100644 index 000000000..1b64de24d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30ad49a59816cef419f00ca84fc44181 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovement.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovement.cs new file mode 100644 index 000000000..0908b995c --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovement.cs @@ -0,0 +1,55 @@ +using System.Collections; +using UnityEngine; +using UnityEngine.Events; +using Random = UnityEngine.Random; + +namespace Obvious.Soap.Example +{ + public class EnemyMovement : MonoBehaviour + { + [SerializeField] private FloatReference _speed = null; + [SerializeField] private UnityEvent _onStartMoving = null; + [SerializeField] private UnityEvent _onStopMoving = null; + + private IEnumerator Start() //start can be a Coroutine :) + { + while (true) + { + _onStartMoving?.Invoke(); + yield return Cr_MoveTo(FindRandomPositionInRadius(10f)); + _onStopMoving?.Invoke(); + yield return Cr_WaitRandom(); + } + } + + private IEnumerator Cr_WaitRandom() + { + var delay = Random.Range(0.5f, 2f); + yield return new WaitForSeconds(delay); + } + + private Vector3 FindRandomPositionInRadius(float radius) + { + var randomPos = Random.insideUnitSphere * radius; + randomPos.y = 0; + return randomPos; + } + + private IEnumerator Cr_MoveTo(Vector3 destination) + { + var direction = (destination - transform.position).normalized; + + while (!IsAtDestination()) + { + transform.position += direction * _speed * Time.deltaTime; + yield return null; + } + + bool IsAtDestination() + { + var sqrDistance = (destination - transform.position).sqrMagnitude; + return sqrDistance <= 0.5f * 0.5f; + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovement.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovement.cs.meta new file mode 100644 index 000000000..d6bdb25d3 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovement.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 51bcfe43449e44d5a38179065b42c189 +timeCreated: 1652997661 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovementInjected.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovementInjected.cs new file mode 100644 index 000000000..a2c1d5106 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovementInjected.cs @@ -0,0 +1,62 @@ +using System.Collections; +using Obvious.Soap.Attributes; +using UnityEngine; +using UnityEngine.Events; + +namespace Obvious.Soap.Example +{ + public class EnemyMovementInjected : MonoBehaviour + { + [RuntimeInjectable("speed")] + [SerializeField] + private FloatVariable _speed = null; + [SerializeField] private UnityEvent _onStartMoving = null; + [SerializeField] private UnityEvent _onStopMoving = null; + + private void Awake() + { + _speed.Value = 10; //(or whatever dynamic value you want); + } + + private IEnumerator Start() + { + while (true) + { + _onStartMoving?.Invoke(); + yield return Cr_MoveTo(FindRandomPositionInRadius(10f)); + _onStopMoving?.Invoke(); + yield return Cr_WaitRandom(); + } + } + + private IEnumerator Cr_WaitRandom() + { + var delay = Random.Range(0.5f, 2f); + yield return new WaitForSeconds(delay); + } + + private Vector3 FindRandomPositionInRadius(float radius) + { + var randomPos = Random.insideUnitSphere * radius; + randomPos.y = 0; + return randomPos; + } + + private IEnumerator Cr_MoveTo(Vector3 destination) + { + var direction = (destination - transform.position).normalized; + + while (!IsAtDestination()) + { + transform.position += direction * _speed * Time.deltaTime; + yield return null; + } + + bool IsAtDestination() + { + var sqrDistance = (destination - transform.position).sqrMagnitude; + return sqrDistance <= 0.5f * 0.5f; + } + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovementInjected.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovementInjected.cs.meta new file mode 100644 index 000000000..ec19bf481 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/EnemyMovementInjected.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ff3b678bcac6497fbbe09654154142f0 +timeCreated: 1736517559 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/FadeOut.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/FadeOut.cs new file mode 100644 index 000000000..7da89b665 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/FadeOut.cs @@ -0,0 +1,35 @@ +using System.Collections; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [RequireComponent(typeof(CanvasGroup))] + public class FadeOut : CacheComponent + { + [SerializeField] private float _duration = 0.5f; + + private Coroutine _coroutine = null; + + public void Activate() + { + if (_coroutine != null) + StopCoroutine(_coroutine); + + _coroutine = StartCoroutine(Cr_FadeOut()); + } + + private IEnumerator Cr_FadeOut() + { + var timer = 0f; + _component.alpha = 1f; + while (timer <= _duration) + { + _component.alpha = Mathf.Lerp(1f, 0f, timer / _duration); + timer += Time.deltaTime; + yield return null; + } + + _component.alpha = 0; + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/FadeOut.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/FadeOut.cs.meta new file mode 100644 index 000000000..e90e67364 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/FadeOut.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 337737998fed4584bbe81a0f4759926f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/GameManager.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/GameManager.cs new file mode 100644 index 000000000..af693ac74 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/GameManager.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace Obvious.Soap.Example +{ + public class GameManager : MonoBehaviour + { + [SerializeField] private KeyCode _reloadSceneKey = KeyCode.R; + [SerializeField] private KeyCode _deletePlayerPrefs = KeyCode.P; + + void Update() + { + if (Input.GetKeyDown(_reloadSceneKey)) + ReloadScene(); + + if (Input.GetKeyDown(_deletePlayerPrefs)) + PlayerPrefs.DeleteAll(); + + if (Input.GetKeyDown(KeyCode.Escape)) + Application.Quit(); + } + + public void ReloadScene() + { + SceneManager.LoadScene(SceneManager.GetActiveScene().name); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/GameManager.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/GameManager.cs.meta new file mode 100644 index 000000000..61d3d13d9 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/GameManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 00504177c39509d4fa87cec76aaa964d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealVignette.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/HealVignette.cs new file mode 100644 index 000000000..c34d44025 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealVignette.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/4_scriptableevents/registering-to-events-from-code")] + public class HealVignette : MonoBehaviour + { + [SerializeField] private ScriptableEventInt _onPlayerHealedEvent = null; + [SerializeField] private FadeOut _fadeOut = null; + + private void Awake() + { + _onPlayerHealedEvent.OnRaised += OnPlayerHealed; + } + + private void OnDestroy() + { + _onPlayerHealedEvent.OnRaised -= OnPlayerHealed; + } + + private void OnPlayerHealed(int amount) + { + _fadeOut.Activate(); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealVignette.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/HealVignette.cs.meta new file mode 100644 index 000000000..7876b6443 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealVignette.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bb7e17f9d514c644289c4e168d3e8da9 +timeCreated: 1652997661 \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/Health.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/Health.cs new file mode 100644 index 000000000..7e19eaff2 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/Health.cs @@ -0,0 +1,69 @@ +using JetBrains.Annotations; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/1_scriptablevariables")] + public class Health : MonoBehaviour + { + [SerializeField] private FloatVariable _currentHealth = null; + [SerializeField] private FloatReference _maxHealth = null; + + [Header("Scriptable Events")] [SerializeField] private ScriptableEventInt _onPlayerDamaged = null; + [SerializeField] private ScriptableEventInt _onPlayerHealed = null; + [SerializeField] private ScriptableEventNoParam _onPlayerDeath = null; + + private bool _isDead = false; + + private void Start() + { + _currentHealth.Value = _maxHealth.Value; + _currentHealth.OnValueChanged += OnHealthChanged; + } + + private void OnDestroy() + { + _currentHealth.OnValueChanged -= OnHealthChanged; + } + + private void OnHealthChanged(float newValue) + { + var diff = newValue - _currentHealth.PreviousValue; + if (diff < 0) + { + OnDamaged(Mathf.Abs(diff)); + } + else + { + OnHealed(diff); + } + } + + private void OnDamaged(float value) + { + if (_currentHealth <= 0f && !_isDead) + OnDeath(); + else + _onPlayerDamaged.Raise(Mathf.RoundToInt(value)); + } + + private void OnHealed(float value) + { + _onPlayerHealed.Raise(Mathf.RoundToInt(value)); + } + + private void OnDeath() + { + _onPlayerDeath.Raise(); + _isDead = true; + } + + //if you don't want to modify directly the health, you can also do it like this + //Used in the Event example. + [UsedImplicitly] + public void TakeDamage(int amount) + { + _currentHealth.Add(-amount); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/Health.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/Health.cs.meta new file mode 100644 index 000000000..37f64c217 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/Health.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 96975d436de63944ba2d377cc7845e5a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSprite.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSprite.cs new file mode 100644 index 000000000..900d7db4d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSprite.cs @@ -0,0 +1,32 @@ +using Obvious.Soap.Attributes; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/8_runtimevariables")] + public class HealthBarSprite : MonoBehaviour + { + [BeginDisabledGroup] + [SerializeField] private FloatVariable _runtimeHpVariable; + [SerializeField] private Transform _fillTransform = null; + + //The variable is manually injected by another script (RuntimeHealth in this case). + public void Init(FloatVariable runtimeVariable) + { + _runtimeHpVariable = runtimeVariable; + _runtimeHpVariable.OnValueChanged += OnHealthChanged; + } + + private void OnDisable() + { + _runtimeHpVariable.OnValueChanged -= OnHealthChanged; + } + + private void OnHealthChanged(float currentHpValue) + { + var hpRatio = Mathf.Clamp01(currentHpValue / _runtimeHpVariable.Max); + _fillTransform.localPosition = new Vector3((-1 + hpRatio) * 0.5f, 0,0); + _fillTransform.localScale = new Vector3(hpRatio,1,1); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSprite.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSprite.cs.meta new file mode 100644 index 000000000..526d0aed7 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSprite.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 81c01b2d9f5358d44bdda66f4f4b9c75 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSpriteAutoInjection.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSpriteAutoInjection.cs new file mode 100644 index 000000000..26d2a4e75 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSpriteAutoInjection.cs @@ -0,0 +1,33 @@ +using Obvious.Soap.Attributes; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/scene-documentation/8_runtimevariables")] + public class HealthBarSpriteAutoInjection : MonoBehaviour + { + [Tooltip("This field will be injected at runtime")] + [SerializeField] + [RuntimeInjectable("hp")] + private FloatVariable _runtimeHpVariable; + + [SerializeField] private Transform _fillTransform = null; + + public void Awake() + { + _runtimeHpVariable.OnValueChanged += OnHealthChanged; + } + + private void OnDisable() + { + _runtimeHpVariable.OnValueChanged -= OnHealthChanged; + } + + private void OnHealthChanged(float currentHpValue) + { + var hpRatio = Mathf.Clamp01(currentHpValue / _runtimeHpVariable.Max); + _fillTransform.localPosition = new Vector3((-1 + hpRatio) * 0.5f, 0,0); + _fillTransform.localScale = new Vector3(hpRatio,1,1); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSpriteAutoInjection.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSpriteAutoInjection.cs.meta new file mode 100644 index 000000000..1cf5d78b0 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthBarSpriteAutoInjection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18821d4539959a247b5fdca97105afa3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealthPowerUp.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthPowerUp.cs new file mode 100644 index 000000000..24e68458d --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthPowerUp.cs @@ -0,0 +1,16 @@ +using System; +using UnityEngine; + +namespace Obvious.Soap.Example +{ + [HelpURL("https://obvious-game.gitbook.io/soap/soap-core-assets/scriptable-subassets")] + public class HealthPowerUp : MonoBehaviour + { + [SerializeField] private PlayerStats _playerStats; + + private void OnTriggerEnter(Collider other) + { + _playerStats.Health.Add(30); + } + } +} \ No newline at end of file diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HealthPowerUp.cs.meta b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthPowerUp.cs.meta new file mode 100644 index 000000000..f1bfff277 --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HealthPowerUp.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 204416c04adbd6841b8ecbffe130b16b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obvious/Soap/Examples/Content/Scripts/HyperlinkButton.cs b/Assets/Obvious/Soap/Examples/Content/Scripts/HyperlinkButton.cs new file mode 100644 index 000000000..e38cdbe3e --- /dev/null +++ b/Assets/Obvious/Soap/Examples/Content/Scripts/HyperlinkButton.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Obvious.Soap.Example +{ + [RequireComponent(typeof(Button))] + public class HyperlinkButton : CacheComponent