Race condition in coil activation

未關閉
#9 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
csharp, unity
領域
game-dev

研究方向

Start by tracing Unity's Player.Start, CoilPlayer.OnStart, CoilPlayer.HandleCoilEvent, and IGameLogicEngine.OnCoilChanged, then reproduce the table script and "Pulse Coil" sequence. Done means the ball spawns reliably regardless of the order in which the relevant startup methods run.

由索引模型根據 Issue 內容生成。

描述

Problem

This script has no effect:
image
This script causes the ball to spawn:
image

Cause

What should happen is:

  1. Player.Start is called by Unity
  2. CoilPlayer.OnStart is called
  3. CoilPlayer.HandleCoilEvent is added as a callback to IGameLogicEngine.OnCoilChanged
  4. The table script starts running and the "Pulse Coil" node is executed
  5. The ball spawns

The problem is that the table script starts running before Player.Start is called and nothing happens because CoilPlayer.HandleCoilEvent does not yet observe IGameLogicEngine.OnCoilChanged. This might be non-deterministic as well because the order of in which Start is called on MonoBehaviours is. Not sure how it is in Visual Scripting.

主要語言
C#
星號
0
分支
1
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

VisualPinball/VisualPinball.Unity.VisualScripting 的其他 Issue

查看 VisualPinball/VisualPinball.Unity.VisualScripting 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。