Join our Discord Channel
using UnityEngine;using HutongGames.PlayMaker;[ActionCategory(ActionCategory.GameObject)][Tooltip("Get layer int value from it name")]public class GetLayerIndexFromName : FsmStateAction{ [Tooltip("Make sure the layer exist in your scene and that you dont misstype it name")] public FsmString layerName; [UIHint(UIHint.Variable)] public FsmInt storedlayerIndex; public override void Reset () { layerName = null; storedlayerIndex = null; } public override void OnEnter () { DoGetIndex(); Finish(); } void DoGetIndex() { storedlayerIndex.Value = LayerMask.NameToLayer(layerName.Value); layerName = null; }}