Scripting API
NAMESPACEMyDreamGameStudio.InteractAnything
MENU PATHAdvanced > Scripting API
COMPATIBILITYUnity 6.0+
DOC VERSION
The framework is designed to be easily extensible. While the Inspector events handle most gameplay mechanics, power users can directly interface with the state machines or write custom input routers.
Direct Input Routing
If you are using a custom mobile UI or a third-party input manager, do not rewrite the global router. Instead, bypass the default polling by calling the trigger methods directly on the InteractionInput Singleton.
// Call this from your custom UI Button's PointerDown event
public void OnMobileInteractButtonPressed()
{
InteractionInput.Instance.TriggerInteractPressed();
}
// Call this from your custom UI Button's PointerUp event
public void OnMobileInteractButtonReleased()
{
InteractionInput.Instance.TriggerInteractReleased();
}