code: func AppendHookOnBeforeUpdate(f func() error) {
  	m.Lock()
  	onBeforeUpdateHooks = append(onBeforeUpdateHooks, f)
  	m.Unlock()
  }
docs: // AppendHookOnBeforeUpdate appends a hook function that is run before the main update function
  // every frame.