Cardinal
API Reference
Events

Events

Reference documentation for Events.

package systems
 
import "pkg.world.dev/world-engine/cardinal"
 
func exampleSystem(ctx cardinal.WorldContext) {
    ctx.EmitEvent("This is an example event string")
}

Emit Events

The EmitEvent method on cardinal.WorldContext will emit events to all clients under the subject "event".

To see how to receive notifications go here: https://heroiclabs.com/docs/nakama/concepts/notifications/#receive-notifications (opens in a new tab) (Unity)

func (wCtx *WorldContext) EmitEvent(event string)

Parameters

ParameterTypeDescription
eventstringThe string to emit as an event