├── .gitattributes ├── .gitignore ├── Components ├── Comment.cs ├── DebugLogOnScreen.cs ├── DisableOnAwake.cs ├── DontDestroyDeleteDuplicates.cs ├── FPSCounter.cs ├── FollowMouseMovement.cs ├── Other Source │ └── ParticleScaler.cs ├── Physics related │ ├── DebugSpeed.cs │ ├── README.MD │ └── SetGravityClamped.cs ├── PlayMaker Extension │ └── DebugFSM │ │ ├── DebugFSM.cs │ │ ├── Editor │ │ └── DebugFSMInspector.cs │ │ └── README.MD ├── README.MD ├── RemoveAtRuntime.cs ├── TextureScrolling.cs └── _Third Party │ ├── GDE │ ├── GDEInit.cs │ └── README.MD │ └── NGUI │ └── UIDragDropItem2D.cs ├── Custom PlayMaker Actions ├── AnimatedVariables Customs │ ├── EaseInt.cs │ └── README.md ├── Animator Customs │ ├── GetRuntimeAnimatorController.cs │ ├── README.MD │ └── SetRuntimeAnimatorController.cs ├── Application Customs │ ├── IsOnPlatformEvent.cs │ └── README.MD ├── Array Customs │ ├── ArrayAddGameObjectIfEnabled.cs │ ├── ArrayAddIfEmpty.cs │ ├── ArrayGetRandomAdvanced.cs │ ├── ArrayIsEmpty.cs │ ├── ArrayOperator.cs │ └── README.MD ├── Array Lists & Hash Table Customs │ ├── ArrayListAddAll.cs │ ├── ArrayListContainsName.cs │ ├── ArrayListGetLength.cs │ ├── ListGameObjectsInsideCollider.cs │ ├── ListGameObjectsInsideCollider2D.cs │ └── README.MD ├── Audio Customs │ ├── Editor │ │ ├── GetAudioClipName.cs │ │ └── README.MD │ ├── GetAudioClipLength.cs │ ├── GetAudioProgress.cs │ ├── IntSwitchAudioClip.cs │ └── README.MD ├── Camera Customs │ ├── Collider2DIsVisible.cs │ ├── ColliderIsVisible.cs │ └── README.MD ├── Color Customs │ ├── CompareColors.cs │ └── README.MD ├── Device Customs │ ├── GetDeviceLinearAcceleration.cs │ ├── GetDeviceRollCustom.cs │ ├── README.MD │ └── SwipeGestureEventAdvanced.cs ├── Enum Customs │ ├── EnumGetRandom.cs │ ├── GetEnumAsArray.cs │ ├── README.MD │ └── RandomWeightedEnum.cs ├── GameObject & UnityObject Customs │ ├── ActivateComponents.cs │ ├── ActivateGameObjects.cs │ ├── ActivateGameObjectsAdvanced.cs │ ├── DestroyChildren.cs │ ├── EnableChildren.cs │ ├── EnableChildrenInRange.cs │ ├── FindChildren.cs │ ├── GameObjectCompareMulti.cs │ ├── GameObjectKeepActive.cs │ ├── GetChildCountAdvanced.cs │ ├── GetChildren.cs │ ├── GetGameObjectSibling.cs │ ├── GetLastChild.cs │ ├── GetMultilevelGameObject.cs │ ├── GetObjectName.cs │ ├── HasSibling.cs │ ├── README.MD │ ├── SetGameObjectIfNotNull.cs │ ├── ToggleComponent.cs │ └── ToggleGameObject.cs ├── Logic Customs │ ├── ConvertIntToLetter.cs │ ├── FloatCompareRange.cs │ ├── IntCompareRange.cs │ ├── IntSignTest.cs │ ├── IntSwitchAdvanced.cs │ └── README.MD ├── Math Customs │ ├── FloatFlip.cs │ ├── GetPercentageInt.cs │ ├── GetUnsignedFloat.cs │ ├── GetUnsignedInt.cs │ ├── IntFlip.cs │ ├── IntRoundToNearest.cs │ └── README.MD ├── Navigation Customs │ ├── FindClosestAgent.cs │ ├── NavMeshAgentGetAreaMask.cs │ ├── NavMeshAgentMoveTo.cs │ ├── NavMeshFindClosestPoint.cs │ └── README.MD ├── Physics & Transform Customs │ ├── EnableCollider.cs │ ├── EnableColliderMulti.cs │ ├── FollowMouse2D.cs │ ├── GetGameObjectScreenPosition.cs │ ├── GetGravity2dScale.cs │ ├── GetPositionAddOffset.cs │ ├── GetRotationAddOffset.cs │ ├── GetScaleAddOffset.cs │ ├── README.MD │ ├── ResetTransforms.cs │ └── SetPositions.cs ├── PlayMakerHelpers.cs ├── Random Customs │ ├── README.MD │ ├── RandomCharacters.cs │ ├── RandomFloatAroundRange.cs │ ├── RandomFloatOnSlope.cs │ ├── RandomIntAroundRange.cs │ ├── RandomPointBetweenGameObjects.cs │ ├── RandomPointOnSlope.cs │ ├── RandomWaitCustom.cs │ ├── RandomWeightedVector3.cs │ ├── SelectRandomAudioClip.cs │ └── SelectRandomObject.cs ├── Sprite customs │ ├── README.MD │ └── SpriteGetName.cs ├── StateMachine Customs │ ├── DisableThisFSM.cs │ ├── Editor │ │ └── SendEventsInspector.cs │ ├── EnableFsms.cs │ ├── GetFsmComponent.cs │ ├── GetGameObjectByFsmVariableValue.cs │ ├── README.MD │ ├── RestartThisFSM.cs │ ├── SendEventRandomDelay.cs │ ├── SendEventSetMulti.cs │ ├── SendEventSetValue.cs │ └── SendEvents.cs ├── String Customs │ ├── BuildStringAutoConvert.cs │ ├── GetStringNumbers.cs │ ├── README.MD │ ├── StringAppend2.cs │ ├── StringCompareSetMulti.cs │ ├── StringContainsSwitch.cs │ ├── StringRemove.cs │ ├── StringRemoveChars.cs │ ├── StringReplaceEachChar.cs │ └── StringSwitchCustom.cs ├── System & Time Customs │ ├── CountupTimer.cs │ ├── Editor │ │ ├── FindAssetByName.cs │ │ └── README.MD │ ├── GetFileExtension.cs │ ├── GetTimeScale.cs │ ├── README.MD │ ├── RandomWaitAroundOffset.cs │ └── SetPropertyAdvanced.cs ├── Vector Customs │ ├── README.MD │ ├── Vector2OperatorAdvanced.cs │ ├── Vector3Compare.cs │ └── Vector3OperatorAdvanced.cs ├── _Templates │ ├── Editor │ │ └── TemplateInspector.cs │ ├── ExampleOverview.cs │ ├── README.MD │ ├── Template.cs │ └── TemplateAdvanced.cs ├── _ThirdParty │ ├── GDE Customs │ │ ├── GDEAddString.cs │ │ ├── GDEBoolFlip.cs │ │ ├── GDEBoolTest.cs │ │ ├── GDECountOccurrences.cs │ │ ├── GDECreateItem.cs │ │ ├── GDEDebugData.cs │ │ ├── GDEFind.cs │ │ ├── GDEFindItemsByValue.cs │ │ ├── GDEFindItemsByValue2.cs │ │ ├── GDEFloatCompare.cs │ │ ├── GDEFloatOperator.cs │ │ ├── GDEGetItemWithMatchingValues.cs │ │ ├── GDEGetSchemaByItem.cs │ │ ├── GDEHasFieldValueChanged.cs │ │ ├── GDEHasItem.cs │ │ ├── GDEHelpers.cs │ │ ├── GDEIntCompare.cs │ │ ├── GDEIntOperator.cs │ │ ├── GDEListMultipleFieldValues.cs │ │ ├── GDERemoveItem.cs │ │ ├── GDERemoveString.cs │ │ ├── GDEResetItem.cs │ │ ├── GDESchemaGetNextItem.cs │ │ ├── GDESwapFieldValues.cs │ │ ├── GDESwapItems.cs │ │ ├── GDEVector2Operator.cs │ │ ├── GDEVector3Operator.cs │ │ ├── GDEVector4Operator.cs │ │ ├── Needs Re-Work │ │ │ ├── Editor │ │ │ │ └── GDECreateItemInspector.cs │ │ │ ├── GDEFindItemByValue.cs │ │ │ ├── GDEGetRandomItem.cs │ │ │ ├── GDELoadAllItemsBySchema.cs │ │ │ ├── GDELoadAllKeysBySchema.cs │ │ │ ├── GDELoadSchemaList.cs │ │ │ └── GDELoadStringListCustom.cs │ │ └── README.MD │ └── NGUI Customs │ │ ├── NguiGetWidgetDetails.cs │ │ ├── NguiLabelSetTextAdvanced.cs │ │ ├── NguiSetSpriteMultiple.cs │ │ ├── NguiSetSpriteSize.cs │ │ ├── NguiSetWidgetAlphaMulti.cs │ │ ├── NguiSetWidgetColor.cs │ │ ├── NguiSetWidgetDetails.cs │ │ ├── NguiSpriteIsVisible.cs │ │ ├── NguiToolsAddChildAdvanced.cs │ │ ├── NguiToolsDestroyMulti.cs │ │ └── README.MD └── uGUI Customs │ ├── DebugVariableOnScreen.cs │ ├── DrawFullscreenColorAdvanced.cs │ └── README.MD ├── Editor Extensions └── Editor │ ├── CurrentSelectionMenu.cs │ ├── CustomAssetImporter.cs │ ├── README.MD │ └── ToolsMenu │ ├── README.MD │ └── ToolsScenesMenu.cs ├── README.MD ├── Screenshots ├── Actions │ ├── ActivateComponents.png │ ├── ActivateGameObjects.png │ ├── ActivateGameObjectsAdvanced.png │ ├── ActivateMultipleComponents.png │ ├── AndroidNativeAudioNonRedundantFile.png │ ├── ArrayAddGameObjectIfEnabled.png │ ├── ArrayAddIfEmpty.png │ ├── ArrayGetRandomAdvanced.png │ ├── ArrayIsEmpty.png │ ├── ArrayListAddAll.png │ ├── ArrayListContainsName.png │ ├── ArrayListGetLength.png │ ├── ArrayOperator.png │ ├── BuildStringAutoConvert.png │ ├── CompareColors.png │ ├── ConvertIntToLetter.png │ ├── CountupTimer.png │ ├── DebugVariableOnScreen.png │ ├── DestroyChildren.png │ ├── DisableThisFSM.png │ ├── DrawFullscreenColorAdvanced.png │ ├── EaseInt.png │ ├── EnableChildren.png │ ├── EnableChildrenInRange.png │ ├── EnableCollider.png │ ├── EnableColliderMulti.png │ ├── EnableFsms.png │ ├── EnumGetRandom.png │ ├── ExampleOverview.png │ ├── FindAssetByName.png │ ├── FindChildren.png │ ├── FindClosestAgent.png │ ├── FloatCompareRange.png │ ├── FloatFlip.png │ ├── FollowMouse2D.png │ ├── GDEAddString.png │ ├── GDEBoolFlip.png │ ├── GDEBoolTest.png │ ├── GDECountOccurrences.png │ ├── GDECreateItem.png │ ├── GDEFind.png │ ├── GDEFindItemByValue.png │ ├── GDEFindItemsByValue.png │ ├── GDEFindItemsByValue2.png │ ├── GDEFloatOperator.png │ ├── GDEGetRandomItem.png │ ├── GDEGetSchemaByItem.png │ ├── GDEHasFieldValueChanged.png │ ├── GDEHasItem.png │ ├── GDEIntOperator.png │ ├── GDELoadAllItemsBySchema.png │ ├── GDELoadAllKeysBySchema.png │ ├── GDELoadSchemaList.png │ ├── GDELoadStringListCustom.png │ ├── GDERemoveItem.png │ ├── GDERemoveString.png │ ├── GDESwapFieldValues.png │ ├── GDESwapItems.png │ ├── GDEVector2Operator.png │ ├── GDEVector3Operator.png │ ├── GDEVector4Operator.png │ ├── GOCompareMulti.png │ ├── GameObjectCompareMulti.png │ ├── GameObjectIsVisibleAlternative.png │ ├── GameObjectIsVisibleAlternative2D.png │ ├── GameObjectKeepActive.png │ ├── GetAudioClipLength.png │ ├── GetAudioClipName.png │ ├── GetAudioProgress.png │ ├── GetChildCountAdvanced.png │ ├── GetChildren.png │ ├── GetDeviceLinearAcceleration.png │ ├── GetDeviceRollCustom.png │ ├── GetEnumAsArray.png │ ├── GetFileExtension.png │ ├── GetFsmComponent.png │ ├── GetGameObjectByFsmVariableValue.png │ ├── GetGameObjectScreenPosition.png │ ├── GetGameObjectSibling.png │ ├── GetGravity2dScale.png │ ├── GetLastChild.png │ ├── GetMultilevelGameObject.png │ ├── GetObjectName.png │ ├── GetPercentageInt.png │ ├── GetPositionAddOffset.png │ ├── GetRotationAddOffset.png │ ├── GetRuntimeAnimatorController.png │ ├── GetScaleAddOffset.png │ ├── GetStringNumbers.png │ ├── GetTimeScale.png │ ├── GetUnsignedFloat.png │ ├── GetUnsignedInt.png │ ├── HasSibling.png │ ├── IntCompareRange.png │ ├── IntFlip.png │ ├── IntRoundToNearest.png │ ├── IntSignTest.png │ ├── IntSwitchAdvanced.png │ ├── IntSwitchAudioClip.png │ ├── IsOnPlatformEvent.png │ ├── ListGameObjectsInsideCollider.png │ ├── ListGameObjectsInsideCollider2D.png │ ├── NavMeshAgentGetAcceleration.png │ ├── NavMeshAgentGetAngularSpeed.png │ ├── NavMeshAgentGetAreaMask.png │ ├── NavMeshAgentGetAutoBraking.png │ ├── NavMeshAgentGetAutoRepath.png │ ├── NavMeshAgentGetAutoTraverseOffMeshLink.png │ ├── NavMeshAgentGetAvoidancePriority.png │ ├── NavMeshAgentGetBaseOffset.png │ ├── NavMeshAgentGetHeight.png │ ├── NavMeshAgentGetNextPosition.png │ ├── NavMeshAgentGetPathEndPosition.png │ ├── NavMeshAgentGetPathStatus.png │ ├── NavMeshAgentGetRemainingDistance.png │ ├── NavMeshAgentGetSpeed.png │ ├── NavMeshAgentGetStoppingDistance.png │ ├── NavMeshAgentGetVelocity.png │ ├── NavMeshAgentHasPath.png │ ├── NavMeshAgentIsOnNavMesh.png │ ├── NavMeshAgentIsOnOffMeshLink.png │ ├── NavMeshAgentIsPathPending.png │ ├── NavMeshAgentMoveTo.png │ ├── NavMeshAgentPause.png │ ├── NavMeshAgentResetPath.png │ ├── NavMeshAgentResume.png │ ├── NavMeshAgentSetAcceleration.png │ ├── NavMeshAgentSetAngularSpeed.png │ ├── NavMeshAgentSetAutoBraking.png │ ├── NavMeshAgentSetAutoRepath.png │ ├── NavMeshAgentSetAutoTraverseOffMeshLink.png │ ├── NavMeshAgentSetAvoidancePriority.png │ ├── NavMeshAgentSetBaseOffset.png │ ├── NavMeshAgentSetHeight.png │ ├── NavMeshAgentSetSpeed.png │ ├── NavMeshAgentSetVelocity.png │ ├── NavMeshAgentWarp.png │ ├── NavMeshFindClosestPoint.png │ ├── NguiGetWidgetDetails.png │ ├── NguiLabelSetTextAdvanced.png │ ├── NguiSetSpriteMultiple.png │ ├── NguiSetSpriteSize.png │ ├── NguiSetWidgetAlphaMulti.png │ ├── NguiSetWidgetColor.png │ ├── NguiSetWidgetDetails.png │ ├── NguiSpriteIsVisible.png │ ├── NguiToolsAddChildAdvanced.png │ ├── NguiToolsDestroyMulti.png │ ├── RandomCharacters.png │ ├── RandomFloatAroundRange.png │ ├── RandomFloatOnSlope.png │ ├── RandomIntAroundRange.png │ ├── RandomPointBetweenGameObjects.png │ ├── RandomPointOnSlope.png │ ├── RandomWaitAroundOffset.png │ ├── RandomWaitCustom.png │ ├── RandomWeightedEnum.png │ ├── RandomWeightedVector3.png │ ├── ResetTransforms.png │ ├── RestartThisFSM.png │ ├── SelectRandomAudioClip.png │ ├── SelectRandomObject.png │ ├── SendEventMulti.png │ ├── SendEventRandomDelay.png │ ├── SendEventSetMulti.png │ ├── SendEventSetValue.png │ ├── SendEvents.png │ ├── SendRandomEvent.png │ ├── SetGameObjectIfNotNull.png │ ├── SetPositions.png │ ├── SetPropertyAdvanced.png │ ├── SetRuntimeAnimatorController.png │ ├── SpriteGetName.png │ ├── StringAppend.png │ ├── StringCompareSetMulti.png │ ├── StringContainsSwitch.png │ ├── StringRemove.png │ ├── StringRemoveChars.png │ ├── StringReplaceEachChar.png │ ├── StringSwitchCustom.png │ ├── SwipeGestureEventAdvanced.png │ ├── Template.png │ ├── TemplateAdvanced.png │ ├── ToggleComponent.png │ ├── ToggleGameObject.png │ ├── Vector2OperatorAdvanced.png │ ├── Vector3Compare.png │ └── Vector3OperatorAdvanced.png ├── Components │ ├── Comment.png │ ├── DebugFSM.png │ ├── DebugSpeed.png │ ├── DisableOnAwake.png │ ├── DontDestroyDeleteDuplicates.png │ ├── FPSCounter.png │ ├── FollowMouseMovement.png │ ├── GDEInit.png │ ├── NGUIEffects1.png │ ├── RemoveAtRuntime.png │ ├── SendEventToFSM.png │ ├── SendEventToFSM2.png │ ├── SendEventToFSMAdvanced.png │ ├── SendEventToFSMAdvanced_OLD.png │ ├── SetGravityClamped.png │ ├── SetNGUILabel.png │ └── TextureScrolling.png └── Editor │ ├── CurrentSelectionMenu.png │ └── ToolsScenesMenu.png ├── _config.yml └── index.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **.meta 2 | **.cs~ 3 | .idea -------------------------------------------------------------------------------- /Components/Comment.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | public class Comment : MonoBehaviour { 5 | 6 | //the main comment 7 | public string text; 8 | 9 | public bool displayOnScreen = false; 10 | public Color textColor = Color.cyan; 11 | public Vector2 offset; 12 | 13 | public bool debug = false; 14 | public bool removeAtRuntime = false; 15 | 16 | void OnGUI() { 17 | if (displayOnScreen) 18 | { 19 | GUI.color = textColor; 20 | Vector2 ownerPos = Camera.main.WorldToScreenPoint(transform.position); 21 | ownerPos.y = Screen.height - ownerPos.y; 22 | var textSize = GUI.skin.label.CalcSize(new GUIContent(text)); 23 | GUI.Label(new Rect(ownerPos.x + offset.x, ownerPos.y - offset.y, textSize.x, textSize.y), text); 24 | } 25 | } 26 | 27 | void Start () 28 | { 29 | if (debug) Debug.Log(text); 30 | if (removeAtRuntime) Destroy(this); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Components/DisableOnAwake.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Disables every GameObject tagged as "RemoveAtRuntime" (tag has to be created if it doesn't exist) 5 | /// 6 | public class DisableOnAwake : MonoBehaviour 7 | { 8 | void Awake() 9 | { 10 | GameObject[] allTaggedGOs = GameObject.FindGameObjectsWithTag("RemoveAtRuntime"); 11 | 12 | if(allTaggedGOs.Length == 0) 13 | { 14 | return; 15 | } 16 | 17 | foreach(GameObject go in allTaggedGOs) 18 | { 19 | if(go != null) 20 | { 21 | go.SetActive(false); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Components/DontDestroyDeleteDuplicates.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Sets the GameObject this component is attached to to not be destroyed 5 | /// on scene load and removes duplicates when re-visiting scenes. 6 | /// 7 | public class DontDestroyDeleteDuplicates : MonoBehaviour 8 | { 9 | private void Awake() 10 | { 11 | if (GameObject.Find(gameObject.name) 12 | && GameObject.Find(gameObject.name) != this.gameObject) 13 | { 14 | Destroy(GameObject.Find(gameObject.name)); 15 | } 16 | } 17 | 18 | private void Start() 19 | { 20 | DontDestroyOnLoad(gameObject); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Components/FPSCounter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | public class FPSCounter : MonoBehaviour 6 | { 7 | public Color _color = new Color32(1, 35, 56, 255); 8 | public Vector2 _position = new Vector2(17, 11); 9 | public Vector2 _size = new Vector2(100, 20); 10 | 11 | const float fpsMeasurePeriod = 0.5f; 12 | private int m_FpsAccumulator = 0; 13 | private float m_FpsNextPeriod = 0; 14 | private int m_CurrentFps; 15 | const string display = "{0} FPS"; 16 | private string fps = ""; 17 | 18 | void OnGUI() 19 | { 20 | GUI.color = _color; 21 | GUI.Label(new Rect(_position.x, _position.y, _size.x, _size.y), fps); 22 | } 23 | 24 | private void Start() 25 | { 26 | m_FpsNextPeriod = Time.realtimeSinceStartup + fpsMeasurePeriod; 27 | } 28 | 29 | 30 | void Update() 31 | { 32 | // measure average frames per second 33 | m_FpsAccumulator++; 34 | if(Time.realtimeSinceStartup > m_FpsNextPeriod) 35 | { 36 | m_CurrentFps = (int)(m_FpsAccumulator / fpsMeasurePeriod); 37 | m_FpsAccumulator = 0; 38 | m_FpsNextPeriod += fpsMeasurePeriod; 39 | fps = string.Format(display, m_CurrentFps); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Components/FollowMouseMovement.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// When enabled, the GameObject this script is attached to follows the movement of the mouse-/touch-position in 2D space. 5 | /// 6 | public class FollowMouseMovement : MonoBehaviour { 7 | 8 | [Tooltip("If not set, uses the GameObject tagged 'MainCamera'. When using custom GUI systems like NGUI, you should insert its own camera.")] 9 | public Camera cam; 10 | [Tooltip("How much delay between the current mouse position and the position of the GameObject should be added. " + 11 | "The higher the value, the closer the GameObject follows the mouse position.")] 12 | [Range(0.01f, 1f)] 13 | public float smoothing = 1f; 14 | [Tooltip("Whether to use the world or local space of the GameObject.")] 15 | public bool worldSpace = true; 16 | [Tooltip("if set, disable this component immediately to manually activate it at a later point.")] 17 | public bool startDisabled = true; 18 | 19 | void Awake() 20 | { 21 | if(startDisabled) enabled = false; 22 | } 23 | 24 | void Start() 25 | { 26 | if(cam == null) cam = Camera.main; 27 | } 28 | 29 | void Update() 30 | { 31 | if (cam == null) 32 | { 33 | Debug.LogError("No camera set in FollowMouseMovement on " + name); 34 | return; 35 | } 36 | 37 | Vector3 currPos = worldSpace ? gameObject.transform.position : transform.localPosition; 38 | Vector3 result = Vector3.Lerp(currPos, cam.ScreenToWorldPoint(Input.mousePosition), smoothing); 39 | 40 | if (worldSpace) gameObject.transform.position = result; 41 | else gameObject.transform.localPosition = result; 42 | } 43 | } -------------------------------------------------------------------------------- /Components/Physics related/README.MD: -------------------------------------------------------------------------------- 1 | ## DebugSpeed.cs 2 | ![Image](/Screenshots/Components/DebugSpeed.png) 3 | 4 | - Shows valuable information of the current GameObject on screen like Acceleration, Velocity, and modifications of them (the square Magnitude and them normalized) 5 | 6 | ## SetGravityClamped.cs 7 | ![Image](/Screenshots/Components/SetGravityClamped.png) 8 | 9 | - Adds a downward force to the GameObject, optionally change the Force Mode and clamp the max velocity -------------------------------------------------------------------------------- /Components/Physics related/SetGravityClamped.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [RequireComponent(typeof(Rigidbody))] 4 | public class SetGravityClamped : MonoBehaviour 5 | { 6 | 7 | public float maxVelocity = 10; 8 | public ForceMode forceMode = ForceMode.Acceleration; 9 | 10 | private Rigidbody ownRigidbody; 11 | 12 | void Start() 13 | { 14 | ownRigidbody = this.gameObject.GetComponent(); 15 | } 16 | 17 | // Update is called once per frame 18 | void FixedUpdate() 19 | { 20 | if (ownRigidbody.velocity.sqrMagnitude < maxVelocity) 21 | { 22 | ownRigidbody.AddForce(Physics.gravity, forceMode); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Components/PlayMaker Extension/DebugFSM/Editor/DebugFSMInspector.cs: -------------------------------------------------------------------------------- 1 |  2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | [CanEditMultipleObjects] 6 | [CustomEditor(typeof(DebugFSM))] 7 | public class DebugFSMInspector : Editor 8 | { 9 | private static GUIStyle ToggleButtonStyleNormal = null; 10 | private static GUIStyle ToggleButtonStyleToggled = null; 11 | 12 | public override void OnInspectorGUI() 13 | { 14 | DebugFSM script = (DebugFSM)this.target; 15 | 16 | ToggleButtonStyleNormal = "Button"; 17 | ToggleButtonStyleToggled = new GUIStyle(ToggleButtonStyleNormal); 18 | ToggleButtonStyleToggled.normal.background = ToggleButtonStyleToggled.active.background; 19 | 20 | GUILayout.BeginHorizontal(); 21 | if(GUILayout.Button("States", script.debugStateNames ? ToggleButtonStyleToggled : ToggleButtonStyleNormal)) 22 | { 23 | script.debugStateNames = true; 24 | script.debugVariables = false; 25 | } 26 | 27 | if(GUILayout.Button("Variables", script.debugVariables ? ToggleButtonStyleToggled : ToggleButtonStyleNormal)) 28 | { 29 | script.debugStateNames = false; 30 | script.debugVariables = true; 31 | } 32 | GUILayout.EndHorizontal(); 33 | 34 | if(script.debugStateNames) 35 | { 36 | //limit traceBackAmount to always be above 0 37 | if(script.traceBackAmount < 0) 38 | { 39 | script.traceBackAmount = 0; 40 | } 41 | script.traceBackAmount = EditorGUILayout.IntField("Trace-Back Amount", script.traceBackAmount); 42 | } else if(script.debugVariables) 43 | { 44 | script.startFrom = EditorGUILayout.IntField("Start From Variable #", script.startFrom); 45 | } 46 | 47 | EditorGUILayout.Separator(); 48 | EditorGUILayout.Separator(); 49 | 50 | base.DrawDefaultInspector(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Components/PlayMaker Extension/DebugFSM/README.MD: -------------------------------------------------------------------------------- 1 | ## DebugFSM.cs 2 | ![Image](/Screenshots/Components/DebugFSM_Info.png) 3 | 4 | Useful for debugging FSM related information at runtime. 5 | 6 | Divided into two separate modes: 7 | States - Shows the active state and as many of the previous states as selected. Also show, how long it was in the previous state. 8 | Variables - Displays all available variables and their live-action values 9 | 10 | Most options change how and where the information is displayed. 11 | It's also possible to debug both modes on the same GameObject by using this component twice. -------------------------------------------------------------------------------- /Components/RemoveAtRuntime.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Removes the GameObject this is attached to immediately 5 | /// on scene load without letting it execute anything. 6 | /// Useful to remove GOs that are used for debugging at 7 | /// runtime or in build. 8 | /// Optionally remove all GOs which name contains "OBSOLETE" 9 | /// (best to only use one of this component per scene or on 10 | /// a GameObject that's persistent throughout all scenes). 11 | /// 12 | public class RemoveAtRuntime : MonoBehaviour 13 | { 14 | public bool removeOBSOLETE = false; 15 | 16 | void Awake() 17 | { 18 | if(!removeOBSOLETE) 19 | { 20 | Destroy(this.gameObject); 21 | } else 22 | { 23 | foreach(var currentGO in GameObject.FindObjectsOfType(typeof(GameObject))) 24 | { 25 | if(currentGO.name.Contains("OBSOLETE")) 26 | { 27 | Destroy(currentGO); 28 | } 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Components/TextureScrolling.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | [RequireComponent(typeof(Renderer))] 3 | public class TextureScrolling : MonoBehaviour 4 | { 5 | 6 | public enum UpdateType 7 | { 8 | Update, 9 | LateUpdate, 10 | FixedUpdate 11 | } 12 | 13 | public float scrollSpeed = 0.5f; 14 | public bool horizontal = true; 15 | public bool vertical = false; 16 | public UpdateType updateType = UpdateType.Update; 17 | public bool ignoreTimeScale = true; 18 | 19 | private Renderer _renderer; 20 | private float scrollUpdate; 21 | private Vector2 currentOffset; 22 | private float usedTime; 23 | 24 | void Start() 25 | { 26 | _renderer = GetComponent(); 27 | } 28 | 29 | void Update() 30 | { 31 | if(updateType == UpdateType.Update) 32 | { 33 | DoScroll(); 34 | } 35 | } 36 | 37 | void LateUpdate() 38 | { 39 | if(updateType == UpdateType.LateUpdate) 40 | { 41 | DoScroll(); 42 | } 43 | } 44 | 45 | void FixedUpdate() 46 | { 47 | if(updateType == UpdateType.FixedUpdate) 48 | { 49 | DoScroll(); 50 | } 51 | } 52 | 53 | public void DoScroll() 54 | { 55 | if(ignoreTimeScale) 56 | { 57 | if(Time.inFixedTimeStep) 58 | { 59 | usedTime = Time.fixedUnscaledTime; 60 | } else 61 | { 62 | usedTime = Time.unscaledTime; 63 | } 64 | } else 65 | { 66 | usedTime = Time.time; 67 | } 68 | 69 | scrollUpdate = usedTime * scrollSpeed; 70 | 71 | if(horizontal == true && vertical == false) 72 | { 73 | currentOffset = new Vector2(scrollUpdate, 0); 74 | } else if(horizontal == true && vertical == true) 75 | { 76 | currentOffset = new Vector2(scrollUpdate, scrollUpdate); 77 | } else if(horizontal == false && vertical == true) 78 | { 79 | currentOffset = new Vector2(0, scrollUpdate); 80 | } else if(horizontal == false && vertical == false) 81 | { 82 | currentOffset = new Vector2(0, 0); 83 | } 84 | 85 | var allMaterials = _renderer.materials; 86 | foreach(var currentMaterial in allMaterials) 87 | { 88 | currentMaterial.mainTextureOffset = currentOffset; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Components/_Third Party/GDE/GDEInit.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using GameDataEditor; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | public class GDEInit : MonoBehaviour 7 | { 8 | public string GDEDataFileName; 9 | 10 | public bool Encrypted; 11 | 12 | void Reset() 13 | { 14 | GDEDataFileName = null; 15 | } 16 | 17 | void Awake() 18 | { 19 | try 20 | { 21 | if (!GDEDataManager.Init(GDEDataFileName, Encrypted)) 22 | UnityEngine.Debug.LogError(GDMConstants.ErrorNotInitialized + " " + GDEDataFileName); 23 | } 24 | catch(UnityException ex) 25 | { 26 | UnityEngine.Debug.LogError(ex.ToString()); 27 | } 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Components/_Third Party/GDE/README.MD: -------------------------------------------------------------------------------- 1 | ## GDEInit.cs 2 | ![Image](/Screenshots/Components/GDEInit.png) 3 | 4 | Initializes the GDEItemManager on Awake(). Best kept on a persistent GameObject in your first scene. -------------------------------------------------------------------------------- /Custom PlayMaker Actions/AnimatedVariables Customs/README.md: -------------------------------------------------------------------------------- 1 | ## EaseInt.cs 2 | ![Image](/Screenshots/Actions/EaseInt.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Animator Customs/GetRuntimeAnimatorController.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Animator)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Get the runtimeAnimatorController of an Animator Component.")] 12 | public class GetRuntimeAnimatorController : FsmStateAction 13 | { 14 | [RequiredField] 15 | [CheckForComponent(typeof(Animator))] 16 | [Tooltip("The target. An Animator component is required")] 17 | public FsmOwnerDefault gameObject; 18 | 19 | [RequiredField] 20 | [UIHint(UIHint.Variable)] 21 | [ObjectType(typeof(RuntimeAnimatorController))] 22 | [Tooltip("The current controller of the specified Animator.")] 23 | public FsmObject getController; 24 | 25 | [Tooltip("Repeat every frame. Useful when using normalizedTime to manually control the animation.")] 26 | public bool everyFrame; 27 | 28 | Animator _animator; 29 | 30 | public override void Reset() 31 | { 32 | gameObject = null; 33 | getController = null; 34 | everyFrame = false; 35 | } 36 | 37 | public override void OnEnter() 38 | { 39 | // get the animator component 40 | var go = Fsm.GetOwnerDefaultTarget(gameObject); 41 | 42 | if(go == null) 43 | { 44 | Finish(); 45 | return; 46 | } 47 | 48 | _animator = go.GetComponent(); 49 | 50 | DoAnimatorPlay(); 51 | if(!everyFrame) 52 | { 53 | Finish(); 54 | } 55 | } 56 | 57 | public override void OnUpdate() 58 | { 59 | DoAnimatorPlay(); 60 | } 61 | 62 | void DoAnimatorPlay() 63 | { 64 | if(_animator != null) 65 | { 66 | getController.Value = _animator.runtimeAnimatorController; 67 | 68 | if(getController.Value == null) 69 | { 70 | LogWarning("Animator " + _animator.name + " doesn't have a runtimeAnimatorController!"); 71 | } 72 | } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Animator Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## GetRuntimeAnimatorController.cs 2 | ![Image](/Screenshots/Actions/GetRuntimeAnimatorController.png) 3 | 4 | ## SetRuntimeAnimatorController.cs 5 | ![Image](/Screenshots/Actions/SetRuntimeAnimatorController.png) 6 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Application Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## IsOnPlatformEvent.cs 2 | ![Image](/Screenshots/Actions/IsOnPlatformEvent.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Customs/ArrayAddIfEmpty.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(ActionCategory.Array)] 9 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 10 | [Tooltip("Add an item to the end of an Array if it's null or empty. Optionally reverse the check.")] 11 | public class ArrayAddIfEmpty : FsmStateAction 12 | { 13 | [RequiredField] 14 | [UIHint(UIHint.Variable)] 15 | [Tooltip("The Array Variable to use.")] 16 | public FsmArray array; 17 | 18 | [RequiredField] 19 | [MatchElementType("array")] 20 | [Tooltip("Item to add.")] 21 | public FsmVar value; 22 | 23 | [Tooltip("Adds if empty, otherwise if not empty.")] 24 | public FsmBool ifEmpty; 25 | 26 | public override void Reset() 27 | { 28 | array = null; 29 | value = null; 30 | ifEmpty = true; 31 | } 32 | 33 | public override void OnEnter() 34 | { 35 | if(ifEmpty.Value) 36 | { 37 | if(value.IsNone && value.GetValue() == null) DoAddValue(); 38 | } else 39 | { 40 | if(!value.IsNone && value.GetValue() != null) DoAddValue(); 41 | } 42 | 43 | Finish(); 44 | } 45 | 46 | private void DoAddValue() 47 | { 48 | //incorporate the check for empty or not empty if the value is of type string 49 | if(value.Type == VariableType.String) 50 | { 51 | if(ifEmpty.Value) 52 | { 53 | if(!string.IsNullOrEmpty(value.stringValue)) return; 54 | } else 55 | { 56 | if(string.IsNullOrEmpty(value.stringValue)) return; 57 | } 58 | } 59 | 60 | array.Resize(array.Length + 1); 61 | value.UpdateValue(); 62 | array.Set(array.Length - 1, value.GetValue()); 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Customs/ArrayGetRandomAdvanced.cs: -------------------------------------------------------------------------------- 1 | // (c) Copyright HutongGames, LLC 2010-2013. All rights reserved. 2 | //License: Attribution 4.0 International (CC BY 4.0) 3 | //Author: Deek 4 | 5 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 6 | 7 | using UnityEngine; 8 | 9 | namespace HutongGames.PlayMaker.Actions 10 | { 11 | [ActionCategory(ActionCategory.Array)] 12 | [Tooltip("Get a Random item from an Array. Optionally disallow to get the same result twice in a row.")] 13 | public class ArrayGetRandomAdvanced : FsmStateAction 14 | { 15 | [RequiredField] 16 | [UIHint(UIHint.Variable)] 17 | [Tooltip("The Array to use.")] 18 | public FsmArray array; 19 | 20 | [RequiredField] 21 | [UIHint(UIHint.Variable)] 22 | [Tooltip("Store the value in a variable.")] 23 | [MatchElementType("array")] 24 | public FsmVar storeValue; 25 | 26 | [Tooltip("Can return the same item twice in a row.")] 27 | public FsmBool repeat; 28 | 29 | [Tooltip("Repeat every frame while the state is active.")] 30 | public bool everyFrame; 31 | 32 | int prevItem; 33 | 34 | public override void Reset() 35 | { 36 | array = null; 37 | storeValue = null; 38 | repeat = false; 39 | everyFrame = false; 40 | } 41 | 42 | // Code that runs on entering the state. 43 | public override void OnEnter() 44 | { 45 | DoGetRandomValue(); 46 | 47 | if(!everyFrame) Finish(); 48 | 49 | } 50 | 51 | public override void OnUpdate() 52 | { 53 | DoGetRandomValue(); 54 | 55 | } 56 | 57 | private void DoGetRandomValue() 58 | { 59 | if(storeValue.IsNone) return; 60 | 61 | int currItem = Random.Range(0, array.Length); 62 | 63 | if(!repeat.Value) 64 | { 65 | while(currItem == prevItem) 66 | { 67 | currItem = Random.Range(0, array.Length); 68 | } 69 | } 70 | 71 | storeValue.SetValue(array.Get(currItem)); 72 | prevItem = currItem; 73 | } 74 | 75 | 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Customs/ArrayIsEmpty.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(ActionCategory.Array)] 9 | [Tooltip("Send an event based on the length of an array.")] 10 | public class ArrayIsEmpty : FsmStateAction 11 | { 12 | [UIHint(UIHint.Variable)] 13 | [Tooltip("The Array Variable.")] 14 | public FsmArray array; 15 | 16 | [Tooltip("Event to send if the array is empty.")] 17 | public FsmEvent isEmpty; 18 | 19 | [Tooltip("Event to send if the array not is empty.")] 20 | public FsmEvent isNotEmpty; 21 | 22 | public override void Reset() 23 | { 24 | array = null; 25 | } 26 | 27 | public override void OnEnter() 28 | { 29 | Fsm.Event(array.Length == 0 ? isEmpty : isNotEmpty); 30 | Finish(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## ArrayAddGameObjectIfEnabled.cs 2 | ![Image](/Screenshots/Actions/ArrayAddGameObjectIfEnabled.png) 3 | 4 | ## ArrayAddIfEmpty.cs 5 | ![Image](/Screenshots/Actions/ArrayAddIfEmpty.png) 6 | 7 | ## ArrayGetRandomAdvanced.cs 8 | ![Image](/Screenshots/Actions/ArrayGetRandomAdvanced.png) 9 | 10 | ## ArrayIsEmpty.cs 11 | ![Image](/Screenshots/Actions/ArrayIsEmpty.png) 12 | 13 | ## ArrayOperator.cs 14 | ![Image](/Screenshots/Actions/ArrayOperator.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Lists & Hash Table Customs/ArrayListAddAll.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory("ArrayMaker/ArrayList")] 10 | [Tooltip("Add all items from an FsmArray to a PlayMaker Array List Proxy component")] 11 | public class ArrayListAddAll : ArrayListActions 12 | { 13 | [RequiredField] 14 | [UIHint(UIHint.Variable)] 15 | [Tooltip("The FsmArray to add to the ArrayList proxy.")] 16 | public FsmArray array; 17 | 18 | [RequiredField] 19 | [Tooltip("The gameObject with the PlayMaker ArrayList Proxy component")] 20 | [CheckForComponent(typeof(PlayMakerArrayListProxy))] 21 | public FsmOwnerDefault gameObject; 22 | 23 | [Tooltip("Author defined Reference of the PlayMaker ArrayList Proxy component (necessary if several component coexists on the same GameObject)")] 24 | [UIHint(UIHint.FsmString)] 25 | public FsmString reference; 26 | 27 | public FsmEvent successEvent; 28 | public FsmEvent failureEvent; 29 | 30 | public override void Reset() 31 | { 32 | array = null; 33 | gameObject = null; 34 | reference = null; 35 | successEvent = null; 36 | failureEvent = null; 37 | } 38 | 39 | public override void OnEnter() 40 | { 41 | if(!SetUpArrayListProxyPointer(Fsm.GetOwnerDefaultTarget(gameObject), reference.Value)) 42 | { 43 | Debug.LogWarning("Couldn't find the Array List Proxy Component!"); 44 | Fsm.Event(failureEvent); 45 | Finish(); 46 | } 47 | 48 | proxy.AddRange(array.Values, array.ObjectTypeName); 49 | 50 | Fsm.Event(successEvent); 51 | Finish(); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Lists & Hash Table Customs/ArrayListGetLength.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory("ArrayMaker/ArrayList")] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Returns the length of the specified Array List Proxy Component.")] 12 | public class ArrayListGetLength : ArrayListActions 13 | { 14 | [ActionSection("Set up")] 15 | 16 | [RequiredField] 17 | [Tooltip("The gameObject with the PlayMaker ArrayList Proxy component")] 18 | [CheckForComponent(typeof(PlayMakerArrayListProxy))] 19 | public FsmOwnerDefault gameObject; 20 | 21 | [Tooltip("Author defined Reference of the PlayMaker ArrayList Proxy component ( necessary if several component coexists on the same GameObject")] 22 | public FsmString reference; 23 | 24 | [ActionSection("Result")] 25 | 26 | [RequiredField] 27 | [UIHint(UIHint.Variable)] 28 | public FsmInt length; 29 | 30 | [Tooltip("Subtract 1 from the length to get the index of the last element. Otherwise you get the actual length of the ArrayList wich can lead to IndexOutOfRange Exceptions.")] 31 | public bool subtract1; 32 | 33 | public override void Reset() 34 | { 35 | gameObject = null; 36 | reference = null; 37 | length = null; 38 | subtract1 = true; 39 | } 40 | 41 | public override void OnEnter() 42 | { 43 | 44 | if(!SetUpArrayListProxyPointer(Fsm.GetOwnerDefaultTarget(gameObject), reference.Value)) 45 | { 46 | Debug.LogWarning("Couldn't find the Array List Proxy Component!"); 47 | Finish(); 48 | } 49 | 50 | length.Value = proxy.arrayList.Count; 51 | 52 | if(subtract1) length.Value -= 1; 53 | 54 | Finish(); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Array Lists & Hash Table Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## ArrayListContainsName.cs 2 | ![Image](/Screenshots/Actions/ArrayListContainsName.png) 3 | 4 | ## ArrayListGetLength.cs 5 | ![Image](/Screenshots/Actions/ArrayListGetLength.png) 6 | 7 | ## ListGameObjectsInsideCollider.cs 8 | ![Image](/Screenshots/Actions/ListGameObjectsInsideCollider.png) 9 | 10 | ## ListGameObjectsInsideCollider2D.cs 11 | ![Image](/Screenshots/Actions/ListGameObjectsInsideCollider2D.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Audio Customs/Editor/GetAudioClipName.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.IO; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using System; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Audio)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Returns the Name of the provided AudioClip. Optionally includes the extension.")] 12 | public class GetAudioClipName : FsmStateAction 13 | { 14 | [ObjectType(typeof(AudioClip))] 15 | [Tooltip("The AudioClip to get the name of.")] 16 | public FsmObject audioClip; 17 | 18 | [Tooltip("The retrieved String-Variable.")] 19 | public FsmString audioClipName; 20 | 21 | [Tooltip("If it should include the file extension. (e.g. foo.wav instead of foo)")] 22 | public bool includeFileExtension; 23 | 24 | [Tooltip("Required for the extension: Set the path the file is at, starting after Assets (/Some/File/At/foo.extension). Otherwise uses 'AssetDatabase', wich doesn't work outside of the Editor (not in any build nor on any platform)")] 25 | public FsmString atPath; 26 | 27 | public override void Reset() 28 | { 29 | audioClip = null; 30 | includeFileExtension = true; 31 | atPath = null; 32 | } 33 | 34 | public override void OnEnter() 35 | { 36 | //Get the File-Name and trim the ObjectType at the end 37 | audioClipName = audioClip.ToString().TrimEnd(" (UnityEngine.AudioClip)".ToCharArray()); 38 | if(includeFileExtension) 39 | { 40 | //Get Extension from Path starting after "Assets" and save it in a String 41 | String extension = ""; 42 | if(atPath.Value != null && atPath.Value != "") 43 | { 44 | extension = Path.GetExtension(atPath.Value); 45 | } else 46 | { 47 | extension = Path.GetExtension(AssetDatabase.GetAssetPath(assetObject: audioClip.Value).ToString().TrimStart("Assets".ToCharArray())); 48 | } 49 | 50 | //Combine AudioClip-Name with the File-Extension 51 | audioClipName = String.Concat(audioClipName, extension); 52 | } 53 | Finish(); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Audio Customs/Editor/README.MD: -------------------------------------------------------------------------------- 1 | ## GetAudioClipName.cs 2 | ![Image](/Screenshots/Actions/GetAudioClipName.png) 3 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Audio Customs/GetAudioClipLength.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Audio)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Retrieve the length of the AudioClip inside the specified AudioSource or from the given object.")] 12 | public class GetAudioClipLength : ComponentAction 13 | { 14 | 15 | [CheckForComponent(typeof(AudioSource))] 16 | [Tooltip("The GameObject with the AudioSource component.")] 17 | public FsmOwnerDefault gameObject; 18 | 19 | [Tooltip("Supply a clip directly.")] 20 | public FsmObject audioClip; 21 | 22 | [UIHint(UIHint.Variable)] 23 | [Tooltip("The length of the clip.")] 24 | public FsmFloat length; 25 | 26 | private AudioClip _audioClip; 27 | 28 | public override void Reset() 29 | { 30 | gameObject = null; 31 | audioClip = new FsmObject() { UseVariable = true }; 32 | length = 0; 33 | } 34 | 35 | public override void OnEnter() 36 | { 37 | 38 | var go = Fsm.GetOwnerDefaultTarget(gameObject); 39 | if(UpdateCache(go)) 40 | { 41 | _audioClip = audio.clip as AudioClip; 42 | length.Value = _audioClip.length; 43 | } else 44 | { 45 | _audioClip = audioClip.Value as AudioClip; 46 | length.Value = _audioClip.length; 47 | } 48 | 49 | Finish(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Audio Customs/GetAudioProgress.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Audio)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Retrieve the progress (in %) of the specified AudioSource. Optionally sends an Event when past the specified percentage.")] 12 | public class GetAudioProgress : ComponentAction 13 | { 14 | [CheckForComponent(typeof(AudioSource))] 15 | [Tooltip("The GameObject with the AudioSource component.")] 16 | public FsmOwnerDefault gameObject; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("The progress of currently playing clip.")] 20 | public FsmFloat currentProgress; 21 | 22 | [ActionSection("Optional")] 23 | 24 | [HasFloatSlider(0, 100)] 25 | [Tooltip("Send the Event when this percentage is reached. Must be above 0, otherwise ignores 'Send Event'.")] 26 | public FsmFloat onPercentage; 27 | 28 | [Tooltip("The Event to send when the progress reached the 'On Percentage' amount.")] 29 | public FsmEvent sendEvent; 30 | 31 | private float time; 32 | private float length; 33 | private AudioClip _audioClip; 34 | 35 | public override void Reset() 36 | { 37 | gameObject = null; 38 | currentProgress = 0; 39 | } 40 | 41 | public override void OnEnter() 42 | { 43 | var go = Fsm.GetOwnerDefaultTarget(gameObject); 44 | if(UpdateCache(go)) 45 | { 46 | _audioClip = audio.clip as AudioClip; 47 | length = _audioClip.length; 48 | } 49 | } 50 | 51 | public override void OnUpdate() 52 | { 53 | time = audio.time; 54 | currentProgress.Value = (time / length) * 100; 55 | 56 | if(onPercentage.Value > 0) 57 | { 58 | if(currentProgress.Value > onPercentage.Value) 59 | { 60 | Fsm.Event(sendEvent); 61 | Finish(); 62 | } 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Audio Customs/IntSwitchAudioClip.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Audio)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Get an AudioClip based on the value of an Integer Variable.")] 12 | public class IntSwitchAudioClip : FsmStateAction 13 | { 14 | [RequiredField] 15 | [UIHint(UIHint.Variable)] 16 | public FsmInt intVariable; 17 | 18 | [CompoundArray("Int Switches", "Compare Int", "Assigned Audio Clip")] 19 | public FsmInt[] compareTo; 20 | [ObjectType(typeof(AudioClip))] 21 | public FsmObject[] assignedAudioClip; 22 | 23 | [UIHint(UIHint.Variable)] 24 | [ObjectType(typeof(AudioClip))] 25 | public FsmObject result; 26 | public bool everyFrame; 27 | 28 | public override void Reset() 29 | { 30 | intVariable = null; 31 | compareTo = new FsmInt[1]; 32 | assignedAudioClip = new FsmObject[1]; 33 | result = null; 34 | everyFrame = false; 35 | } 36 | 37 | public override void OnEnter() 38 | { 39 | DoIntSwitch(); 40 | 41 | if(!everyFrame) 42 | Finish(); 43 | } 44 | 45 | public override void OnUpdate() 46 | { 47 | DoIntSwitch(); 48 | } 49 | 50 | void DoIntSwitch() 51 | { 52 | if(intVariable.IsNone) 53 | return; 54 | 55 | for(int i = 0; i < compareTo.Length; i++) 56 | { 57 | if(intVariable.Value == compareTo[i].Value) 58 | { 59 | result = assignedAudioClip[i]; 60 | return; 61 | } 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Audio Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## GetAudioClipLength.cs 2 | ![Image](/Screenshots/Actions/GetAudioClipLength.png) 3 | 4 | ## GetAudioProgress.cs 5 | ![Image](/Screenshots/Actions/GetAudioProgress.png) 6 | 7 | ## IntSwitchAudioClip.cs 8 | ![Image](/Screenshots/Actions/IntSwitchAudioClip.png) 9 | 10 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Camera Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## ColliderIsVisible.cs 2 | ![Image](/Screenshots/Actions/GameObjectIsVisibleAlternative.png) 3 | 4 | ## Collider2DIsVisible.cs 5 | ![Image](/Screenshots/Actions/GameObjectIsVisibleAlternative2D.png) 6 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Color Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## CompareColors.cs 2 | ![Image](/Screenshots/Actions/CompareColors.png) 3 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Device Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## GetDeviceLinearAcceleration.cs 2 | ![Image](/Screenshots/Actions/GetDeviceLinearAcceleration.png) 3 | 4 | ## GetDeviceRollCustom.cs 5 | ![Image](/Screenshots/Actions/GetDeviceRollCustom.png) 6 | 7 | ## SwipeGestureEventAdvanced.cs 8 | ![Image](/Screenshots/Actions/SwipeGestureEventAdvanced.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Enum Customs/EnumGetRandom.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.Enum)] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Get a Random item from an enum.")] 13 | public class EnumGetRandom : FsmStateAction 14 | { 15 | [UIHint(UIHint.Variable)] 16 | [Tooltip("The Enum Variable to get a random Item from.")] 17 | public FsmEnum enumVariable; 18 | 19 | [Tooltip("Repeat every frame while the state is active.")] 20 | public bool everyFrame; 21 | 22 | public override void Reset() 23 | { 24 | enumVariable = null; 25 | everyFrame = false; 26 | } 27 | 28 | public override void OnEnter() 29 | { 30 | DoGetRandomValue(); 31 | 32 | if(!everyFrame) 33 | { 34 | Finish(); 35 | } 36 | } 37 | 38 | public override void OnUpdate() 39 | { 40 | DoGetRandomValue(); 41 | } 42 | 43 | private void DoGetRandomValue() 44 | { 45 | List allEnumItems = new List(); 46 | 47 | //get Type 48 | var enumType = enumVariable.Value.GetType(); 49 | 50 | foreach(var singleItem in Enum.GetValues(enumType)) 51 | { 52 | allEnumItems.Add(singleItem); 53 | } 54 | 55 | enumVariable.Value = (Enum)allEnumItems[UnityEngine.Random.Range(0, allEnumItems.Count)]; 56 | } 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Enum Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## EnumGetRandom.cs 2 | ![Image](/Screenshots/Actions/EnumGetRandom.png) 3 | 4 | ## GetEnumAsArray.cs 5 | ![Image](/Screenshots/Actions/GetEnumAsArray.png) 6 | 7 | ## RandomWeightedEnum.cs 8 | ![Image](/Screenshots/Actions/RandomWeightedEnum.png) 9 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Enum Customs/RandomWeightedEnum.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.Enum)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Pick a random weighted Enum picked from an array of specified Enums.")] 10 | public class RandomWeightedEnum : FsmStateAction 11 | { 12 | [CompoundArray("Amount", "Enum", "Weighting")] 13 | public FsmEnum[] amount; 14 | [HasFloatSlider(0, 1)] 15 | public FsmFloat[] weights; 16 | 17 | [RequiredField] 18 | [UIHint(UIHint.Variable)] 19 | public FsmEnum result; 20 | 21 | [Tooltip("Can hit the same enum twice in a row.")] 22 | public FsmBool Repeat; 23 | 24 | private int randomIndex; 25 | private int lastIndex = -1; 26 | 27 | public override void Reset() 28 | { 29 | amount = new FsmEnum[3]; 30 | weights = new FsmFloat[] { 1, 1, 1 }; 31 | result = null; 32 | Repeat = false; 33 | } 34 | public override void OnEnter() 35 | { 36 | PickRandom(); 37 | 38 | Finish(); 39 | } 40 | 41 | void PickRandom() 42 | { 43 | if(amount.Length == 0) 44 | { 45 | return; 46 | } 47 | 48 | if(Repeat.Value) 49 | { 50 | randomIndex = ActionHelpers.GetRandomWeightedIndex(weights); 51 | result.Value = amount[randomIndex].Value; 52 | 53 | } else 54 | { 55 | do 56 | { 57 | randomIndex = ActionHelpers.GetRandomWeightedIndex(weights); 58 | } while(randomIndex == lastIndex); 59 | 60 | lastIndex = randomIndex; 61 | result.Value = amount[randomIndex].Value; 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/DestroyChildren.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.GameObject)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Destroys all children from the specified GameObject.")] 12 | public class DestroyChildren : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("GameObject to destroy children from.")] 16 | public FsmOwnerDefault gameObject; 17 | 18 | public override void Reset() 19 | { 20 | gameObject = null; 21 | } 22 | 23 | public override void OnEnter() 24 | { 25 | DoDestroyChildren(Fsm.GetOwnerDefaultTarget(gameObject)); 26 | 27 | Finish(); 28 | } 29 | 30 | public void DoDestroyChildren(GameObject go) 31 | { 32 | if(go != null) 33 | { 34 | Transform t = go.transform; 35 | 36 | bool isPlaying = Application.isPlaying; 37 | 38 | while(t.childCount != 0) 39 | { 40 | Transform child = t.GetChild(0); 41 | 42 | if(isPlaying) 43 | { 44 | child.parent = null; 45 | UnityEngine.Object.Destroy(child.gameObject); 46 | } else 47 | UnityEngine.Object.DestroyImmediate(child.gameObject); 48 | } 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/EnableChildren.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.GameObject)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Enables/Disables all children from the specified parent.")] 12 | public class EnableChildren : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("GameObject to change the children off of.")] 16 | public FsmOwnerDefault parent; 17 | 18 | public bool enable; 19 | 20 | public override void Reset() 21 | { 22 | parent = null; 23 | enable = true; 24 | } 25 | 26 | public override void OnEnter() 27 | { 28 | var go = Fsm.GetOwnerDefaultTarget(parent); 29 | 30 | if(go != null) 31 | { 32 | foreach(Transform child in go.transform) 33 | { 34 | child.gameObject.SetActive(enable); 35 | } 36 | } 37 | Finish(); 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/EnableChildrenInRange.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.GameObject)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Enables/Disables all children from the specified parent in a given range.")] 12 | public class EnableChildrenInRange : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("GameObject to change the children off of.")] 16 | public FsmOwnerDefault parent; 17 | 18 | [Tooltip("From which index to start enabling/disabling from. Leave at 0 to start from the first child.")] 19 | public FsmInt startingFrom; 20 | 21 | [Tooltip("From which index to end enabling/disabling at. Leave at 0 to end at the last child.")] 22 | public FsmInt endingAt; 23 | 24 | public bool enable; 25 | 26 | public override void Reset() 27 | { 28 | parent = null; 29 | startingFrom = 0; 30 | endingAt = 0; 31 | enable = true; 32 | } 33 | 34 | public override void OnEnter() 35 | { 36 | var go = Fsm.GetOwnerDefaultTarget(parent); 37 | 38 | if(!go) 39 | { 40 | UnityEngine.Debug.LogError("GameObject is null!"); 41 | return; 42 | } 43 | 44 | if(endingAt.Value == 0) endingAt = go.transform.childCount; 45 | 46 | int i = 0; 47 | foreach(Transform child in go.transform) 48 | { 49 | if(i < startingFrom.Value || i > endingAt.Value) continue; 50 | 51 | child.gameObject.SetActive(enable); 52 | i++; 53 | } 54 | 55 | Finish(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/GetChildren.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(ActionCategory.GameObject)] 9 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 10 | [Tooltip("Finds multiple children of a GameObject by their names.")] 11 | public class GetChildren : FsmStateAction 12 | { 13 | [RequiredField] 14 | [Tooltip("The GameObject to search.")] 15 | public FsmOwnerDefault gameObject; 16 | 17 | [CompoundArray("Children", "Name", "Store Result")] 18 | 19 | [RequiredField] 20 | [Tooltip("The name of the child. Note, you can specify a path to the child " + 21 | "(e.g. \"LeftShoulder/Arm/Hand/Finger\", where \"LeftShoulder\" would be the child to start from.")] 22 | public FsmString[] childNames; 23 | 24 | [RequiredField] 25 | [UIHint(UIHint.Variable)] 26 | [Tooltip("Store the current child in a GameObject variable.")] 27 | public FsmGameObject[] storeResult; 28 | 29 | public override void Reset() 30 | { 31 | gameObject = null; 32 | childNames = new FsmString[2]; 33 | storeResult = new FsmGameObject[2]; 34 | } 35 | 36 | public override void OnEnter() 37 | { 38 | DoFindChild(); 39 | Finish(); 40 | } 41 | 42 | void DoFindChild() 43 | { 44 | var go = Fsm.GetOwnerDefaultTarget(gameObject); 45 | if (go == null) return; 46 | 47 | for(int i = 0; i < childNames.Length; i++) 48 | { 49 | var transform = go.transform.Find(childNames[i].Value); 50 | storeResult[i].Value = transform != null ? transform.gameObject : null; 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/GetLastChild.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.GameObject)] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Gets the last child of a GameObject.")] 13 | public class GetLastChild : FsmStateAction 14 | { 15 | [RequiredField] 16 | [Tooltip("The GameObjec to get the last child of.")] 17 | public FsmOwnerDefault gameObject; 18 | 19 | [UIHint(UIHint.Variable)] 20 | [RequiredField] 21 | [Tooltip("The last child of the given GameObject.")] 22 | public FsmGameObject result; 23 | 24 | [Tooltip("Wheter to run every frame or only once.")] 25 | public FsmBool everyFrame; 26 | 27 | private GameObject go; 28 | 29 | public override void Reset() 30 | { 31 | gameObject = null; 32 | result = null; 33 | everyFrame = false; 34 | } 35 | 36 | public override void OnEnter() 37 | { 38 | DoGetLastChild(); 39 | 40 | if(!everyFrame.Value) Finish(); 41 | } 42 | 43 | public override void OnUpdate() 44 | { 45 | DoGetLastChild(); 46 | } 47 | 48 | private void DoGetLastChild() 49 | { 50 | go = Fsm.GetOwnerDefaultTarget(gameObject); 51 | 52 | if(!go) 53 | { 54 | UnityEngine.Debug.LogError("GameObject is null!"); 55 | return; 56 | } 57 | 58 | result.Value = go.transform.GetChild(go.transform.childCount - 1).gameObject; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/GetObjectName.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.GameObject)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Gets the name of an Object and stores it in a String Variable.")] 10 | public class GetObjectName : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip("The Object to get the name of.")] 14 | public FsmObject specifyObject; 15 | 16 | [RequiredField] 17 | [UIHint(UIHint.Variable)] 18 | [Tooltip("The Name of the specified Object.")] 19 | public FsmString storeName; 20 | 21 | public bool everyFrame; 22 | 23 | public override void Reset() 24 | { 25 | specifyObject = new FsmObject { UseVariable = true }; 26 | storeName = null; 27 | everyFrame = false; 28 | } 29 | 30 | public override void OnEnter() 31 | { 32 | DoGetObjectName(); 33 | 34 | if(!everyFrame) 35 | { 36 | Finish(); 37 | } 38 | } 39 | 40 | public override void OnUpdate() 41 | { 42 | DoGetObjectName(); 43 | } 44 | 45 | void DoGetObjectName() 46 | { 47 | if(!specifyObject.Value) 48 | { 49 | LogError("Object is null!"); 50 | } 51 | 52 | var obj = specifyObject.Value; 53 | 54 | storeName.Value = obj.name; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## ActivateComponents.cs 2 | ![Image](/Screenshots/Actions/ActivateComponents.png) 3 | 4 | ## ActivateGameObjects.cs 5 | ![Image](/Screenshots/Actions/ActivateGameObjects.png) 6 | 7 | ## ActivateGameObjectsAdvanced.cs 8 | ![Image](/Screenshots/Actions/ActivateGameObjectsAdvanced.png) 9 | 10 | ## DestroyChildren.cs 11 | ![Image](/Screenshots/Actions/DestroyChildren.png) 12 | 13 | ## EnableChildren.cs 14 | ![Image](/Screenshots/Actions/EnableChildren.png) 15 | 16 | ## EnableChildrenInRange.cs 17 | ![Image](/Screenshots/Actions/EnableChildrenInRange.png) 18 | 19 | ## GameObjectCompareMulti.cs 20 | ![Image](/Screenshots/Actions/GameObjectCompareMulti.png) 21 | 22 | ## GameObjectKeepActive.cs 23 | ![Image](/Screenshots/Actions/GameObjectKeepActive.png) 24 | 25 | ## GetChildCountAdvanced.cs 26 | ![Image](/Screenshots/Actions/GetChildCountAdvanced.png) 27 | 28 | ## GetChildren.cs 29 | ![Image](/Screenshots/Actions/GetChildren.png) 30 | 31 | ## GetGameObjectSibling.cs 32 | ![Image](/Screenshots/Actions/GetGameObjectSibling.png) 33 | 34 | ## GetLastChild.cs 35 | ![Image](/Screenshots/Actions/GetLastChild.png) 36 | 37 | ## GetMultilevelGameObject.cs 38 | ![Image](/Screenshots/Actions/GetMultilevelGameObject.png) 39 | 40 | ## GetObjectName.cs 41 | ![Image](/Screenshots/Actions/GetObjectName.png) 42 | 43 | ## HasSibling.cs 44 | ![Image](/Screenshots/Actions/HasSibling.png) 45 | 46 | ## SetGameObjectIfNotNull.cs 47 | ![Image](/Screenshots/Actions/SetGameObjectIfNotNull.png) 48 | 49 | ## ToggleComponent.cs 50 | ![Image](/Screenshots/Actions/ToggleComponent.png) 51 | 52 | ## ToggleGameObject.cs 53 | ![Image](/Screenshots/Actions/ToggleGameObject.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/SetGameObjectIfNotNull.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(ActionCategory.GameObject)] 9 | [Tooltip("Sets the value of a Game Object variable if it's not null.")] 10 | public class SetGameObjectIfNotNull : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | public FsmGameObject variable; 15 | 16 | [Tooltip("The GameObject to overwrite 'Variable' with if it's not null.")] 17 | public FsmGameObject gameObject; 18 | 19 | [Tooltip("Optional event to send if the GameObject is null.")] 20 | public FsmEvent isNull; 21 | 22 | [Tooltip("Optional event to send if the GameObject isn't null.")] 23 | public FsmEvent isNotNull; 24 | 25 | [Tooltip("Wheter to repeat this action on every frame or only once.")] 26 | public FsmBool everyFrame; 27 | 28 | public override void Reset() 29 | { 30 | variable = null; 31 | gameObject = null; 32 | isNull = null; 33 | isNotNull = null; 34 | everyFrame = false; 35 | } 36 | 37 | public override void OnEnter() 38 | { 39 | SetGameObject(); 40 | 41 | if(!everyFrame.Value) Finish(); 42 | } 43 | 44 | public override void OnUpdate() 45 | { 46 | SetGameObject(); 47 | } 48 | 49 | private void SetGameObject() 50 | { 51 | if(gameObject.Value) 52 | { 53 | variable.Value = gameObject.Value; 54 | Fsm.Event(isNotNull); 55 | } else 56 | { 57 | Fsm.Event(isNull); 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/ToggleComponent.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.Logic)] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Enables a Component if it's disabled and vice versa.")] 13 | public class ToggleComponent : FsmStateAction 14 | { 15 | [RequiredField] 16 | [Tooltip("The component to toggle. Supports scripts, colliders and renderer.")] 17 | public FsmObject component; 18 | 19 | [Tooltip("Wheter to run this action every frame or only once.")] 20 | public FsmBool everyFrame; 21 | 22 | public override void Reset() 23 | { 24 | component = null; 25 | everyFrame = false; 26 | } 27 | 28 | public override void OnEnter() 29 | { 30 | DoToggleComponent(); 31 | 32 | if(!everyFrame.Value) Finish(); 33 | } 34 | 35 | public override void OnUpdate() 36 | { 37 | DoToggleComponent(); 38 | } 39 | 40 | private void DoToggleComponent() 41 | { 42 | Behaviour be = component.Value as Behaviour; 43 | Renderer re = component.Value as Renderer; 44 | Collider col = component.Value as Collider; 45 | 46 | if(be) 47 | be.enabled = !be.enabled; 48 | else if(re) 49 | re.enabled = !re.enabled; 50 | else if(col) 51 | col.enabled = !col.enabled; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/GameObject & UnityObject Customs/ToggleGameObject.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.Logic)] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Enables a GameObject if it's disabled and vice versa.")] 13 | public class ToggleGameObject : FsmStateAction 14 | { 15 | public enum ActiveType 16 | { 17 | ActiveInHirarchy, 18 | ActiveSelf 19 | } 20 | 21 | [RequiredField] 22 | [Tooltip("The GameObject to toggle.")] 23 | public FsmGameObject gameObject; 24 | 25 | [Tooltip("What active state should be checked.\n'Active In Hirarchy' = If the GameObject and all " + 26 | "of it's parents are active (a.k.a. if it's visible in the scene);\n" + 27 | "'ActiveSelf' = If the GameObject is active independent of its parents.")] 28 | public ActiveType activeType; 29 | 30 | [Tooltip("Wheter to run this action every frame or only once.")] 31 | public FsmBool everyFrame; 32 | 33 | private GameObject go; 34 | 35 | public override void Reset() 36 | { 37 | gameObject = new FsmGameObject() { UseVariable = true }; 38 | activeType = ActiveType.ActiveSelf; 39 | everyFrame = false; 40 | } 41 | 42 | public override void OnEnter() 43 | { 44 | DoToggleGameObject(); 45 | 46 | if(!everyFrame.Value) Finish(); 47 | } 48 | 49 | public override void OnUpdate() 50 | { 51 | DoToggleGameObject(); 52 | } 53 | 54 | private void DoToggleGameObject() 55 | { 56 | go = gameObject.Value; 57 | 58 | switch(activeType) 59 | { 60 | case ActiveType.ActiveInHirarchy: 61 | go.SetActive(!go.activeInHierarchy); 62 | break; 63 | case ActiveType.ActiveSelf: 64 | go.SetActive(!go.activeSelf); 65 | break; 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Logic Customs/ConvertIntToLetter.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.Logic)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Returns the letter at the given Integer position (must be between 1 and 26).")] 10 | public class ConvertIntToLetter : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip("The int variable that serves as the position to get the letter of.")] 14 | public FsmInt intValue; 15 | 16 | [RequiredField] 17 | [UIHint(UIHint.Variable)] 18 | [Tooltip("The resulting letter.")] 19 | public FsmString result; 20 | 21 | [Tooltip("Whether the resulting letter should be in uppercase format instead of lowercase.")] 22 | public FsmBool returnUppercase; 23 | 24 | [Tooltip("Repeat every frame. Useful if the variable is changing and you're waiting for a particular result.")] 25 | public bool everyFrame; 26 | 27 | public override void Reset() 28 | { 29 | intValue = 1; 30 | result = null; 31 | returnUppercase = true; 32 | everyFrame = false; 33 | } 34 | 35 | public override void OnEnter() 36 | { 37 | DoConvert(); 38 | 39 | if(!everyFrame) Finish(); 40 | } 41 | 42 | public override void OnUpdate() 43 | { 44 | DoConvert(); 45 | } 46 | 47 | private void DoConvert() 48 | { 49 | if (intValue.Value < 1 || intValue.Value > 26) 50 | { 51 | LogError("Given Integer is out of range (" + intValue.Value + ")!"); 52 | return; 53 | } 54 | 55 | result.Value = ((System.Char)((returnUppercase.Value ? 64 : 96) + intValue.Value)).ToString(); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Logic Customs/IntSignTest.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.Logic)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Sends Events based on the sign of an Integer variable.")] 10 | public class IntSignTest : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | [Tooltip("The int variable to test.")] 15 | public FsmInt intValue; 16 | 17 | [Tooltip("Event to send if the int variable is positive.")] 18 | public FsmEvent isPositive; 19 | 20 | [Tooltip("Event to send if the int variable is negative.")] 21 | public FsmEvent isNegative; 22 | 23 | [Tooltip("Repeat every frame. Useful if the variable is changing and you're waiting for a particular result.")] 24 | public bool everyFrame; 25 | 26 | public override void Reset() 27 | { 28 | intValue = 0; 29 | isPositive = null; 30 | isNegative = null; 31 | everyFrame = false; 32 | } 33 | 34 | public override void OnEnter() 35 | { 36 | DoSignTest(); 37 | 38 | if(!everyFrame) Finish(); 39 | } 40 | 41 | public override void OnUpdate() 42 | { 43 | DoSignTest(); 44 | } 45 | 46 | void DoSignTest() 47 | { 48 | Fsm.Event(intValue.Value < 0 ? isNegative : isPositive); 49 | } 50 | 51 | public override string ErrorCheck() 52 | { 53 | if(FsmEvent.IsNullOrEmpty(isPositive) && 54 | FsmEvent.IsNullOrEmpty(isNegative)) 55 | return "Action sends no events!"; 56 | return ""; 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Logic Customs/IntSwitchAdvanced.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.Logic)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Sends an Event based on the value of an Integer Variable.")] 10 | public class IntSwitchAdvanced : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | public FsmInt intVariable; 15 | [CompoundArray("Int Switches", "Compare Int", "Send Event")] 16 | public FsmInt[] compareTo; 17 | public FsmEvent[] sendEvent; 18 | 19 | [Tooltip("Event to raise if no matches are found")] 20 | public FsmEvent noMatchEvent; 21 | 22 | public FsmBool everyFrame; 23 | 24 | public override void Reset() 25 | { 26 | intVariable = null; 27 | compareTo = new FsmInt[1]; 28 | sendEvent = new FsmEvent[1]; 29 | noMatchEvent = null; 30 | everyFrame = false; 31 | } 32 | 33 | public override void OnEnter() 34 | { 35 | DoIntSwitch(); 36 | 37 | if(!everyFrame.Value) 38 | Finish(); 39 | } 40 | 41 | public override void OnUpdate() 42 | { 43 | DoIntSwitch(); 44 | } 45 | 46 | void DoIntSwitch() 47 | { 48 | if(intVariable.IsNone) 49 | return; 50 | 51 | for(int i = 0; i < compareTo.Length; i++) 52 | { 53 | if(intVariable.Value == compareTo[i].Value) 54 | { 55 | Fsm.Event(sendEvent[i]); 56 | return; 57 | } 58 | } 59 | if(noMatchEvent != null) 60 | { 61 | Fsm.Event(noMatchEvent); 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Logic Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## ConvertIntToLetter.cs 2 | ![Image](/Screenshots/Actions/ConvertIntToLetter.png) 3 | 4 | ## FloatCompareRange.cs 5 | ![Image](/Screenshots/Actions/FloatCompareRange.png) 6 | 7 | ## IntCompareRange.cs 8 | ![Image](/Screenshots/Actions/IntCompareRange.png) 9 | 10 | ## IntSignTest.cs 11 | ![Image](/Screenshots/Actions/IntSignTest.png) 12 | 13 | ## IntSwitchAdvanced.cs 14 | ![Image](/Screenshots/Actions/IntSwitchAdvanced.png) 15 | 16 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/FloatFlip.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.Math)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Inverts the sign of a float variable. If the given float is positive, it gets flipped and becomes negative and vice versa.")] 10 | public class FloatFlip : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | [Tooltip("The float variable to divide.")] 15 | public FsmFloat floatVariable; 16 | 17 | [RequiredField] 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("The flipped result.")] 20 | public FsmFloat result; 21 | 22 | [Tooltip("Repeat every Frame. Useful if the variables are changing.")] 23 | public bool everyFrame; 24 | 25 | public override void Reset() 26 | { 27 | floatVariable = null; 28 | result = null; 29 | everyFrame = false; 30 | } 31 | 32 | public override void OnEnter() 33 | { 34 | DoFlip(); 35 | 36 | if(!everyFrame) 37 | { 38 | Finish(); 39 | } 40 | } 41 | 42 | public override void OnUpdate() 43 | { 44 | DoFlip(); 45 | } 46 | 47 | void DoFlip() 48 | { 49 | result.Value = floatVariable.Value * (-1); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/GetPercentageInt.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Math)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Returns the percentage of a base Integer and the current value by dividing the value by the base and multiplying it by 100.")] 12 | public class GetPercentageInt : FsmStateAction 13 | { 14 | [RequiredField] 15 | public FsmInt _value; 16 | 17 | [RequiredField] 18 | public FsmInt _base; 19 | 20 | [RequiredField] 21 | [UIHint(UIHint.Variable)] 22 | public FsmInt storeResult; 23 | 24 | public bool everyFrame; 25 | 26 | public override void Reset() 27 | { 28 | _value = null; 29 | _base = null; 30 | storeResult = null; 31 | everyFrame = false; 32 | } 33 | 34 | public override void OnEnter() 35 | { 36 | DoGetPercentage(); 37 | 38 | if (!everyFrame) 39 | Finish(); 40 | } 41 | 42 | public override void OnUpdate() 43 | { 44 | DoGetPercentage(); 45 | } 46 | 47 | void DoGetPercentage() 48 | { 49 | storeResult.Value = Mathf.RoundToInt(_value.Value / _base.Value * 100); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/GetUnsignedFloat.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 Floaternational (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Math)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Returns the absolute value of an Float variable and optionally sets it to that.")] 12 | public class GetUnsignedFloat : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("The Float variable.")] 16 | public FsmFloat floatVariable; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("The unsigned Float.")] 20 | public FsmFloat result; 21 | 22 | [Tooltip("Apply the unsigned value to the float.")] 23 | public FsmBool applyToOriginal; 24 | 25 | [Tooltip("Repeat every frame. Useful if the Float variable is changing.")] 26 | public bool everyFrame; 27 | 28 | public override void Reset() 29 | { 30 | floatVariable = new FsmFloat() { UseVariable = true }; 31 | result = null; 32 | applyToOriginal = false; 33 | everyFrame = false; 34 | } 35 | 36 | public override void OnEnter() 37 | { 38 | DoFloatAbs(); 39 | 40 | if(!everyFrame) Finish(); 41 | } 42 | 43 | public override void OnUpdate() 44 | { 45 | DoFloatAbs(); 46 | } 47 | 48 | void DoFloatAbs() 49 | { 50 | result.Value = Mathf.Abs(floatVariable.Value); 51 | 52 | if(applyToOriginal.Value) 53 | floatVariable.Value = result.Value; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/GetUnsignedInt.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | //Author: Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Math)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Returns the absolute value of an Int variable and optionally sets it to that.")] 12 | public class GetUnsignedInt : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("The Int variable.")] 16 | public FsmInt intVariable; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("The unsigned Int.")] 20 | public FsmInt result; 21 | 22 | [Tooltip("Apply the unsigned value to the int.")] 23 | public FsmBool applyToOriginal; 24 | 25 | [Tooltip("Repeat every frame. Useful if the Int variable is changing.")] 26 | public bool everyFrame; 27 | 28 | public override void Reset() 29 | { 30 | intVariable = new FsmInt() { UseVariable = true }; 31 | result = null; 32 | applyToOriginal = false; 33 | everyFrame = false; 34 | } 35 | 36 | public override void OnEnter() 37 | { 38 | DoIntAbs(); 39 | 40 | if(!everyFrame) Finish(); 41 | } 42 | 43 | public override void OnUpdate() 44 | { 45 | DoIntAbs(); 46 | } 47 | 48 | void DoIntAbs() 49 | { 50 | result.Value = Mathf.Abs(intVariable.Value); 51 | 52 | if(applyToOriginal.Value) 53 | intVariable.Value = result.Value; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/IntFlip.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.Math)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Inverts the sign of an int variable. If the given int is positive, it gets flipped and becomes negative and vice versa.")] 10 | public class IntFlip : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | [Tooltip("The int variable to divide.")] 15 | public FsmInt intVariable; 16 | 17 | [RequiredField] 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("The flipped result.")] 20 | public FsmInt result; 21 | 22 | [Tooltip("Repeat every Frame. Useful if the variables are changing.")] 23 | public bool everyFrame; 24 | 25 | public override void Reset() 26 | { 27 | intVariable = null; 28 | result = null; 29 | everyFrame = false; 30 | } 31 | 32 | public override void OnEnter() 33 | { 34 | DoFlip(); 35 | 36 | if(!everyFrame) 37 | { 38 | Finish(); 39 | } 40 | } 41 | 42 | public override void OnUpdate() 43 | { 44 | DoFlip(); 45 | } 46 | 47 | void DoFlip() 48 | { 49 | result.Value = intVariable.Value * (-1); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/IntRoundToNearest.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using System; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Math)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Rounds an Int Variable to the specified base up or down. If the given Int is 36 and the Base is 10, then the result is 40. Useful for HealthManager or consticted Slider.")] 12 | public class IntRoundToNearest : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("The Variable that should be rounded.")] 16 | public FsmInt intVariable; 17 | 18 | [RequiredField] 19 | [Tooltip("The Base Value to round from.")] 20 | public FsmInt baseValue; 21 | 22 | [RequiredField] 23 | [Tooltip("The rounded int.")] 24 | public FsmInt result; 25 | 26 | [Tooltip("If it should repeat every frame. (Only useful if the Int Variable changes over time)")] 27 | public bool everyFrame; 28 | 29 | public override void Reset() 30 | { 31 | intVariable = null; 32 | baseValue = null; 33 | result = new FsmInt() { UseVariable = true }; 34 | everyFrame = false; 35 | } 36 | 37 | // Code that runs on entering the state. 38 | public override void OnEnter() 39 | { 40 | DoRound(); 41 | if(!everyFrame) 42 | { 43 | Finish(); 44 | } 45 | } 46 | 47 | // Code that runs every frame. 48 | public override void OnUpdate() 49 | { 50 | DoRound(); 51 | } 52 | 53 | public void DoRound() 54 | { 55 | double d = (double)intVariable.Value; 56 | result.Value = (int)Math.Round(d / baseValue.Value) * baseValue.Value; 57 | } 58 | 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Math Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## FloatFlip.cs 2 | ![Image](/Screenshots/Actions/FloatFlip.png) 3 | 4 | ## GetPercentageInt.cs 5 | ![Image](/Screenshots/Actions/GetPercentageInt.png) 6 | 7 | ## GetUnsignedFloat.cs 8 | ![Image](/Screenshots/Actions/GetUnsignedFloat.png) 9 | 10 | ## GetUnsignedInt.cs 11 | ![Image](/Screenshots/Actions/GetUnsignedInt.png) 12 | 13 | ## IntFlip.cs 14 | ![Image](/Screenshots/Actions/IntFlip.png) 15 | 16 | ## IntRoundToNearest.cs 17 | ![Image](/Screenshots/Actions/IntRoundToNearest.png) 18 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Navigation Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## FindClosestAgent.cs 2 | ![Image](/Screenshots/Actions/FindClosestAgent.png) 3 | 4 | ## NavMeshAgentGetAreaMask.cs 5 | ![Image](/Screenshots/Actions/NavMeshAgentGetAreaMask.png) 6 | 7 | ## NavMeshAgentMoveTo.cs 8 | ![Image](/Screenshots/Actions/NavMeshAgentMoveTo.png) 9 | 10 | ## NavMeshFindClosestPoint.cs 11 | ![Image](/Screenshots/Actions/NavMeshFindClosestPoint.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Physics & Transform Customs/GetGravity2dScale.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | using UnityEngine; 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(ActionCategory.Physics2D)] 9 | [Tooltip("Gets The degree to which this object is affected by gravity. NOTE: Game object must have a rigidbody 2D.")] 10 | public class GetGravity2dScale : ComponentAction 11 | { 12 | [RequiredField] 13 | [CheckForComponent(typeof(Rigidbody2D))] 14 | [Tooltip("The GameObject with a Rigidbody 2d attached")] 15 | public FsmOwnerDefault gameObject; 16 | 17 | [UIHint(UIHint.Variable)] 18 | [RequiredField] 19 | [Tooltip("The gravity scale effect")] 20 | public FsmFloat result; 21 | 22 | public FsmBool everyFrame; 23 | 24 | public override void Reset() 25 | { 26 | gameObject = null; 27 | result = null; 28 | everyFrame = false; 29 | } 30 | 31 | public override void OnEnter() 32 | { 33 | DoGetGravityScale(); 34 | 35 | if(!everyFrame.Value) Finish(); 36 | } 37 | 38 | public override void OnUpdate() 39 | { 40 | DoGetGravityScale(); 41 | } 42 | 43 | void DoGetGravityScale() 44 | { 45 | var go = Fsm.GetOwnerDefaultTarget(gameObject); 46 | if (!UpdateCache(go)) return; 47 | 48 | result.Value = rigidbody2d.gravityScale; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Physics & Transform Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## EnableCollider.cs 2 | ![Image](/Screenshots/Actions/EnableCollider.png) 3 | 4 | ## EnableColliderMulti.cs 5 | ![Image](/Screenshots/Actions/EnableColliderMulti.png) 6 | 7 | ## FollowMouse2D.cs 8 | ![Image](/Screenshots/Actions/FollowMouse2D.png) 9 | 10 | ## GetGameObjectScreenPosition.cs 11 | ![Image](/Screenshots/Actions/GetGameObjectScreenPosition.png) 12 | 13 | ## GetGravity2dScale.cs 14 | ![Image](/Screenshots/Actions/GetGravity2dScale.png) 15 | 16 | ## GetPositionAddOffset.cs 17 | ![Image](/Screenshots/Actions/GetPositionAddOffset.png) 18 | 19 | ## GetRotationAddOffset.cs 20 | ![Image](/Screenshots/Actions/GetRotationAddOffset.png) 21 | 22 | ## GetScaleAddOffset.cs 23 | ![Image](/Screenshots/Actions/GetScaleAddOffset.png) 24 | 25 | ## ResetTransforms.cs 26 | ![Image](/Screenshots/Actions/ResetTransforms.png) 27 | 28 | ## SetPositions.cs 29 | ![Image](/Screenshots/Actions/SetPositions.png) 30 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Random Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## RandomCharacters.cs 2 | ![Image](/Screenshots/Actions/RandomCharacters.png) 3 | 4 | ## RandomFloatAroundRange.cs 5 | ![Image](/Screenshots/Actions/RandomFloatAroundRange.png) 6 | 7 | ## RandomFloatOnSlope.cs 8 | ![Image](/Screenshots/Actions/RandomFloatOnSlope.png) 9 | 10 | ## RandomIntAroundRange.cs 11 | ![Image](/Screenshots/Actions/RandomIntAroundRange.png) 12 | 13 | ## RandomPointBetweenGameObjects.cs 14 | ![Image](/Screenshots/Actions/RandomPointBetweenGameObjects.png) 15 | 16 | ## RandomPointOnSlope.cs 17 | ![Image](/Screenshots/Actions/RandomPointOnSlope.png) 18 | 19 | ## RandomWaitCustom.cs 20 | ![Image](/Screenshots/Actions/RandomWaitCustom.png) 21 | 22 | ## RandomWeightedVector3.cs 23 | ![Image](/Screenshots/Actions/RandomWeightedVector3.png) 24 | 25 | ## SelectRandomAudioClip.cs 26 | ![Image](/Screenshots/Actions/SelectRandomAudioClip.png) 27 | 28 | ## SelectRandomObject.cs 29 | ![Image](/Screenshots/Actions/SelectRandomObject.png) 30 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Random Customs/RandomPointBetweenGameObjects.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | [ActionCategory("Random")] 7 | [Tooltip("Returns a random point on the distance between two GameObjects.")] 8 | public class RandomPointBetweenGameObjects : FsmStateAction 9 | { 10 | [RequiredField] 11 | [Tooltip("The starting point of the slope.")] 12 | public FsmGameObject firstGameObject; 13 | 14 | [RequiredField] 15 | [Tooltip("The last point on the imaginary slope.")] 16 | public FsmGameObject secondGameObject; 17 | 18 | [Tooltip("Wheter to return the random point in local or world space.")] 19 | public Space space; 20 | 21 | [UIHint(UIHint.Variable)] 22 | [Tooltip("A random result between the given points.")] 23 | public FsmVector3 storePoint; 24 | 25 | [Tooltip("Wheter to run every frame.")] 26 | public FsmBool everyFrame; 27 | 28 | public override void Reset() 29 | { 30 | firstGameObject = null; 31 | secondGameObject = null; 32 | storePoint = null; 33 | } 34 | 35 | public override void OnEnter() 36 | { 37 | DoGetPointOnSlope(); 38 | 39 | if(!everyFrame.Value) Finish(); 40 | } 41 | 42 | public override void OnUpdate() 43 | { 44 | DoGetPointOnSlope(); 45 | } 46 | 47 | void DoGetPointOnSlope() 48 | { 49 | Vector3 firstPos = space == Space.World ? firstGameObject.Value.transform.position 50 | : firstGameObject.Value.transform.localPosition; 51 | 52 | Vector3 secondPos = space == Space.World ? secondGameObject.Value.transform.position 53 | : secondGameObject.Value.transform.localPosition; 54 | 55 | storePoint.Value = Random.Range(0, Vector3.Distance(firstPos, secondPos)) 56 | * Vector3.Normalize(secondPos - firstPos) 57 | + firstPos; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Random Customs/RandomPointOnSlope.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | [ActionCategory("Random")] 7 | [Tooltip("Returns a random point between two Vector3 variables. Useful for 2.5D games, e.g. if you want GameObjects to spawn further down the farther away they are or vice versa.")] 8 | public class RandomPointOnSlope : FsmStateAction 9 | { 10 | [RequiredField] 11 | [Tooltip("The starting point of the slope.")] 12 | public FsmVector3 slopeStart; 13 | 14 | [RequiredField] 15 | [Tooltip("The last point on the imaginary slope.")] 16 | public FsmVector3 slopeEnd; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("A random result between the given points.")] 20 | public FsmVector3 storePoint; 21 | 22 | [Tooltip("Wheter to run every frame.")] 23 | public FsmBool everyFrame; 24 | 25 | public override void Reset() 26 | { 27 | slopeStart = null; 28 | slopeEnd = null; 29 | storePoint = null; 30 | } 31 | 32 | public override void OnEnter() 33 | { 34 | DoGetPointOnSlope(); 35 | 36 | if(!everyFrame.Value) 37 | { 38 | Finish(); 39 | } 40 | } 41 | 42 | public override void OnUpdate() 43 | { 44 | DoGetPointOnSlope(); 45 | } 46 | 47 | void DoGetPointOnSlope() 48 | { 49 | storePoint.Value = Random.Range(0, Vector3.Distance(slopeStart.Value, slopeEnd.Value)) 50 | * Vector3.Normalize(slopeEnd.Value - slopeStart.Value) 51 | + slopeStart.Value; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Random Customs/RandomWeightedVector3.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | [ActionCategory("Random")] 7 | [Tooltip("Pick a random weighted Vector3 picked from an array of Vector3's.")] 8 | public class RandomWeightedVector3 : FsmStateAction 9 | { 10 | [CompoundArray("Amount", "Vector3", "Weighting")] 11 | public FsmVector3[] amount; 12 | [HasFloatSlider(0, 1)] 13 | public FsmFloat[] weights; 14 | 15 | [RequiredField] 16 | [UIHint(UIHint.Variable)] 17 | public FsmVector3 result; 18 | [Tooltip("Can hit the same number twice in a row")] 19 | public FsmBool Repeat; 20 | 21 | private int randomIndex; 22 | private int lastIndex = -1; 23 | 24 | public override void Reset() 25 | { 26 | amount = new FsmVector3[3]; 27 | weights = new FsmFloat[] { 1, 1, 1 }; 28 | result = null; 29 | Repeat = false; 30 | } 31 | public override void OnEnter() 32 | { 33 | PickRandom(); 34 | 35 | Finish(); 36 | } 37 | 38 | void PickRandom() 39 | { 40 | if(amount.Length == 0) 41 | { 42 | return; 43 | } 44 | 45 | if(Repeat.Value) 46 | { 47 | randomIndex = ActionHelpers.GetRandomWeightedIndex(weights); 48 | result.Value = amount[randomIndex].Value; 49 | 50 | } else 51 | { 52 | do 53 | { 54 | randomIndex = ActionHelpers.GetRandomWeightedIndex(weights); 55 | } while(randomIndex == lastIndex); 56 | 57 | lastIndex = randomIndex; 58 | result.Value = amount[randomIndex].Value; 59 | } 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Random Customs/SelectRandomAudioClip.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory("Random")] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Selects a Random AudioClip from an array of AudioClip.")] 12 | public class SelectRandomAudioClip : FsmStateAction 13 | { 14 | [CompoundArray("Objects", "Object", "Weight")] 15 | [ObjectType(typeof(AudioClip))] 16 | public FsmObject[] objects; 17 | [HasFloatSlider(0, 1)] 18 | public FsmFloat[] weights; 19 | [RequiredField] 20 | [UIHint(UIHint.Variable)] 21 | [ObjectType(typeof(AudioClip))] 22 | public FsmObject storeObject; 23 | 24 | public override void Reset() 25 | { 26 | objects = new FsmObject[3]; 27 | weights = new FsmFloat[] { 1, 1, 1 }; 28 | storeObject = null; 29 | } 30 | 31 | public override void OnEnter() 32 | { 33 | DoSelectRandomObject(); 34 | Finish(); 35 | } 36 | 37 | void DoSelectRandomObject() 38 | { 39 | if(objects == null) return; 40 | if(objects.Length == 0) return; 41 | if(storeObject == null) return; 42 | 43 | int randomIndex = ActionHelpers.GetRandomWeightedIndex(weights); 44 | 45 | if(randomIndex != -1) 46 | { 47 | storeObject.Value = objects[randomIndex].Value; 48 | } 49 | 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Random Customs/SelectRandomObject.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory("Random")] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Selects a Random Object from an array of Objects.")] 10 | public class SelectRandomObject : FsmStateAction 11 | { 12 | [CompoundArray("Objects", "Object", "Weight")] 13 | public FsmObject[] objects; 14 | [HasFloatSlider(0, 1)] 15 | public FsmFloat[] weights; 16 | [RequiredField] 17 | [UIHint(UIHint.Variable)] 18 | public FsmObject storeObject; 19 | 20 | public override void Reset() 21 | { 22 | objects = new FsmObject[3]; 23 | weights = new FsmFloat[] { 1, 1, 1 }; 24 | storeObject = null; 25 | } 26 | 27 | public override void OnEnter() 28 | { 29 | DoSelectRandomObject(); 30 | Finish(); 31 | } 32 | 33 | void DoSelectRandomObject() 34 | { 35 | if(objects == null) return; 36 | if(objects.Length == 0) return; 37 | if(storeObject == null) return; 38 | 39 | int randomIndex = ActionHelpers.GetRandomWeightedIndex(weights); 40 | 41 | if(randomIndex != -1) 42 | { 43 | storeObject.Value = objects[randomIndex].Value; 44 | } 45 | 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Sprite customs/README.MD: -------------------------------------------------------------------------------- 1 | ## SpriteGetName.cs 2 | ![Image](/Screenshots/Actions/SpriteGetName.png) 3 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Sprite customs/SpriteGetName.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory("Sprite")] 11 | [Tooltip("Get the name of a Unity Sprite.")] 12 | public class SpriteGetName : FsmStateAction 13 | { 14 | [RequiredField] 15 | [ObjectType(typeof(Sprite))] 16 | [Tooltip("The sprite to get the name of.")] 17 | public FsmObject sprite; 18 | 19 | [UIHint(UIHint.Variable)] 20 | [Tooltip("Store the name of the sprite in a variable.")] 21 | public FsmString result; 22 | 23 | [Tooltip("Wheter to repeat this action on every frame or only once.")] 24 | public FsmBool everyFrame; 25 | 26 | public override void Reset() 27 | { 28 | sprite = new FsmObject { UseVariable = true }; 29 | result = null; 30 | everyFrame = false; 31 | } 32 | 33 | public override void OnEnter() 34 | { 35 | DoGetSpriteName(); 36 | 37 | if(!everyFrame.Value) Finish(); 38 | } 39 | 40 | public override void OnUpdate() 41 | { 42 | DoGetSpriteName(); 43 | } 44 | 45 | private void DoGetSpriteName() 46 | { 47 | if(sprite == null) 48 | { 49 | Debug.LogError("Sprite is null!"); 50 | return; 51 | } 52 | 53 | result.Value = sprite.Value.name; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/StateMachine Customs/DisableThisFSM.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(ActionCategory.StateMachine)] 9 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 10 | [Tooltip("Deactivate the current FSM.")] 11 | public class DisableThisFSM : FsmStateAction 12 | { 13 | public override void OnEnter() 14 | { 15 | Fsm.FsmComponent.enabled = false; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/StateMachine Customs/Editor/SendEventsInspector.cs: -------------------------------------------------------------------------------- 1 | using HutongGames.PlayMaker; 2 | using HutongGames.PlayMaker.Actions; 3 | using HutongGames.PlayMakerEditor; 4 | using UnityEngine; 5 | 6 | [CustomActionEditor(typeof(SendEvents))] 7 | public class SendEventsInspector : CustomActionEditor 8 | { 9 | //store references to the target script 10 | private static SendEvents action; 11 | private PlayMakerFSM thisFSM; 12 | 13 | //set this to true on every change to only update OnGUI when something has differed from the last call 14 | private bool isDirty = false; 15 | 16 | //gets called when interacting with the action window or if something has changed 17 | public override bool OnGUI() 18 | { 19 | //reset isDirty 20 | isDirty = false; 21 | 22 | //get action and FSM reference 23 | action = target as SendEvents; 24 | 25 | EditField("eventTarget"); 26 | 27 | switch(action.eventTarget) 28 | { 29 | case FsmEventTarget.EventTarget.Self: 30 | default: 31 | break; 32 | case FsmEventTarget.EventTarget.GameObject: 33 | EditField("gameObjects"); 34 | EditField("sendToChildren"); 35 | break; 36 | case FsmEventTarget.EventTarget.GameObjectFSM: 37 | EditField("gameObjects"); 38 | EditField("FSMName"); 39 | break; 40 | case FsmEventTarget.EventTarget.FSMComponent: 41 | EditField("fsmComponents"); 42 | break; 43 | case FsmEventTarget.EventTarget.BroadcastAll: 44 | EditField("excludeSelf"); 45 | break; 46 | case FsmEventTarget.EventTarget.HostFSM: 47 | break; 48 | case FsmEventTarget.EventTarget.SubFSMs: 49 | EditField("subFSMName"); 50 | break; 51 | } 52 | 53 | EditField("sendEvent"); 54 | if(action.eventTarget != FsmEventTarget.EventTarget.BroadcastAll 55 | && !action.everyFrame) EditField("delay"); 56 | EditField("everyFrame"); 57 | EditField("updateType"); 58 | 59 | //needs to be at the end and tells OnGUI if something has changed 60 | return isDirty || GUI.changed; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/StateMachine Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## DisableThisFSM.cs 2 | ![Image](/Screenshots/Actions/DisableThisFSM.png) 3 | 4 | ## EnableFms.cs 5 | ![Image](/Screenshots/Actions/EnableFms.png) 6 | 7 | ## GetFsmComponent.cs 8 | ![Image](/Screenshots/Actions/GetFsmComponent.png) 9 | 10 | ## GetGameObjectByFsmVariableValue.cs 11 | ![Image](/Screenshots/Actions/GetGameObjectByFsmVariableValue.png) 12 | 13 | ## RestartThisFSM.cs 14 | ![Image](/Screenshots/Actions/RestartThisFSM.png) 15 | 16 | ## SendEventRandomDelay.cs 17 | ![Image](/Screenshots/Actions/SendEventRandomDelay.png) 18 | 19 | ## SendEvents.cs 20 | ![Image](/Screenshots/Actions/SendEvents.png) 21 | 22 | ## SendEventSetMulti.cs 23 | ![Image](/Screenshots/Actions/SendEventSetMulti.png) 24 | 25 | ## SendEventSetValue.cs 26 | ![Image](/Screenshots/Actions/SendEventSetValue.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/StateMachine Customs/RestartThisFSM.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.StateMachine)] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Restarts the current FSM at the beginning (the Start State) after an optional delay. " + 13 | "NOTE: Make sure to not cause any infinite loops by having a direct " + 14 | "path from the Start State to this action without any delay in between or in this action.")] 15 | public class RestartThisFSM : FsmStateAction 16 | { 17 | [ActionSection("Optional")] 18 | [RequiredField] 19 | public FsmFloat delay; 20 | public bool realTime; 21 | 22 | private float startTime; 23 | private float timer; 24 | 25 | public override void Reset() 26 | { 27 | delay = 0.1f; 28 | realTime = false; 29 | } 30 | 31 | public override void OnEnter() 32 | { 33 | if(delay.Value <= 0) DoRestart(); 34 | 35 | startTime = FsmTime.RealtimeSinceStartup; 36 | timer = 0f; 37 | } 38 | 39 | public override void OnUpdate() 40 | { 41 | if(realTime) 42 | timer = FsmTime.RealtimeSinceStartup - startTime; 43 | else 44 | timer += Time.deltaTime; 45 | 46 | if(timer >= delay.Value) DoRestart(); 47 | } 48 | 49 | void DoRestart() 50 | { 51 | string startState = Fsm.StartState; 52 | Fsm.SetState(startState); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/String Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## BuildStringAutoConvert.cs 2 | ![Image](/Screenshots/Actions/BuildStringAutoConvert.png) 3 | 4 | ## GetStringNumbers.cs 5 | ![Image](/Screenshots/Actions/GetStringNumbers.png) 6 | 7 | ## StringAppend.cs 8 | ![Image](/Screenshots/Actions/StringAppend.png) 9 | 10 | ## StringCompareSetMulti.cs 11 | ![Image](/Screenshots/Actions/StringCompareSetMulti.png) 12 | 13 | ## StringContainsSwitch.cs 14 | ![Image](/Screenshots/Actions/StringContainsSwitch.png) 15 | 16 | ## StringRemove.cs 17 | ![Image](/Screenshots/Actions/StringRemove.png) 18 | 19 | ## StringRemoveChars.cs 20 | ![Image](/Screenshots/Actions/StringRemoveChars.png) 21 | 22 | ## StringReplaceEachChar.cs 23 | ![Image](/Screenshots/Actions/StringReplaceEachChar.png) 24 | 25 | ## StringSwitchCustom.cs 26 | ![Image](/Screenshots/Actions/StringSwitchCustom.png) 27 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/String Customs/StringAppend2.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: Deek 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.String)] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Concatenates two Strings with each other.")] 13 | public class StringAppend2 : FsmStateAction 14 | { 15 | [RequiredField] 16 | [Tooltip("The String to add to.")] 17 | public FsmString _string; 18 | 19 | [RequiredField] 20 | [Tooltip("The String to add.")] 21 | public FsmString stringToAdd; 22 | 23 | [Tooltip("Add the String to the end of the first one instead of the beginning.")] 24 | public FsmBool addToEnd; 25 | 26 | [Tooltip("Wheter to run this action on every frame or only once.")] 27 | public FsmBool everyFrame; 28 | 29 | private string cachedInitString = ""; 30 | 31 | public override void Reset() 32 | { 33 | _string = new FsmString() { UseVariable = true }; 34 | stringToAdd = null; 35 | addToEnd = true; 36 | everyFrame = false; 37 | } 38 | 39 | public override void OnEnter() 40 | { 41 | cachedInitString = _string.Value; 42 | 43 | DoAddString(); 44 | 45 | if(!everyFrame.Value) Finish(); 46 | } 47 | 48 | public override void OnUpdate() 49 | { 50 | if(everyFrame.Value) _string.Value = cachedInitString; 51 | 52 | DoAddString(); 53 | } 54 | 55 | private void DoAddString() 56 | { 57 | if(addToEnd.Value) 58 | _string.Value = _string.Value + stringToAdd.Value; 59 | else 60 | _string.Value = stringToAdd.Value + _string.Value; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/String Customs/StringCompareSetMulti.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author: Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.String)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Sets a String value based on the value of another String Variable. Optionally send a No-Match-Event.")] 10 | public class StringCompareSetMulti : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | public FsmString stringToCompare; 15 | 16 | [RequiredField] 17 | [UIHint(UIHint.Variable)] 18 | public FsmString stringToSet; 19 | 20 | [CompoundArray("String Switches", "Compare To", "Set")] 21 | public FsmString[] compare; 22 | public FsmString[] set; 23 | 24 | [Tooltip("Event to raise if no matching Strings found.")] 25 | public FsmEvent NoMatchEvent; 26 | 27 | public FsmBool everyFrame; 28 | 29 | public override void Reset() 30 | { 31 | stringToCompare = null; 32 | stringToSet = null; 33 | compare = new FsmString[0]; 34 | set = new FsmString[0]; 35 | NoMatchEvent = null; 36 | everyFrame = false; 37 | } 38 | 39 | public override void OnEnter() 40 | { 41 | DoStringSwitch(); 42 | 43 | if(!everyFrame.Value) Finish(); 44 | } 45 | 46 | public override void OnUpdate() 47 | { 48 | DoStringSwitch(); 49 | } 50 | 51 | void DoStringSwitch() 52 | { 53 | if(stringToCompare.IsNone) return; 54 | 55 | bool hasFound = false; 56 | 57 | for(int i = 0; i < compare.Length; i++) 58 | { 59 | if(stringToCompare.Value == compare[i].Value) 60 | { 61 | stringToSet.Value = set[i].Value; 62 | hasFound = true; 63 | } 64 | 65 | } 66 | 67 | if(NoMatchEvent != null && hasFound) Fsm.Event(NoMatchEvent); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/String Customs/StringContainsSwitch.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | namespace HutongGames.PlayMaker.Actions 6 | { 7 | [ActionCategory(ActionCategory.String)] 8 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 9 | [Tooltip("Tests a String against Multiple to see if it is within one of them.")] 10 | public class StringContainsSwitch : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.Variable)] 14 | public FsmString stringVariable; 15 | [CompoundArray("String Switches", "Compare String", "Send Event")] 16 | public FsmString[] compareTo; 17 | public FsmEvent[] sendEvent; 18 | [HutongGames.PlayMaker.Tooltip("Event to raise if no matches are found")] 19 | public FsmEvent NoMatchEvent; 20 | public bool everyFrame; 21 | 22 | public override void Reset() 23 | { 24 | stringVariable = null; 25 | compareTo = new FsmString[1]; 26 | sendEvent = new FsmEvent[1]; 27 | NoMatchEvent = null; 28 | everyFrame = false; 29 | } 30 | 31 | public override void OnEnter() 32 | { 33 | DoStringContainsSwitch(); 34 | 35 | if(!everyFrame) 36 | Finish(); 37 | } 38 | 39 | public override void OnUpdate() 40 | { 41 | DoStringContainsSwitch(); 42 | } 43 | 44 | void DoStringContainsSwitch() 45 | { 46 | for(int i = 0; i < compareTo.Length; i++) 47 | { 48 | if(stringVariable.Value.Contains(compareTo[i].Value)) 49 | { 50 | Fsm.Event(sendEvent[i]); 51 | return; 52 | } 53 | 54 | } 55 | if(NoMatchEvent != null) 56 | { 57 | Fsm.Event(NoMatchEvent); 58 | return; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/String Customs/StringSwitchCustom.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace HutongGames.PlayMaker.Actions 3 | { 4 | [ActionCategory(ActionCategory.String)] 5 | [Tooltip("Sends an Event based on the value of a String Variable. Added functionality to send a No-Match-Event.")] 6 | public class StringSwitchCustom : FsmStateAction 7 | { 8 | [RequiredField] 9 | [UIHint(UIHint.Variable)] 10 | public FsmString stringVariable; 11 | [CompoundArray("String Switches", "Compare String", "Send Event")] 12 | public FsmString[] compareTo; 13 | public FsmEvent[] sendEvent; 14 | 15 | [Tooltip("Event to raise if no matches are found")] 16 | public FsmEvent NoMatchEvent; 17 | 18 | public FsmBool everyFrame; 19 | 20 | public override void Reset() 21 | { 22 | stringVariable = null; 23 | compareTo = new FsmString[1]; 24 | sendEvent = new FsmEvent[1]; 25 | NoMatchEvent = null; 26 | everyFrame = false; 27 | } 28 | 29 | public override void OnEnter() 30 | { 31 | DoStringSwitch(); 32 | 33 | if (!everyFrame.Value) 34 | Finish(); 35 | } 36 | 37 | public override void OnUpdate() 38 | { 39 | DoStringSwitch(); 40 | } 41 | 42 | void DoStringSwitch() 43 | { 44 | if (stringVariable.IsNone) 45 | { 46 | return; 47 | } 48 | 49 | for (int i = 0; i < compareTo.Length; i++) 50 | { 51 | if (stringVariable.Value == compareTo[i].Value) 52 | { 53 | Fsm.Event(sendEvent[i]); 54 | return; 55 | } 56 | 57 | } 58 | if (NoMatchEvent != null) 59 | { 60 | Fsm.Event(NoMatchEvent); 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/System & Time Customs/CountupTimer.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Time)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Counts up as long as in current state and ends when leaving the current state.")] 12 | public class CountupTimer : FsmStateAction 13 | { 14 | [RequiredField] 15 | [UIHint(UIHint.Variable)] 16 | [Tooltip("Time since state start.")] 17 | public FsmFloat storeTime; 18 | [Tooltip("Count up TimeScale independent.")] 19 | public FsmBool realTime; 20 | [Tooltip("Pauses the timer when true. Resumes when false again.")] 21 | public FsmBool pause; 22 | [Tooltip("Setting this to true sets the timer back to 0 while counting up. Will set itself back to false once it has reset.")] 23 | public FsmBool reset; 24 | [Tooltip("Sets the timer back to 0 when entering this state. Otherwise continues where left of.")] 25 | public FsmBool restartOnEnter; 26 | 27 | private float startTime; 28 | private float timer; 29 | 30 | public override void Reset() 31 | { 32 | storeTime = 0f; 33 | realTime = false; 34 | pause = false; 35 | reset = false; 36 | restartOnEnter = true; 37 | } 38 | 39 | public override void OnEnter() 40 | { 41 | startTime = FsmTime.RealtimeSinceStartup; 42 | if(restartOnEnter.Value) 43 | { 44 | timer = 0f; 45 | } 46 | } 47 | 48 | public override void OnUpdate() 49 | { 50 | if(pause.Value) 51 | { 52 | return; 53 | } 54 | 55 | if(reset.Value) 56 | { 57 | timer = 0f; 58 | reset.Value = false; 59 | } 60 | 61 | if(realTime.Value) 62 | { 63 | timer = FsmTime.RealtimeSinceStartup - startTime; 64 | } else 65 | { 66 | timer += Time.deltaTime; 67 | } 68 | storeTime.Value = timer; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/System & Time Customs/Editor/README.MD: -------------------------------------------------------------------------------- 1 | ## FindAssetByName.cs 2 | ![Image](/Screenshots/Actions/FindAssetByName.png) 3 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/System & Time Customs/GetFileExtension.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using System.IO; 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory("System")] 11 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 12 | [Tooltip("Returns the file-extension of an Asset at the speficied path.")] 13 | public class GetFileExtension : FsmStateAction 14 | { 15 | [Tooltip("Set the path the file is at, starting after Assets (/Some/File/At/foo.extension).")] 16 | public FsmString path; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("The file-extension.")] 20 | public FsmString extension; 21 | 22 | public override void Reset() 23 | { 24 | path = null; 25 | extension = null; 26 | } 27 | 28 | public override void OnEnter() 29 | { 30 | 31 | if(path.Value != null && path.Value != "") 32 | { 33 | extension.Value = Path.GetExtension(path.Value); 34 | if(extension.IsNone) 35 | { 36 | Debug.LogWarning("GetFileExtension.cs: File couldn't be found!"); 37 | } 38 | } else 39 | { 40 | Debug.LogWarning("GetFileExtension.cs: File-Path is empty!"); 41 | } 42 | 43 | Finish(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/System & Time Customs/GetTimeScale.cs: -------------------------------------------------------------------------------- 1 | // License: Attribution 4.0 International (CC BY 4.0) 2 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 3 | // Author : Deek 4 | 5 | using UnityEngine; 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(ActionCategory.Time)] 10 | [HelpUrl("http://hutonggames.com/playmakerforum/index.php?topic=15458.0")] 11 | [Tooltip("Get the current TimeScale (the time at wich the game operates at).")] 12 | public class GetTimeScale : FsmStateAction 13 | { 14 | [UIHint(UIHint.Variable)] 15 | [Tooltip("Store the current GameTime (1 by default).")] 16 | public FsmFloat currentTimeScale; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("Get the intervall (in s) at wich physics and other fixed frame rate operates.")] 20 | public FsmFloat fixedDeltaTime; 21 | 22 | [Tooltip("Repeat every frame.")] 23 | public bool everyFrame; 24 | 25 | public override void Reset() 26 | { 27 | currentTimeScale = new FsmFloat() { UseVariable = true }; 28 | fixedDeltaTime = null; 29 | everyFrame = false; 30 | } 31 | 32 | public override void OnEnter() 33 | { 34 | DoTimeScale(); 35 | 36 | if(!everyFrame) 37 | { 38 | Finish(); 39 | } 40 | } 41 | public override void OnUpdate() 42 | { 43 | DoTimeScale(); 44 | } 45 | 46 | void DoTimeScale() 47 | { 48 | currentTimeScale.Value = Time.timeScale; 49 | fixedDeltaTime.Value = Time.fixedDeltaTime; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/System & Time Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## CountupTimer.cs 2 | ![Image](/Screenshots/Actions/CountupTimer.png) 3 | 4 | ## GetFileExtension.cs 5 | ![Image](/Screenshots/Actions/GetFileExtension.png) 6 | 7 | ## GetTimeScale.cs 8 | ![Image](/Screenshots/Actions/GetTimeScale.png) 9 | 10 | ## RandomWaitAroundOffset.cs 11 | ![Image](/Screenshots/Actions/RandomWaitAroundOffset.png) 12 | 13 | ## SetPropertyAdvanced.cs 14 | ![Image](/Screenshots/Actions/SetPropertyAdvanced.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/Vector Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## Vector2OperatorAdvanced.cs 2 | ![Image](/Screenshots/Actions/Vector2OperatorAdvanced.png) 3 | 4 | ## Vector3Compare.cs 5 | ![Image](/Screenshots/Actions/Vector3Compare.png) 6 | 7 | ## Vector3OperatorAdvanced.cs 8 | ![Image](/Screenshots/Actions/Vector3OperatorAdvanced.png) 9 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_Templates/Editor/TemplateInspector.cs: -------------------------------------------------------------------------------- 1 | using HutongGames.PlayMaker; 2 | using HutongGames.PlayMaker.Actions; 3 | using HutongGames.PlayMakerEditor; 4 | using System; 5 | using System.Collections.Generic; 6 | using UnityEditor; 7 | using UnityEngine; 8 | 9 | [CustomActionEditor(typeof(Template))] 10 | public class TemplateInspector : CustomActionEditor 11 | { 12 | //store references to the target script 13 | private static Template action; 14 | private PlayMakerFSM thisFSM; 15 | 16 | //set this to true on every change to only update OnGUI when something has differed from the last call 17 | private bool isDirty = false; 18 | 19 | //use this for expensive initialization. Gets called when the target-fsm is selected. 20 | public override void OnEnable() 21 | { 22 | } 23 | 24 | //gets called when interacting with the action window or if something has changed 25 | public override bool OnGUI() 26 | { 27 | //reset isDirty 28 | isDirty = false; 29 | 30 | //get action and FSM reference 31 | action = target as Template; 32 | 33 | //draw default inspector (action-content) if you only want to add to it 34 | isDirty = DrawDefaultInspector(); 35 | //OR only draw single fields (name has to be the exact same as the variable in the base script): 36 | //EditField("gameObject"); 37 | 38 | //blocks everything that follows if in Action Browser (so that no errors happen when getting scene-references) 39 | if(action.Fsm == null || action.Fsm.FsmComponent == null) return false; 40 | 41 | //if you need reference to the FSM-Component: 42 | //thisFSM = action.Fsm.FsmComponent; 43 | 44 | //-- Your main code goes in here ( or before DrawDefaultInspector() ) --// 45 | 46 | //needs to be at the end and tells OnGUI if something has changed 47 | return isDirty || GUI.changed; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_Templates/README.MD: -------------------------------------------------------------------------------- 1 | ## ExampleOverview.cs 2 | ![Image](/Screenshots/Actions/ExampleOverview.png) 3 | 4 | ## Template.cs 5 | ![Image](/Screenshots/Actions/Template.png) 6 | 7 | ## TemplateAdvanced.cs 8 | ![Image](/Screenshots/Actions/TemplateAdvanced.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_Templates/Template.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ ---*/ 5 | 6 | using UnityEngine; 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(ActionCategory.Logic)] 11 | [Tooltip("")] 12 | public class Template : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("")] 16 | public FsmOwnerDefault gameObject; 17 | 18 | //-- insert further variables -- 19 | 20 | [Tooltip("Wheter to repeat this action on every frame or only once.")] 21 | public FsmBool everyFrame; 22 | 23 | private GameObject go; 24 | 25 | public override void Reset() 26 | { 27 | gameObject = null; 28 | //-- insert default values for further variables --// 29 | everyFrame = false; 30 | } 31 | 32 | public override void OnEnter() 33 | { 34 | DoTemplate(); 35 | 36 | if(!everyFrame.Value) Finish(); 37 | } 38 | 39 | public override void OnUpdate() 40 | { 41 | DoTemplate(); 42 | } 43 | 44 | private void DoTemplate() 45 | { 46 | go = Fsm.GetOwnerDefaultTarget(gameObject); 47 | 48 | if(!go) 49 | { 50 | UnityEngine.Debug.LogError("GameObject is null!"); 51 | return; 52 | } 53 | 54 | //-- insert main code --// 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_Templates/TemplateAdvanced.cs: -------------------------------------------------------------------------------- 1 | //License: Attribution 4.0 International (CC BY 4.0) 2 | //Author: 3 | 4 | /*--- __ECO__ __PLAYMAKER__ __ACTION__ 5 | EcoMetaStart 6 | { 7 | "script dependancies":[ 8 | "Assets/PlayMaker Custom Actions/__Internal/FsmStateActionAdvanced.cs" 9 | ] 10 | } 11 | EcoMetaEnd 12 | ---*/ 13 | 14 | using UnityEngine; 15 | 16 | namespace HutongGames.PlayMaker.Actions 17 | { 18 | [ActionCategory(ActionCategory.Logic)] 19 | [Tooltip("")] 20 | public class TemplateAdvanced : FsmStateActionAdvanced 21 | { 22 | [RequiredField] 23 | [Tooltip("")] 24 | public FsmOwnerDefault gameObject; 25 | 26 | //-- insert further variables --// 27 | 28 | private GameObject go; 29 | 30 | public override void Reset() 31 | { 32 | //resets 'everyFrame' and 'updateType' 33 | base.Reset(); 34 | 35 | gameObject = null; 36 | //-- insert default values for further variables --// 37 | go = null; 38 | } 39 | 40 | public override void OnEnter() 41 | { 42 | DoTemplate(); 43 | 44 | if(!everyFrame) Finish(); 45 | } 46 | 47 | public override void OnActionUpdate() 48 | { 49 | DoTemplate(); 50 | } 51 | 52 | private void DoTemplate() 53 | { 54 | go = Fsm.GetOwnerDefaultTarget(gameObject); 55 | 56 | if(!go) 57 | { 58 | LogError("GameObject in " + Owner.name + " (" + Fsm.Name + ") is null!"); 59 | return; 60 | } 61 | 62 | //-- insert main logic --// 63 | 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEAddString.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Concatenates the specified String with the prevalent one. Optionally choose to add it to the end or beginning and save afterwards.")] 10 | public class GDEAddString : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("The String value to add to the one found at the Item- & Field-Name.")] 21 | public FsmString stringToAdd; 22 | 23 | [Tooltip("Wheter to add the string to the end (true) or beginning (false).")] 24 | public FsmBool addToEnd; 25 | 26 | [Tooltip("Wheter to save the GDE data afterwards.")] 27 | public FsmBool save; 28 | 29 | public override void Reset() 30 | { 31 | ItemName = null; 32 | FieldName = null; 33 | stringToAdd = ""; 34 | addToEnd = true; 35 | save = true; 36 | } 37 | 38 | public override void OnEnter() 39 | { 40 | GDEHelpers.AddString(ItemName.Value, FieldName.Value, stringToAdd.Value, addToEnd.Value, save.Value); 41 | Finish(); 42 | } 43 | } 44 | } 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEBoolFlip.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Inverts a GDE bool value and optionally saves the result.")] 10 | public class GDEBoolFlip : FsmStateAction 11 | { 12 | [RequiredField] 13 | public FsmString itemName; 14 | 15 | [RequiredField] 16 | public FsmString fieldName; 17 | 18 | [UIHint(UIHint.Variable)] 19 | [Tooltip("Optionally store the bool variable.")] 20 | public FsmBool storeBoolResult; 21 | 22 | [Tooltip("Save the GDE data after flipping the bool value.")] 23 | public FsmBool save; 24 | 25 | public override void Reset() 26 | { 27 | itemName = null; 28 | fieldName = null; 29 | storeBoolResult = null; 30 | save = true; 31 | } 32 | 33 | public override void OnEnter() 34 | { 35 | storeBoolResult.Value = GDEHelpers.BoolFlip(itemName.Value, fieldName.Value); 36 | 37 | if(save.Value) GDEHelpers.Save(); 38 | Finish(); 39 | } 40 | } 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEBoolTest.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Sends Events based on the value of a bool variable from a GDE Item.")] 10 | public class GDEBoolTest : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("Event to send if the bool variable is True.")] 21 | public FsmEvent isTrueEvent; 22 | 23 | [Tooltip("Event to send if the bool variable is False.")] 24 | public FsmEvent isFalseEvent; 25 | 26 | [Tooltip("Event to send if the Item or Field couldn't have been found.")] 27 | public FsmEvent notFoundEvent; 28 | 29 | [UIHint(UIHint.Variable)] 30 | [Tooltip("Optionally store the bool variable to test.")] 31 | public FsmBool storeBoolResult; 32 | 33 | [Tooltip("Repeat every frame while the state is active.")] 34 | public bool everyFrame; 35 | 36 | public override void Reset() 37 | { 38 | ItemName = null; 39 | FieldName = null; 40 | storeBoolResult = null; 41 | isTrueEvent = null; 42 | isFalseEvent = null; 43 | notFoundEvent = null; 44 | everyFrame = false; 45 | } 46 | 47 | public override void OnEnter() 48 | { 49 | CheckGDEBool(); 50 | 51 | if(!everyFrame) Finish(); 52 | } 53 | 54 | public override void OnUpdate() 55 | { 56 | CheckGDEBool(); 57 | } 58 | 59 | void CheckGDEBool() 60 | { 61 | storeBoolResult.Value = (bool)GDEHelpers.GetFieldValue(ItemName.Value, FieldName.Value); 62 | Fsm.Event(storeBoolResult.Value ? isTrueEvent : isFalseEvent); 63 | } 64 | } 65 | } 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDECountOccurrences.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Returns the amount of all data found by the given search-parameters.")] 10 | public class GDECountOccurrences : FsmStateAction 11 | { 12 | [Tooltip("What type of data to search for.")] 13 | public GDEDataType dataType; 14 | 15 | [RequiredField] 16 | [Tooltip("Search for elements containing this String.")] 17 | public FsmString contains; 18 | 19 | [Tooltip("Only search within this Schema.")] 20 | public FsmString schema; 21 | 22 | [UIHint(UIHint.Variable)] 23 | public FsmInt result; 24 | 25 | public override void Reset() 26 | { 27 | dataType = GDEDataType.Item; 28 | contains = null; 29 | result = null; 30 | } 31 | 32 | public override void OnEnter() 33 | { 34 | result.Value = GDEHelpers.CountOccurrences(dataType, contains.Value, schema.Value); 35 | Finish(); 36 | } 37 | } 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDECreateItem.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | using System.Collections.Generic; 4 | 5 | #if GDE_PLAYMAKER_SUPPORT 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(GDMConstants.ActionCategory)] 10 | [Tooltip("Create an Item in the specified Schema and optionally set it's Value.")] 11 | public class GDECreateItem : FsmStateAction 12 | { 13 | [RequiredField] 14 | [Tooltip("Specify the existing Schema this Item should belong to.")] 15 | public FsmString schema = ""; 16 | 17 | [RequiredField] 18 | [Tooltip("The name of the variable in the target FSM.")] 19 | public FsmString itemName = ""; 20 | 21 | [CompoundArray("Key Amount", "Field Name", "Set Value")] 22 | 23 | [RequiredField] 24 | [Tooltip("The name of the variable in the target FSM.")] 25 | public FsmString[] fieldNames; 26 | 27 | [Tooltip("Optionally apply the desired value to the created Item under the specified Field-Name.")] 28 | public FsmVar[] values; 29 | 30 | [Tooltip("Should be saved afterwards? If not you can still save later, otherwise changes will be discarded when restarting the game/project.")] 31 | public FsmBool save; 32 | 33 | public override void Reset() 34 | { 35 | schema = null; 36 | itemName = null; 37 | fieldNames = new FsmString[0]; 38 | values = new FsmVar[0]; 39 | save = true; 40 | } 41 | 42 | public override void OnEnter() 43 | { 44 | List tmpFieldNames = new List(); 45 | List tmpFieldValues = new List(); 46 | //List tmpFieldTypes = new List(); 47 | 48 | for(int i = 0; i < fieldNames.Length; i++) 49 | { 50 | tmpFieldNames.Add(fieldNames[i].Value); 51 | tmpFieldValues.Add(values[i].GetValue()); 52 | //tmpFieldTypes.Add(GDEHelpers.GetFieldType(itemName.Value, fieldNames[i].Value)); 53 | } 54 | 55 | GDEHelpers.CreateItem(schema.Value, itemName.Value, tmpFieldNames.ToArray(), 56 | tmpFieldValues.ToArray(), null, save.Value); 57 | Finish(); 58 | } 59 | } 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEDebugData.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Debug all GDE Data either from the DataDictionary, the ModifiedData or both. The more data you have, " + 10 | "the longer this action will take, since it throws logs for every element in the dictionaries.")] 11 | public class GDEDebugData : FsmStateAction 12 | { 13 | [Tooltip("Which type of data to debug: DataDictionary contains all pre-defined data and ModifiedData ")] 14 | public GDEDictionary dataType; 15 | 16 | public override void Reset() 17 | { 18 | dataType = GDEDictionary.DataDictionary; 19 | } 20 | 21 | public override void OnEnter() 22 | { 23 | GDEHelpers.DebugDictionary(dataType); 24 | Finish(); 25 | } 26 | } 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEFind.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | using System.Collections.Generic; 4 | 5 | #if GDE_PLAYMAKER_SUPPORT 6 | 7 | namespace HutongGames.PlayMaker.Actions 8 | { 9 | [ActionCategory(GDMConstants.ActionCategory)] 10 | [Tooltip("Returns an array of all data found by the given search-parameters.")] 11 | public class GDEFind : FsmStateAction 12 | { 13 | [Tooltip("What type of data to search for.")] 14 | public GDEDataType dataType; 15 | 16 | [CompoundArray("Search-Parameters", "Search Type", "String")] 17 | [Tooltip("")] 18 | public SearchType[] searchType; 19 | 20 | [Tooltip("What to search by the given search type.")] 21 | public FsmString[] searchBy; 22 | 23 | [UIHint(UIHint.Variable)] 24 | [ArrayEditor(VariableType.String)] 25 | public FsmArray result; 26 | 27 | [Tooltip("Event to send if no Item could be found.")] 28 | public FsmEvent noneFoundEvent; 29 | 30 | public override void Reset() 31 | { 32 | dataType = GDEDataType.Item; 33 | searchType = new SearchType[0]; 34 | searchBy = new FsmString[0]; 35 | result = null; 36 | } 37 | 38 | public override void OnEnter() 39 | { 40 | result.Reset(); 41 | 42 | //convert FsmString[] to string[] 43 | string[] strArr = new string[searchBy.Length]; 44 | 45 | for(int i = 0; i < searchBy.Length; i++) 46 | { 47 | strArr[i] = searchBy[i].Value; 48 | } 49 | 50 | List matchingValues = GDEHelpers.FindAllMatching(dataType, searchType, strArr, "", false); 51 | 52 | if(matchingValues.Count == 0) 53 | Fsm.Event(noneFoundEvent); 54 | else 55 | result.SetArrayContents(matchingValues); 56 | 57 | Finish(); 58 | } 59 | } 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEFloatOperator.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Performs an operation on the specified Field value. Optionally save afterwards.")] 10 | public class GDEFloatOperator : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("What operation should be performed on the field value.")] 21 | public GDEOperation operation; 22 | 23 | [Tooltip("The int value to add to the one found at the Item- & Field-Name.")] 24 | public FsmFloat value; 25 | 26 | [UIHint(UIHint.Variable)] 27 | [Tooltip("Optionally store the new result.")] 28 | public FsmFloat storeResult; 29 | 30 | [Tooltip("Wheter to save the GDE data afterwards.")] 31 | public FsmBool save; 32 | 33 | public override void Reset() 34 | { 35 | ItemName = null; 36 | FieldName = null; 37 | operation = GDEOperation.Add; 38 | value = 1f; 39 | storeResult = null; 40 | save = true; 41 | } 42 | 43 | public override void OnEnter() 44 | { 45 | GDEHelpers.GDEOperator(ItemName.Value, FieldName.Value, GDEFieldType.Float, operation, value.Value); 46 | 47 | if(!storeResult.IsNone) 48 | storeResult.Value = (float)GDEHelpers.GetFieldValue(ItemName.Value, FieldName.Value); 49 | 50 | if(save.Value) GDEHelpers.Save(); 51 | Finish(); 52 | } 53 | } 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEGetItemWithMatchingValues.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | using iDecay.PlayMaker; 4 | using System.Collections.Generic; 5 | 6 | #if GDE_PLAYMAKER_SUPPORT 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(GDMConstants.ActionCategory)] 11 | [Tooltip("Only returns the Item where each of its Field Values matches the given ones. Useful for comparing (crafting-)recipes.")] 12 | public class GDEGetItemWithMatchingValues : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("Name of the Schema that contains the Items to search for.")] 16 | public FsmString schema; 17 | 18 | [RequiredField] 19 | [Tooltip("The names of the Fields to get their value of.")] 20 | public FsmString[] fieldNames; 21 | 22 | [RequiredField] 23 | [Tooltip("The Field Values to compare.")] 24 | public FsmVar[] fieldValues; 25 | 26 | [RequiredField] 27 | [Tooltip("Optionally ingore any Field Value that matches any of these.")] 28 | public FsmVar[] ignoreValues; 29 | 30 | [UIHint(UIHint.Variable)] 31 | [Tooltip("The resulting Item, if any found.")] 32 | public FsmString result; 33 | 34 | [Tooltip("Event to send if no Fields could be found.")] 35 | public FsmEvent noneFoundEvent; 36 | 37 | public override void Reset() 38 | { 39 | schema = null; 40 | fieldNames = new FsmString[0]; 41 | fieldValues = new FsmVar[0]; 42 | ignoreValues = new FsmVar[0]; 43 | result = null; 44 | } 45 | 46 | public override void OnEnter() 47 | { 48 | List fieldValueList = new List(); 49 | 50 | result.Value = GDEHelpers.GetItemWithMatchingValues(schema.Value, fieldNames.ToList(), 51 | fieldValues.ToList(), ignoreValues.ToList()); 52 | 53 | if(string.IsNullOrEmpty(result.Value)) 54 | Fsm.Event(noneFoundEvent); 55 | 56 | Finish(); 57 | } 58 | } 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEGetSchemaByItem.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Store the Schema of the given Item Name.")] 10 | public class GDEGetSchemaByItem : FsmStateAction 11 | { 12 | [Tooltip("The Name of the Item in the Schema.")] 13 | public FsmString itemName; 14 | 15 | [UIHint(UIHint.Variable)] 16 | [Tooltip("The Name of the Schema to store.")] 17 | public FsmString storeSchema; 18 | 19 | public override void Reset() 20 | { 21 | itemName = null; 22 | storeSchema = null; 23 | } 24 | 25 | public override void OnEnter() 26 | { 27 | storeSchema.Value = GDEHelpers.GetSchemaByItem(itemName.Value); 28 | } 29 | } 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEHasFieldValueChanged.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Sends an event if the value of a specific field changed. Especially helpful for debugging.")] 10 | public class GDEHasFieldValueChanged : FsmStateActionAdvanced 11 | { 12 | public FsmString itemName; 13 | public FsmString fieldName; 14 | 15 | [ActionSection("Result")] 16 | [Tooltip("Wheter the field value changed.")] 17 | public FsmEvent hasChanged; 18 | 19 | [Tooltip("Wheter the field value didn't change. Leave empty to stay in this state.")] 20 | public FsmEvent hasNotChanged; 21 | 22 | [Tooltip("Debug the previous and current value by throwing their names into the log.")] 23 | public FsmBool debugValues; 24 | 25 | object previousValue; 26 | 27 | public override void Reset() 28 | { 29 | itemName = null; 30 | hasChanged = null; 31 | hasNotChanged = null; 32 | everyFrame = true; 33 | updateType = FrameUpdateSelector.OnUpdate; 34 | debugValues = false; 35 | } 36 | 37 | public override void OnEnter() 38 | { 39 | if(!everyFrame) Finish(); 40 | 41 | previousValue = GDEHelpers.GetFieldValue(itemName.Value, fieldName.Value); 42 | } 43 | 44 | public override void OnActionUpdate() 45 | { 46 | DoCompareToPrevValue(); 47 | } 48 | 49 | void DoCompareToPrevValue() 50 | { 51 | object currentValue = GDEHelpers.GetFieldValue(itemName.Value, fieldName.Value); 52 | 53 | if(previousValue != currentValue) 54 | { 55 | if(debugValues.Value) 56 | { 57 | Log("Previous Value: " + previousValue.ToString()); 58 | Log("Current Value: " + currentValue.ToString()); 59 | } 60 | Fsm.Event(hasChanged); 61 | previousValue = currentValue; 62 | } else 63 | Fsm.Event(hasNotChanged); 64 | } 65 | } 66 | } 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEIntOperator.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Performs an operation on the specified Field value. Optionally save afterwards.")] 10 | public class GDEIntOperator : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("What operation should be performed on the field value.")] 21 | public GDEOperation operation; 22 | 23 | [Tooltip("The int value to add to the one found at the Item- & Field-Name.")] 24 | public FsmInt value; 25 | 26 | [UIHint(UIHint.Variable)] 27 | [Tooltip("Optionally store the new result.")] 28 | public FsmInt storeResult; 29 | 30 | [Tooltip("Wheter to save the GDE data afterwards.")] 31 | public FsmBool save; 32 | 33 | public override void Reset() 34 | { 35 | ItemName = null; 36 | FieldName = null; 37 | operation = GDEOperation.Add; 38 | value = 1; 39 | storeResult = null; 40 | save = true; 41 | } 42 | 43 | public override void OnEnter() 44 | { 45 | GDEHelpers.GDEOperator(ItemName.Value, FieldName.Value, GDEFieldType.Int, operation, value.Value); 46 | 47 | if(!storeResult.IsNone) 48 | storeResult.Value = (int)GDEHelpers.GetFieldValue(ItemName.Value, FieldName.Value); 49 | 50 | if(save.Value) GDEHelpers.Save(); 51 | Finish(); 52 | } 53 | } 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEListMultipleFieldValues.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | using iDecay.PlayMaker; 4 | using System.Collections.Generic; 5 | 6 | #if GDE_PLAYMAKER_SUPPORT 7 | 8 | namespace HutongGames.PlayMaker.Actions 9 | { 10 | [ActionCategory(GDMConstants.ActionCategory)] 11 | [Tooltip("Returns multiple Field Values by given Item Name and certain Field Names.")] 12 | public class GDEListMultipleFieldValues : FsmStateAction 13 | { 14 | [RequiredField] 15 | [Tooltip("Name of the GDEItem.")] 16 | public FsmString itemName; 17 | 18 | [RequiredField] 19 | [Tooltip("The names of the Fields to get their value of.")] 20 | public FsmString[] fieldNames; 21 | 22 | [RequiredField] 23 | [UIHint(UIHint.Variable)] 24 | public FsmArray result; 25 | 26 | [Tooltip("Event to send if no Fields could be found.")] 27 | public FsmEvent noneFoundEvent; 28 | 29 | public override void Reset() 30 | { 31 | itemName = null; 32 | fieldNames = new FsmString[0]; 33 | result = null; 34 | } 35 | 36 | public override void OnEnter() 37 | { 38 | result.Reset(); 39 | 40 | foreach(var fieldName in fieldNames) 41 | { 42 | result.Add(GDEHelpers.GetFieldValue(itemName.Value, fieldName.Value)); 43 | } 44 | 45 | if(result.Length == 0) 46 | Fsm.Event(noneFoundEvent); 47 | 48 | Finish(); 49 | } 50 | } 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDERemoveItem.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Removes an item from the runtime data.")] 10 | public class GDERemoveItem : FsmStateAction 11 | { 12 | [Tooltip("The Name of the Item to remove.")] 13 | public FsmString itemName; 14 | 15 | [Tooltip("Should be saved afterwards? If not you can still save later, otherwise changes will be discarded when restarting the game/project.")] 16 | public FsmBool save; 17 | 18 | [ActionSection("Result")] 19 | [Tooltip("Wheter removing the item was successful.")] 20 | public FsmEvent success; 21 | 22 | [Tooltip("Wheter removing the item failed.")] 23 | public FsmEvent failure; 24 | 25 | public override void Reset() 26 | { 27 | itemName = null; 28 | save = true; 29 | success = null; 30 | failure = null; 31 | } 32 | 33 | public override void OnEnter() 34 | { 35 | if(GDEHelpers.RemoveItem(itemName.Value, save.Value, false)) 36 | Fsm.Event(success); 37 | else 38 | Fsm.Event(failure); 39 | 40 | Finish(); 41 | } 42 | } 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDERemoveString.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Removes the specified String from the prevalent one. Optionally choose to add it to the end or beginning and save afterwards.")] 10 | public class GDERemoveString : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("The String value to add to the one found at the Item- & Field-Name.")] 21 | public FsmString stringToRemove; 22 | [Tooltip("Wheter to add the string to the end (true) or beginning (false).")] 23 | public FsmBool removeFromEnd; 24 | 25 | [Tooltip("Wheter to save the GDE data afterwards.")] 26 | public FsmBool save; 27 | 28 | public override void Reset() 29 | { 30 | ItemName = null; 31 | FieldName = null; 32 | stringToRemove = ""; 33 | removeFromEnd = true; 34 | save = true; 35 | } 36 | 37 | public override void OnEnter() 38 | { 39 | GDEHelpers.RemoveString(ItemName.Value, FieldName.Value, 40 | stringToRemove.Value, removeFromEnd.Value, save.Value); 41 | Finish(); 42 | } 43 | } 44 | } 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEResetItem.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using GameDataEditor; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Resets the Fields of a GDE Item to their original value.")] 10 | public class GDEResetItem : FsmStateAction 11 | { 12 | [RequiredField] 13 | [UIHint(UIHint.FsmString)] 14 | [Tooltip(GDMConstants.ItemNameTooltip)] 15 | public FsmString ItemName; 16 | 17 | public override void Reset() 18 | { 19 | ItemName = null; 20 | } 21 | 22 | public override void OnEnter() 23 | { 24 | try 25 | { 26 | GDEDataManager.ResetToDefault(ItemName.Value); 27 | } catch(UnityException ex) 28 | { 29 | LogError(string.Format(GDMConstants.ErrorResettingValue, ItemName.Value)); 30 | LogError(ex.ToString()); 31 | } finally 32 | { 33 | Finish(); 34 | } 35 | } 36 | } 37 | } 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDESwapFieldValues.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Swaps the Field values of two Items by Schema.")] 10 | public class GDESwapFieldValues : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString firstItemName; 15 | 16 | [RequiredField] 17 | public FsmString firstFieldName; 18 | 19 | [ActionSection("Swap With")] 20 | [RequiredField] 21 | [Tooltip(GDMConstants.ItemNameTooltip)] 22 | public FsmString secondItemName; 23 | 24 | [RequiredField] 25 | public FsmString secondFieldName; 26 | 27 | [Tooltip("Wheter to save the GDE data afterwards.")] 28 | public FsmBool save; 29 | 30 | public override void Reset() 31 | { 32 | firstItemName = null; 33 | firstFieldName = null; 34 | secondItemName = null; 35 | secondFieldName = null; 36 | save = true; 37 | } 38 | 39 | public override void OnEnter() 40 | { 41 | GDEHelpers.SwapFieldValues(firstItemName.Value, firstFieldName.Value, 42 | secondItemName.Value, secondFieldName.Value, save.Value); 43 | Finish(); 44 | } 45 | } 46 | } 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDESwapItems.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Swaps two items by their name in the same Schema.")] 10 | public class GDESwapItems : FsmStateAction 11 | { 12 | [RequiredField] 13 | public FsmString schema; 14 | 15 | [RequiredField] 16 | [Tooltip(GDMConstants.ItemNameTooltip)] 17 | public FsmString itemName; 18 | 19 | [RequiredField] 20 | [Tooltip("Specify the Item Name that's supposed to swap values with the other one.")] 21 | public FsmString swapWith; 22 | 23 | [Tooltip("Wheter to save the GDE data afterwards.")] 24 | public FsmBool save; 25 | 26 | public override void Reset() 27 | { 28 | schema = null; 29 | itemName = null; 30 | swapWith = null; 31 | save = true; 32 | } 33 | 34 | public override void OnEnter() 35 | { 36 | GDEHelpers.SwapItems(schema.Value, itemName.Value, swapWith.Value, save.Value); 37 | Finish(); 38 | } 39 | } 40 | } 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEVector2Operator.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Performs an operation on the specified Field value. Optionally save afterwards.")] 10 | public class GDEVector2Operator : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("What operation should be performed on the field value.")] 21 | public GDEOperation operation; 22 | 23 | [Tooltip("The Vector2 value to add to the one found at the Item- & Field-Name.")] 24 | public FsmVector2 value; 25 | 26 | [Tooltip("Wheter to save the GDE data afterwards.")] 27 | public FsmBool save; 28 | 29 | public override void Reset() 30 | { 31 | ItemName = null; 32 | FieldName = null; 33 | operation = GDEOperation.Add; 34 | value = UnityEngine.Vector2.one; 35 | save = true; 36 | } 37 | 38 | public override void OnEnter() 39 | { 40 | GDEHelpers.GDEOperator(ItemName.Value, FieldName.Value, GDEFieldType.Vector2, operation, value.Value); 41 | 42 | if(save.Value) GDEHelpers.Save(); 43 | Finish(); 44 | } 45 | } 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEVector3Operator.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Performs an operation on the specified Field value. Optionally save afterwards.")] 10 | public class GDEVector3Operator : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("What operation should be performed on the field value.")] 21 | public GDEOperation operation; 22 | 23 | [Tooltip("The float value to add to the one found at the Item- & Field-Name.")] 24 | public FsmVector3 value; 25 | 26 | [Tooltip("Wheter to save the GDE data afterwards.")] 27 | public FsmBool save; 28 | 29 | public override void Reset() 30 | { 31 | ItemName = null; 32 | FieldName = null; 33 | operation = GDEOperation.Add; 34 | value = UnityEngine.Vector3.one; 35 | save = true; 36 | } 37 | 38 | public override void OnEnter() 39 | { 40 | GDEHelpers.GDEOperator(ItemName.Value, FieldName.Value, GDEFieldType.Vector3, operation, value.Value); 41 | 42 | if(save.Value) GDEHelpers.Save(); 43 | Finish(); 44 | } 45 | } 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/GDE Customs/GDEVector4Operator.cs: -------------------------------------------------------------------------------- 1 | using GameDataEditor; 2 | using iDecay.GDE; 3 | 4 | #if GDE_PLAYMAKER_SUPPORT 5 | 6 | namespace HutongGames.PlayMaker.Actions 7 | { 8 | [ActionCategory(GDMConstants.ActionCategory)] 9 | [Tooltip("Performs an operation on the specified Field value. Optionally save afterwards.")] 10 | public class GDEVector4Operator : FsmStateAction 11 | { 12 | [RequiredField] 13 | [Tooltip(GDMConstants.ItemNameTooltip)] 14 | public FsmString ItemName; 15 | 16 | [RequiredField] 17 | [Tooltip(GDMConstants.FieldNameTooltip)] 18 | public FsmString FieldName; 19 | 20 | [Tooltip("What operation should be performed on the field value.")] 21 | public GDEOperation operation; 22 | 23 | [Tooltip("The float value to add to the one found at the Item- & Field-Name.")] 24 | public UnityEngine.Vector4 value; 25 | 26 | [Tooltip("Wheter to save the GDE data afterwards.")] 27 | public FsmBool save; 28 | 29 | public override void Reset() 30 | { 31 | ItemName = null; 32 | FieldName = null; 33 | operation = GDEOperation.Add; 34 | value = UnityEngine.Vector4.one; 35 | save = true; 36 | } 37 | 38 | public override void OnEnter() 39 | { 40 | GDEHelpers.GDEOperator(ItemName.Value, FieldName.Value, GDEFieldType.Vector4, operation, value); 41 | 42 | if(save.Value) GDEHelpers.Save(); 43 | Finish(); 44 | } 45 | } 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/NGUI Customs/NguiSetSpriteSize.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | [ActionCategory("NGUI Tools")] 7 | [Tooltip("Change the size of a NGUI UISprite component. Alternatively snap to sprite size (if set ignores the size values).")] 8 | public class NguiSetSpriteSize : FsmStateAction 9 | { 10 | [RequiredField] 11 | [CheckForComponent(typeof(UISprite))] 12 | [Tooltip("The target GameObject with the NGUISprite attached.")] 13 | public FsmOwnerDefault target; 14 | 15 | [Tooltip("")] 16 | public FsmVector2 size; 17 | 18 | [Tooltip("Adjust the scale to make it Pixel Perfect.")] 19 | public FsmBool makePixelPerfect; 20 | 21 | [Tooltip("Resize Collider to the UISprite size if any is attached.")] 22 | public FsmBool resizeCollider; 23 | 24 | [Tooltip("Apply changes every frame.")] 25 | public FsmBool everyFrame; 26 | 27 | public override void Reset() 28 | { 29 | target = null; 30 | size = Vector2.zero; 31 | makePixelPerfect = false; 32 | resizeCollider = false; 33 | everyFrame = false; 34 | } 35 | 36 | public override void OnEnter() 37 | { 38 | DoSetDetails(); 39 | if (!everyFrame.Value) 40 | Finish(); 41 | } 42 | 43 | public override void OnUpdate() 44 | { 45 | DoSetDetails(); 46 | } 47 | 48 | void DoSetDetails() 49 | { 50 | var _go = Fsm.GetOwnerDefaultTarget(target); 51 | if (_go == null) 52 | { 53 | return; 54 | } 55 | 56 | UISprite nSprite = _go.GetComponent(); 57 | 58 | nSprite.width = (int)size.Value.x; 59 | nSprite.height = (int)size.Value.y; 60 | 61 | if (makePixelPerfect.Value) 62 | { 63 | nSprite.MakePixelPerfect(); 64 | } 65 | 66 | if (resizeCollider.Value) 67 | { 68 | nSprite.ResizeCollider(); 69 | } 70 | 71 | nSprite.MarkAsChanged(); 72 | } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/NGUI Customs/NguiSetWidgetAlphaMulti.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | [ActionCategory("NGUI")] 7 | [Tooltip("Sets the alpha value of a single or multiple widgets to the same specified alpha.")] 8 | public class NguiSetWidgetAlphaMulti : FsmStateActionAdvanced 9 | { 10 | [RequiredField] 11 | [Tooltip("NGUI Widgets to update. Can be UIWidget, UISprite or UIPanel.")] 12 | public FsmGameObject[] NguiWidgets; 13 | 14 | [RequiredField] 15 | [HasFloatSlider(0, 1)] 16 | [Tooltip("The new alpha to assign to the widgets. Set or ease between 0 and 1.")] 17 | public FsmFloat alpha; 18 | 19 | public override void Reset() 20 | { 21 | base.Reset(); 22 | 23 | NguiWidgets = new FsmGameObject[1]; 24 | alpha = null; 25 | } 26 | 27 | public override void OnEnter() 28 | { 29 | DoSetWidgetsAlpha(); 30 | 31 | if(!everyFrame) 32 | Finish(); 33 | } 34 | 35 | public override void OnActionUpdate() 36 | { 37 | DoSetWidgetsAlpha(); 38 | } 39 | 40 | private void DoSetWidgetsAlpha() 41 | { 42 | // exit if objects are null 43 | if((NguiWidgets == null) || (NguiWidgets.Length == 0) || (alpha == null)) 44 | return; 45 | 46 | // handle each widget 47 | int j = NguiWidgets.Length; 48 | for(int i = 0; i < j; i++) 49 | { 50 | if(!NguiWidgets[i].Value) continue; 51 | 52 | // get the Widget component (one of the base classes for UISprites) 53 | UIWidget NWidget = NguiWidgets[i].Value.GetComponent(); 54 | if(NWidget == null) 55 | { 56 | UIPanel NPanel = NguiWidgets[i].Value.GetComponent(); 57 | if(NPanel == null) 58 | { 59 | Debug.LogWarning(NguiWidgets[i].Value.name + " does not contain any Widget Component!"); 60 | } else 61 | { 62 | NPanel.alpha = alpha.Value; 63 | } 64 | } else 65 | { 66 | NWidget.alpha = alpha.Value; 67 | } 68 | } 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/NGUI Customs/NguiSpriteIsVisible.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | /// 7 | /// Checks if a NGUI UISprite is visible on Screen. 8 | /// 9 | [ActionCategory("NGUI")] 10 | [Tooltip("Checks if a NGUI UISprite is visible on Screen.")] 11 | public class NguiSpriteIsVisible : FsmStateActionAdvanced 12 | { 13 | [RequiredField] 14 | [Tooltip("NGUI Sprite to check")] 15 | public FsmOwnerDefault NguiSprite; 16 | 17 | [Tooltip("Event to send if the Sprite is visible.")] 18 | public FsmEvent trueEvent; 19 | 20 | [Tooltip("Event to send if the Sprite is not visible.")] 21 | public FsmEvent falseEvent; 22 | 23 | [UIHint(UIHint.Variable)] 24 | [Tooltip("Store the result in a bool variable.")] 25 | public FsmBool storeResult; 26 | 27 | public override void Reset() 28 | { 29 | base.Reset(); 30 | 31 | NguiSprite = null; 32 | trueEvent = null; 33 | falseEvent = null; 34 | storeResult = null; 35 | } 36 | 37 | public override void OnEnter() 38 | { 39 | DoCheck(); 40 | 41 | if(!everyFrame) 42 | { 43 | Finish(); 44 | } 45 | } 46 | 47 | public override void OnActionUpdate() 48 | { 49 | DoCheck(); 50 | } 51 | 52 | private void DoCheck() 53 | { 54 | // exit if sprite is null 55 | if(NguiSprite == null) 56 | return; 57 | 58 | // get the UISprite Component 59 | UISprite sprite = Fsm.GetOwnerDefaultTarget(NguiSprite).GetComponent(); 60 | 61 | // exit if no sprite found 62 | if(sprite == null) 63 | { 64 | Debug.LogWarning("No UISprite Component attached to" + Fsm.GetOwnerDefaultTarget(NguiSprite)); 65 | return; 66 | } 67 | var isVisible = sprite.isVisible; 68 | storeResult.Value = isVisible; 69 | Fsm.Event(isVisible ? trueEvent : falseEvent); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /Custom PlayMaker Actions/_ThirdParty/NGUI Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## NguiGetWidgetDetails.cs 2 | ![Image](/Screenshots/Actions/NguiGetWidgetDetails.png) 3 | 4 | ## NguiLabelSetTextAdvanced.cs 5 | ![Image](/Screenshots/Actions/NguiLabelSetTextAdvanced.png) 6 | 7 | ## NguiSetSpriteMultiple.cs 8 | ![Image](/Screenshots/Actions/NguiSetSpriteMultiple.png) 9 | 10 | ## NguiSetSpriteSize.cs 11 | ![Image](/Screenshots/Actions/NguiSetSpriteSize.png) 12 | 13 | ## NguiSetWidgetAlphaMulti.cs 14 | ![Image](/Screenshots/Actions/NguiSetWidgetAlphaMulti.png) 15 | 16 | ## NguiSetWidgetColor.cs 17 | ![Image](/Screenshots/Actions/NguiSetWidgetColor.png) 18 | 19 | ## NguiSetWidgetDetails.cs 20 | ![Image](/Screenshots/Actions/NguiSetWidgetDetails.png) 21 | 22 | ## NguiSpriteIsVisible.cs 23 | ![Image](/Screenshots/Actions/NguiSpriteIsVisible.png) 24 | 25 | ## NguiToolsAddChildAdvanced.cs 26 | ![Image](/Screenshots/Actions/NguiToolsAddChildAdvanced.png) 27 | 28 | ## NguiToolsDestroyMulti.cs 29 | ![Image](/Screenshots/Actions/NguiToolsDestroyMulti.png) -------------------------------------------------------------------------------- /Custom PlayMaker Actions/uGUI Customs/DebugVariableOnScreen.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace HutongGames.PlayMaker.Actions 5 | { 6 | [ActionCategory(ActionCategory.GUI)] 7 | [Tooltip("Display the value of any FSM Variable on screen at runtime at the specified position. Optionally constrain the label size. NOTE: Uses OnGUI so you need a PlayMakerGUI component in the scene.")] 8 | public class DebugVariableOnScreen : FsmStateAction 9 | { 10 | [HideTypeFilter] 11 | [UIHint(UIHint.Variable)] 12 | [Tooltip("The variable to debug.")] 13 | public FsmVar variable; 14 | 15 | [Tooltip("Specify the width and height of the label. If left to 'None' uses the screen width & height (doesn't constrain the label size).")] 16 | public FsmVector2 labelSize; 17 | 18 | [Tooltip("Choose the position of the label, starting from the top left. Positive X goes to the right and positive Y goes down (just experiment during runtime to grasp how it works). If you want several labels under each other, increment by 20.")] 19 | public FsmVector2 labelPosition; 20 | 21 | [Tooltip("Change the size of the font to be bigger or smaller.")] 22 | public FsmInt fontSize; 23 | 24 | private GUIStyle _guiStyle = new GUIStyle(); 25 | 26 | public override void Reset() 27 | { 28 | variable = null; 29 | labelPosition = Vector2.zero; 30 | labelSize = new FsmVector2() { UseVariable = true }; 31 | fontSize = 15; 32 | } 33 | 34 | public override void OnGUI() 35 | { 36 | _guiStyle.fontSize = fontSize.Value; 37 | variable.UpdateValue(); 38 | GUI.Label(new Rect(labelPosition.Value.x, 39 | labelPosition.Value.y, 40 | labelSize.Value.x, 41 | labelSize.Value.y), 42 | variable.DebugString(), 43 | _guiStyle); 44 | } 45 | 46 | public override void OnEnter() 47 | { 48 | if(labelSize.IsNone) 49 | { 50 | labelSize.Value = new Vector2(Screen.width, Screen.height); 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Custom PlayMaker Actions/uGUI Customs/README.MD: -------------------------------------------------------------------------------- 1 | ## DebugVariableOnScreen.cs 2 | ![Image](/Screenshots/Actions/DebugVariableOnScreen.png) 3 | 4 | ## DrawFullscreenColorAdvanced.cs 5 | ![Image](/Screenshots/Actions/DrawFullscreenColorAdvanced.png) -------------------------------------------------------------------------------- /Editor Extensions/Editor/README.MD: -------------------------------------------------------------------------------- 1 | ## CurrentSelectionMenu.cs 2 | ![Image](/Screenshots/Editor/CurrentSelectionMenu.png) 3 | 4 | A custom Menu for all sorts of selection-based actions with shortcuts: 5 | 6 | - Prefab -> Revert to Prefab: Reverts all selected GameObjects to their Prefabs 7 | - Prefab -> Apply Prefab Changes: Apply all changed of the selected GameObjects to their Prefabs 8 | - Prefab -> Disconnect from Prefab: Disconnects selected Prefabs and leaves Instances behind 9 | - Clone -> Clone selected GameObject: Duplicates the currently selected GameObjects without adding the any incrementation like (1), (2), ... and resets position, rotation and scale of the duplicates 10 | - Clone -> Undo Cloning: Removes the last cloned GOs 11 | - Parent -> Select Parent: Jumps to the parent of the currently selected GO 12 | - Parent -> Select all Children: Selects all children of the currently selected GO 13 | - Parent -> Sort Children by Name: Sorts all children of the currently selected GO alphabetically 14 | - Rename selected GameObjects incrementally: Adds an increment from 01, 02, ... to all selected GOs 15 | - Select previous GameObject: Moves one up in the Hirarchy 16 | - Select next GameObject: Moves one down in the Hirarchy 17 | 18 | ## CustomAssetImporter.cs 19 | 20 | Based on [Saper Soher's Custom Asset Importer](http://www.sarpersoher.com/a-custom-asset-importer-for-unity/) Script with added options and comments. 21 | 22 | Customize the Unity Import-Settings to your hearts content. Any option you see in the import settings (selecting a file / asset and see the inspector) can be modified herewith. 23 | -------------------------------------------------------------------------------- /Editor Extensions/Editor/ToolsMenu/README.MD: -------------------------------------------------------------------------------- 1 | ## ToolsScenesMenu.cs 2 | ![Image](/Screenshots/Editor/ToolsScenesMenu.png) 3 | 4 | A custom Menu for several useful Scene-based shortcuts: 5 | 6 | - Scene Summary: The Documentation Example that displays all active scenes and all information about them 7 | - Load Previous Scene: Load the previous Scene from the currently active one (based on Build Index) 8 | - Load Next Scene: Load the next Scene from the currently active one (based on Build Index) 9 | - Load First Scene: Load the first Scene (Build Index = 0) 10 | - Load Second Scene: Load the second Scene (Build Index = 1) 11 | - Load Third Scene: Load the third Scene (Build Index = 2) 12 | - Load Fourth Scene: Load the fourth Scene (Build Index = 3) 13 | - Load Fifth Scene: Load the fifth Scene (Build Index = 4) 14 | - Load Sixth Scene: Load the sixth Scene (Build Index = 5) 15 | - Load Seventh Scene: Load the seventh Scene (Build Index = 6) 16 | - Load Eigth Scene: Load the eigth Scene (Build Index = 7) 17 | - Load Ninth Scene: Load the ninth Scene (Build Index = 8) 18 | - Load Last Scene: Load the last Scene (last Build Index) 19 | 20 | ``` 21 | You should keep in mind that if you load scenes with these options you don't get a prompt for saving a changed scenes, 22 | all changes will be discarded (wich can be boon or bane, depending on wheter you want it or not) 23 | ``` -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | _(More Info on any specific script in its respective folder)_ 2 | 3 | # TOC: 4 | ## 1. Components: 5 | 6 | Any Script that can be attached to GameObjects or Prefabs to extend their functionality. 7 | 8 | ## 2. Custom PlayMaker Actions 9 | 10 | A broad variety of custom Actions for the [PlayMaker Unity-Asset](https://www.assetstore.unity3d.com/en/#!/content/368), sorted in matching categories. 11 | 12 | ## 3. Editor Extensions 13 | 14 | Contains scripts that add to the functionality of the Unity Editor (like Windows or Options) or run in the background. Those that are in the `Editor`-Folder need to be in any `Editor`-Folder under `Assets` to function properly (preferably `Assets\Editor`). -------------------------------------------------------------------------------- /Screenshots/Actions/ActivateComponents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ActivateComponents.png -------------------------------------------------------------------------------- /Screenshots/Actions/ActivateGameObjects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ActivateGameObjects.png -------------------------------------------------------------------------------- /Screenshots/Actions/ActivateGameObjectsAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ActivateGameObjectsAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/ActivateMultipleComponents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ActivateMultipleComponents.png -------------------------------------------------------------------------------- /Screenshots/Actions/AndroidNativeAudioNonRedundantFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/AndroidNativeAudioNonRedundantFile.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayAddGameObjectIfEnabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayAddGameObjectIfEnabled.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayAddIfEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayAddIfEmpty.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayGetRandomAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayGetRandomAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayIsEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayIsEmpty.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayListAddAll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayListAddAll.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayListContainsName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayListContainsName.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayListGetLength.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayListGetLength.png -------------------------------------------------------------------------------- /Screenshots/Actions/ArrayOperator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ArrayOperator.png -------------------------------------------------------------------------------- /Screenshots/Actions/BuildStringAutoConvert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/BuildStringAutoConvert.png -------------------------------------------------------------------------------- /Screenshots/Actions/CompareColors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/CompareColors.png -------------------------------------------------------------------------------- /Screenshots/Actions/ConvertIntToLetter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ConvertIntToLetter.png -------------------------------------------------------------------------------- /Screenshots/Actions/CountupTimer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/CountupTimer.png -------------------------------------------------------------------------------- /Screenshots/Actions/DebugVariableOnScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/DebugVariableOnScreen.png -------------------------------------------------------------------------------- /Screenshots/Actions/DestroyChildren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/DestroyChildren.png -------------------------------------------------------------------------------- /Screenshots/Actions/DisableThisFSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/DisableThisFSM.png -------------------------------------------------------------------------------- /Screenshots/Actions/DrawFullscreenColorAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/DrawFullscreenColorAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/EaseInt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EaseInt.png -------------------------------------------------------------------------------- /Screenshots/Actions/EnableChildren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EnableChildren.png -------------------------------------------------------------------------------- /Screenshots/Actions/EnableChildrenInRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EnableChildrenInRange.png -------------------------------------------------------------------------------- /Screenshots/Actions/EnableCollider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EnableCollider.png -------------------------------------------------------------------------------- /Screenshots/Actions/EnableColliderMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EnableColliderMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/EnableFsms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EnableFsms.png -------------------------------------------------------------------------------- /Screenshots/Actions/EnumGetRandom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/EnumGetRandom.png -------------------------------------------------------------------------------- /Screenshots/Actions/ExampleOverview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ExampleOverview.png -------------------------------------------------------------------------------- /Screenshots/Actions/FindAssetByName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/FindAssetByName.png -------------------------------------------------------------------------------- /Screenshots/Actions/FindChildren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/FindChildren.png -------------------------------------------------------------------------------- /Screenshots/Actions/FindClosestAgent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/FindClosestAgent.png -------------------------------------------------------------------------------- /Screenshots/Actions/FloatCompareRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/FloatCompareRange.png -------------------------------------------------------------------------------- /Screenshots/Actions/FloatFlip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/FloatFlip.png -------------------------------------------------------------------------------- /Screenshots/Actions/FollowMouse2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/FollowMouse2D.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEAddString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEAddString.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEBoolFlip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEBoolFlip.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEBoolTest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEBoolTest.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDECountOccurrences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDECountOccurrences.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDECreateItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDECreateItem.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEFind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEFind.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEFindItemByValue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEFindItemByValue.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEFindItemsByValue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEFindItemsByValue.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEFindItemsByValue2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEFindItemsByValue2.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEFloatOperator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEFloatOperator.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEGetRandomItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEGetRandomItem.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEGetSchemaByItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEGetSchemaByItem.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEHasFieldValueChanged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEHasFieldValueChanged.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEHasItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEHasItem.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEIntOperator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEIntOperator.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDELoadAllItemsBySchema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDELoadAllItemsBySchema.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDELoadAllKeysBySchema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDELoadAllKeysBySchema.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDELoadSchemaList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDELoadSchemaList.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDELoadStringListCustom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDELoadStringListCustom.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDERemoveItem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDERemoveItem.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDERemoveString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDERemoveString.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDESwapFieldValues.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDESwapFieldValues.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDESwapItems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDESwapItems.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEVector2Operator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEVector2Operator.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEVector3Operator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEVector3Operator.png -------------------------------------------------------------------------------- /Screenshots/Actions/GDEVector4Operator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GDEVector4Operator.png -------------------------------------------------------------------------------- /Screenshots/Actions/GOCompareMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GOCompareMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/GameObjectCompareMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GameObjectCompareMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/GameObjectIsVisibleAlternative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GameObjectIsVisibleAlternative.png -------------------------------------------------------------------------------- /Screenshots/Actions/GameObjectIsVisibleAlternative2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GameObjectIsVisibleAlternative2D.png -------------------------------------------------------------------------------- /Screenshots/Actions/GameObjectKeepActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GameObjectKeepActive.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetAudioClipLength.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetAudioClipLength.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetAudioClipName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetAudioClipName.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetAudioProgress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetAudioProgress.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetChildCountAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetChildCountAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetChildren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetChildren.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetDeviceLinearAcceleration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetDeviceLinearAcceleration.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetDeviceRollCustom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetDeviceRollCustom.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetEnumAsArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetEnumAsArray.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetFileExtension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetFileExtension.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetFsmComponent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetFsmComponent.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetGameObjectByFsmVariableValue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetGameObjectByFsmVariableValue.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetGameObjectScreenPosition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetGameObjectScreenPosition.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetGameObjectSibling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetGameObjectSibling.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetGravity2dScale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetGravity2dScale.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetLastChild.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetLastChild.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetMultilevelGameObject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetMultilevelGameObject.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetObjectName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetObjectName.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetPercentageInt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetPercentageInt.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetPositionAddOffset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetPositionAddOffset.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetRotationAddOffset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetRotationAddOffset.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetRuntimeAnimatorController.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetRuntimeAnimatorController.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetScaleAddOffset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetScaleAddOffset.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetStringNumbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetStringNumbers.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetTimeScale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetTimeScale.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetUnsignedFloat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetUnsignedFloat.png -------------------------------------------------------------------------------- /Screenshots/Actions/GetUnsignedInt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/GetUnsignedInt.png -------------------------------------------------------------------------------- /Screenshots/Actions/HasSibling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/HasSibling.png -------------------------------------------------------------------------------- /Screenshots/Actions/IntCompareRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IntCompareRange.png -------------------------------------------------------------------------------- /Screenshots/Actions/IntFlip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IntFlip.png -------------------------------------------------------------------------------- /Screenshots/Actions/IntRoundToNearest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IntRoundToNearest.png -------------------------------------------------------------------------------- /Screenshots/Actions/IntSignTest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IntSignTest.png -------------------------------------------------------------------------------- /Screenshots/Actions/IntSwitchAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IntSwitchAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/IntSwitchAudioClip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IntSwitchAudioClip.png -------------------------------------------------------------------------------- /Screenshots/Actions/IsOnPlatformEvent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/IsOnPlatformEvent.png -------------------------------------------------------------------------------- /Screenshots/Actions/ListGameObjectsInsideCollider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ListGameObjectsInsideCollider.png -------------------------------------------------------------------------------- /Screenshots/Actions/ListGameObjectsInsideCollider2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ListGameObjectsInsideCollider2D.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAcceleration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAcceleration.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAngularSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAngularSpeed.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAreaMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAreaMask.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAutoBraking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAutoBraking.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAutoRepath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAutoRepath.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAutoTraverseOffMeshLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAutoTraverseOffMeshLink.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetAvoidancePriority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetAvoidancePriority.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetBaseOffset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetBaseOffset.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetHeight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetHeight.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetNextPosition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetNextPosition.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetPathEndPosition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetPathEndPosition.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetPathStatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetPathStatus.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetRemainingDistance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetRemainingDistance.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetSpeed.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetStoppingDistance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetStoppingDistance.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentGetVelocity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentGetVelocity.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentHasPath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentHasPath.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentIsOnNavMesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentIsOnNavMesh.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentIsOnOffMeshLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentIsOnOffMeshLink.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentIsPathPending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentIsPathPending.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentMoveTo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentMoveTo.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentPause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentPause.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentResetPath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentResetPath.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentResume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentResume.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetAcceleration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetAcceleration.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetAngularSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetAngularSpeed.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetAutoBraking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetAutoBraking.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetAutoRepath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetAutoRepath.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetAutoTraverseOffMeshLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetAutoTraverseOffMeshLink.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetAvoidancePriority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetAvoidancePriority.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetBaseOffset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetBaseOffset.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetHeight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetHeight.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetSpeed.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentSetVelocity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentSetVelocity.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshAgentWarp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshAgentWarp.png -------------------------------------------------------------------------------- /Screenshots/Actions/NavMeshFindClosestPoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NavMeshFindClosestPoint.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiGetWidgetDetails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiGetWidgetDetails.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiLabelSetTextAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiLabelSetTextAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiSetSpriteMultiple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiSetSpriteMultiple.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiSetSpriteSize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiSetSpriteSize.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiSetWidgetAlphaMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiSetWidgetAlphaMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiSetWidgetColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiSetWidgetColor.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiSetWidgetDetails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiSetWidgetDetails.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiSpriteIsVisible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiSpriteIsVisible.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiToolsAddChildAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiToolsAddChildAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/NguiToolsDestroyMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/NguiToolsDestroyMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomCharacters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomCharacters.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomFloatAroundRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomFloatAroundRange.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomFloatOnSlope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomFloatOnSlope.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomIntAroundRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomIntAroundRange.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomPointBetweenGameObjects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomPointBetweenGameObjects.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomPointOnSlope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomPointOnSlope.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomWaitAroundOffset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomWaitAroundOffset.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomWaitCustom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomWaitCustom.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomWeightedEnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomWeightedEnum.png -------------------------------------------------------------------------------- /Screenshots/Actions/RandomWeightedVector3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RandomWeightedVector3.png -------------------------------------------------------------------------------- /Screenshots/Actions/ResetTransforms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ResetTransforms.png -------------------------------------------------------------------------------- /Screenshots/Actions/RestartThisFSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/RestartThisFSM.png -------------------------------------------------------------------------------- /Screenshots/Actions/SelectRandomAudioClip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SelectRandomAudioClip.png -------------------------------------------------------------------------------- /Screenshots/Actions/SelectRandomObject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SelectRandomObject.png -------------------------------------------------------------------------------- /Screenshots/Actions/SendEventMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SendEventMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/SendEventRandomDelay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SendEventRandomDelay.png -------------------------------------------------------------------------------- /Screenshots/Actions/SendEventSetMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SendEventSetMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/SendEventSetValue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SendEventSetValue.png -------------------------------------------------------------------------------- /Screenshots/Actions/SendEvents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SendEvents.png -------------------------------------------------------------------------------- /Screenshots/Actions/SendRandomEvent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SendRandomEvent.png -------------------------------------------------------------------------------- /Screenshots/Actions/SetGameObjectIfNotNull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SetGameObjectIfNotNull.png -------------------------------------------------------------------------------- /Screenshots/Actions/SetPositions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SetPositions.png -------------------------------------------------------------------------------- /Screenshots/Actions/SetPropertyAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SetPropertyAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/SetRuntimeAnimatorController.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SetRuntimeAnimatorController.png -------------------------------------------------------------------------------- /Screenshots/Actions/SpriteGetName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SpriteGetName.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringAppend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringAppend.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringCompareSetMulti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringCompareSetMulti.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringContainsSwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringContainsSwitch.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringRemove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringRemove.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringRemoveChars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringRemoveChars.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringReplaceEachChar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringReplaceEachChar.png -------------------------------------------------------------------------------- /Screenshots/Actions/StringSwitchCustom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/StringSwitchCustom.png -------------------------------------------------------------------------------- /Screenshots/Actions/SwipeGestureEventAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/SwipeGestureEventAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/Template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/Template.png -------------------------------------------------------------------------------- /Screenshots/Actions/TemplateAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/TemplateAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/ToggleComponent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ToggleComponent.png -------------------------------------------------------------------------------- /Screenshots/Actions/ToggleGameObject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/ToggleGameObject.png -------------------------------------------------------------------------------- /Screenshots/Actions/Vector2OperatorAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/Vector2OperatorAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Actions/Vector3Compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/Vector3Compare.png -------------------------------------------------------------------------------- /Screenshots/Actions/Vector3OperatorAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Actions/Vector3OperatorAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Components/Comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/Comment.png -------------------------------------------------------------------------------- /Screenshots/Components/DebugFSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/DebugFSM.png -------------------------------------------------------------------------------- /Screenshots/Components/DebugSpeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/DebugSpeed.png -------------------------------------------------------------------------------- /Screenshots/Components/DisableOnAwake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/DisableOnAwake.png -------------------------------------------------------------------------------- /Screenshots/Components/DontDestroyDeleteDuplicates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/DontDestroyDeleteDuplicates.png -------------------------------------------------------------------------------- /Screenshots/Components/FPSCounter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/FPSCounter.png -------------------------------------------------------------------------------- /Screenshots/Components/FollowMouseMovement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/FollowMouseMovement.png -------------------------------------------------------------------------------- /Screenshots/Components/GDEInit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/GDEInit.png -------------------------------------------------------------------------------- /Screenshots/Components/NGUIEffects1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/NGUIEffects1.png -------------------------------------------------------------------------------- /Screenshots/Components/RemoveAtRuntime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/RemoveAtRuntime.png -------------------------------------------------------------------------------- /Screenshots/Components/SendEventToFSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/SendEventToFSM.png -------------------------------------------------------------------------------- /Screenshots/Components/SendEventToFSM2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/SendEventToFSM2.png -------------------------------------------------------------------------------- /Screenshots/Components/SendEventToFSMAdvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/SendEventToFSMAdvanced.png -------------------------------------------------------------------------------- /Screenshots/Components/SendEventToFSMAdvanced_OLD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/SendEventToFSMAdvanced_OLD.png -------------------------------------------------------------------------------- /Screenshots/Components/SetGravityClamped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/SetGravityClamped.png -------------------------------------------------------------------------------- /Screenshots/Components/SetNGUILabel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/SetNGUILabel.png -------------------------------------------------------------------------------- /Screenshots/Components/TextureScrolling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Components/TextureScrolling.png -------------------------------------------------------------------------------- /Screenshots/Editor/CurrentSelectionMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Editor/CurrentSelectionMenu.png -------------------------------------------------------------------------------- /Screenshots/Editor/ToolsScenesMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justDeek/Useful-Unity-Utilities/792340acf0e83d1be660aa8025241e7c53cd2b49/Screenshots/Editor/ToolsScenesMenu.png -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-midnight --------------------------------------------------------------------------------