Hello again! I'm trying to write a custom script for an action that I know should work (it's been working fine in normal c# attached to the object). I'm not entirely sure what I'm doing wrong but I'm sure it's just me not understanding playmaker well enough.
The script is as follows;
using UnityEngine;
using HutongGames.PlayMaker;
[ActionCategory("MinimapInfo")]
public class BlueBlip : FsmStateAction
{
public Texture Blip;
Vector3 TargetPosition;
// Code that runs on entering the state.
public override void OnEnter()
{
TargetPosition = transform.position;
}
// Code that runs every frame.
public override void OnUpdate()
{
}
void OnGUI ()
{
GUI.DrawTexture(new Rect(transform.position.x/100*150+81, Screen.height-89 -+transform.position.z/100*150, 8, 8), Blip);
}
}
and the error I get is as follows
Assets/PlayMaker/Actions/MinimapInfo/BlueBlip.cs(13,34): error CS0103: The name `transform' does not exist in the current context
Would anyone be able to shed some light on what I'm doing wrong here?
Thanks,
MattyWS