UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"send message to apply damage"
using UnityEngine; public class MessagePrint : MonoBehaviour { void Start() { /// Calls the function ApplyDamage with a value of 5 SendMessage("ApplyDamage", 5.0); } // Every script attached to the game object // that has a ApplyDamage function will be called. void ApplyDamage(float damage) { print(damage); } }