Hi.
Something like this might work, but i can't test as i do not have this RTG asset
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
using UnityEngine;
using RTG
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("RTG")]
[Tooltip("Adds a value to a Float Variable.")]
public class SetGizmos : FsmStateAction
{
[UIHint(UIHint.Variable)]
[ArrayEditor(VariableType.String)]
public FsmArray moveTargetNames;
public override void Reset()
{
moveTargetNames = new FsmArray { UseVariable = true };
}
public override void OnEnter()
{
foreach (var targetName in moveTargetNames)
{
var transformGizmo = RTGizmosEngine.Get.CreateObjectMoveGizmo();
GameObject targetObject = GameObject.Find(targetName);
transformGizmo.SetTargetObject(targetObject);
transformGizmo.Gizmo.MoveGizmo.SetVertexSnapTargetObjects(new List<GameObject> { targetObject });
transformGizmo.SetTransformSpace(GizmoSpace.Local);
}
Finish();
}
}
}
but GameObject.Findis 'cpu heavy' so its best only to use at the start of a scene especially if you have a lot of objects in the scene