-
Notifications
You must be signed in to change notification settings - Fork 17
InteractionRaycast
Tommo J. Phillips edited this page Oct 22, 2023
·
3 revisions
Namespace: TommoJProductions.ModApi.Interactions
Represents an interaction by raycast. []. Interaction functions are called when the player is looking at a gameobject with an InteractionRaycast. Only runs logic when the player is looking at it, otherwise nothing is executed. Helps prevent lot of unity runtime update calls.
public abstract class InteractionRaycast : Interaction
Inheritance Object → Object → Component → Behaviour → MonoBehaviour → Interaction → InteractionRaycast
Represents the string to use.
public virtual string interactionString { get; }
public bool useGUILayout { get; set; }
public bool enabled { get; set; }
public bool isActiveAndEnabled { get; }
public Transform transform { get; }
Transform
public GameObject gameObject { get; }
GameObject
public string tag { get; set; }
public string name { get; set; }
public HideFlags hideFlags { get; set; }
HideFlags
Invokes on interaction enter.
public virtual void onInteractionEnter()
Invokes on interaction update.
public virtual void onInteractionUpdate()
Invokes on interaction exit.
public virtual void onInteractionExit()
Unity runtime on disable.
public virtual void OnDisable()