共用方式為


了解可互動的元件和腳本

為了進一步瞭解 Interactionables,它提供場景中虛擬人偶與對象之間的互動,建議您檢閱 [抓取]、[按住並擲回互動] 文章,然後查看 Mesh Pavilion 範例中的對象,這些對像是透過包含 Mesh Interactionable SetupMesh Interactionable Body 元件來進行互動。 檢查附加至特定對象的視覺腳本,將為您提供進一步的深入解析。 腳本包含專為 Mesh 製作的標準 Unity 節點和節點的混合。 若要深入瞭解 Mesh 節點,請參閱 可視化腳本節點參考。 展館範例中有很多 GameObject:下列清單和表格應該可讓您更輕鬆地在腳本中尋找可互動的物件和 Mesh 節點。

展館活動

這些是包含 Interactables 之 Pavilion 範例中的活動或物件。

  • 豆袋砰砰
  • 烤棉花糖的火坑
  • 破冰器
  • 選項
  • 球體雕塑
  • 太陽系
  • Globe

物件與 Mesh 可互動安裝元件

  • beanbag_red
  • beanbag_blue
  • toybox_beanbag_reset_button_variant
  • InteractableSphere
  • Planet_Mars
  • Planet_Earth
  • Planet_Jupiter
  • Reset_Button_Marshmallow_Varient
  • MarshmallowStick
  • Button
  • toybox_play_button_01_varient
  • Planet_Mars
  • Planet_Earth
  • Planet_Jupiter
  • Planet_astronaut_hip
  • Button (ButtonHolder子物件)
  • toybox_play_button_01_varient

具有 Mesh 可互動主體元件的物件

  • beanbag_red
  • beanbag_blue
  • toybox_beanbag_reset_button_variant
  • Reset_Button_Marshmallow_Varient
  • Button (ButtonHolder子物件)
  • toybox_play_button_01_varient

具有 Mesh 物理元件的物件

遊戲對象 元件
重力 軌道重力場
ContainmentField 內含專案欄位
Astronaut_containment 內含專案欄位
浮力 浮點欄位
BeanBags、Marshmallow Holder、Marshmallow_Pos 重設主體轉換
Marshmallow_Pos 重設主體轉換

腳本圖形中使用的網格節點

Microsoft網格:在狀態變更時


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
Campfire Reset_Button_Marshmallow_Varient ResetButton ResetButton
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph
球體雕塑 InteractableSphere SpheresSculptureSphere SpheresSculptureSphere_Simple
破冰船 破冰船 破冰船 破冰船
音樂盒 Radio_Pressable_Prefab 可按下無線電 PressableRadio
音樂盒 toybox_play_button_01_varient PlayButton 腳本 PlayButton_Script

網格可互動主體:已配備


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph


網格可互動主體:的目標是


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph


網格可互動主體:已選取


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
Campfire Reset_Button_Marshmallow_Varient ResetButton ResetButton
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph
球體雕塑 InteractableSphere SpheresSculptureSphere SpheresSculptureSphere_Simple

網格可互動主體:已選取本機


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
破冰船 破冰船 破冰船 破冰船
音樂盒 Radio_Pressable_Prefab 可按下無線電 PressableRadio
音樂盒 toybox_play_button_01_varient PlayButton 腳本 PlayButton_Script

網格可互動主體:IsHovered


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
球體雕塑 InteractableSphere SpheresSculptureSphere SpheresSculptureSphere_Simple
破冰船 破冰船 破冰船 破冰船

重設本文轉換:立即重設本文轉換


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
Campfire Reset_Button_Marshmallow_Varient ResetButton ResetButton

空間音訊屬性:建立


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph
球體雕塑 InteractableSphere SpheresSculptureSphere SpheresSculptureSphere_Simple

Microsoft網格:播放網格音訊


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph
球體雕塑 InteractableSphere SpheresSculptureSphere SpheresSculptureSphere_Simple

Microsoft網格:隨機音效


活動 GameObjects 編寫電腦名稱的腳本 圖形名稱
豆袋 Toss beanbag_red,beanbag_blue BeanBagPower BeanBagGraph