<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      mini: false, //迷你模式 autoplay: false, //自動播放 theme: '#FADFA3', //主題色 loop: 'all', //音頻循環播放, 可選值: 'all'全部循環, 'one'單曲循環, 'none'不循環 order: 'random', //音頻循環順序, 可選值: 'list'列表循環, 'random'隨機循環 preload: 'auto', //預加載,可選值: 'none', 'metadata', 'auto' volume: 0.7, //默認音量,請注意播放器會記憶用戶設置,用戶手動設置音量后默認音量即失效 mutex: true, //互斥,阻止多個播放器同時播放,當前播放器播放時暫停其他播放器 listFolded: false, //列表默認折疊 listMaxHeight: 90, //列表最大高度 lrcType: 3, //歌詞傳遞方式

      Inventory System Plugin

      新輸入增強系統

      在cs文件中添加Module:
      屏幕截圖 2025-07-28 124056
      添加IMX和Action以及對應的回調函數:
      屏幕截圖 2025-07-28 124030
      先在BeginPlay中將輸入添加到子系統中:
      屏幕截圖 2025-07-28 124041
      創建輸入:
      屏幕截圖 2025-07-28 121145
      屏幕截圖 2025-07-28 121219
      屏幕截圖 2025-07-28 121242
      將Action添加到IMC中并選擇按鍵:
      屏幕截圖 2025-07-28 121322
      在PlayerController中進行賦值:
      屏幕截圖 2025-07-28 121453

      LineTrace for Pickups

      創建自定義Trace Channel,并初始化為Ignore All:
      屏幕截圖 2025-07-28 153927
      創建自定義Collision Preset給PickupItem,并將ItemTrace設置為Block:
      屏幕截圖 2025-07-28 154136
      添加Trace函數:
      屏幕截圖 2025-07-28 175804
      根據屏幕中心點獲取世界位置,然后進行Line Trace,并判斷上一個物品是否和當前物品相同:
      屏幕截圖 2025-07-28 175825
      屏幕截圖 2025-07-28 175833
      將Item的Collision Presets設置為Item:
      屏幕截圖 2025-07-28 154400
      將Item Trace Channel設置為ItemTrace:
      屏幕截圖 2025-07-28 175938

      添加PickUpMessage

      在HUDWidget中創建Show和Hide Message的方法,并在藍圖中實現:
      屏幕截圖 2025-07-28 202708
      屏幕截圖 2025-07-28 202845
      在Trace中調用對應函數:
      屏幕截圖 2025-07-28 202731
      創建ActorComponent類作為Item的Component,并初始化Item的屬性:
      屏幕截圖 2025-07-28 202744
      創建一個以UserWidget為父類的PickupMessageWidget:
      屏幕截圖 2025-07-28 202900
      將PickupMessage拖到HUD中:
      image
      屏幕截圖 2025-07-28 202912
      在ItemComponent中添加Blueprintable,以便創建藍圖類:
      image
      屏幕截圖 2025-07-28 202919
      在Item中添加剛剛創建的BP類ItemComponent:
      屏幕截圖 2025-07-28 202926
      效果:
      屏幕截圖 2025-07-28 202942

      添加高光效果

      創建高光材質:
      屏幕截圖 2025-07-28 203846
      配置材質:
      屏幕截圖 2025-07-28 204228
      創建StaticMeshComponent用于設置高光:
      屏幕截圖 2025-07-28 204557
      屏幕截圖 2025-07-28 204642
      創建Interface用于在其他地方也可以使用高光效果:
      屏幕截圖 2025-07-28 205023
      屏幕截圖 2025-07-28 205054
      在Interface中創建 使用高光 和 關閉高光 的函數:
      屏幕截圖 2025-07-28 212056
      在MeshComponent中實現該函數:
      屏幕截圖 2025-07-28 212158
      屏幕截圖 2025-07-28 212207
      在Trace中獲取 實現了指定接口的組件,即MeshComponent,并調用接口中的Highlight方法:
      屏幕截圖 2025-07-28 212242
      創建MeshComponent的藍圖類
      屏幕截圖 2025-07-28 211346
      屏幕截圖 2025-07-28 211410
      設置MeshComponent:
      屏幕截圖 2025-07-28 211755
      在Item中添加MeshComponent:
      屏幕截圖 2025-07-28 211538

      添加庫存系統

      添加InventoryComponent類:
      屏幕截圖 2025-07-29 105525
      添加一個InventoryWidget的基類:
      屏幕截圖 2025-07-29 112035
      創建子類SpatialInventoryWidget:
      屏幕截圖 2025-07-29 113002
      屏幕截圖 2025-07-29 113103
      在Component中添加 初始化庫存 和 打開關閉庫存 函數:
      屏幕截圖 2025-07-29 133625
      屏幕截圖 2025-07-29 133653
      在PlayerController中添加InputAction:
      屏幕截圖 2025-07-29 133710
      從藍圖中查找InventoryComponent并初始化,綁定Input Action:
      屏幕截圖 2025-07-29 133730
      創建藍圖類的SpatialInventoryWidget:
      屏幕截圖 2025-07-29 120227
      屏幕截圖 2025-07-29 120315
      屏幕截圖 2025-07-29 121156
      在藍圖中創建InventoryComponent:
      屏幕截圖 2025-07-29 120033
      屏幕截圖 2025-07-29 120125
      將MenuClass設置為WBP_SpatialInventoryWidget:
      屏幕截圖 2025-07-29 121057
      在PlayerController中添加InventoryComponent:
      屏幕截圖 2025-07-29 121239
      綁定Input Action:
      屏幕截圖 2025-07-29 125222
      屏幕截圖 2025-07-29 125230
      在PlayerController中配置對應Action:
      屏幕截圖 2025-07-29 125251

      添加不同類型的Grid以及Switcher Button

      添加GridType.h:
      屏幕截圖 2025-07-29 180605
      添加Grid類:
      屏幕截圖 2025-07-29 154333
      初始化對應Gird的Category:
      屏幕截圖 2025-07-29 180646
      創建3個不同類型的Grid、Button以及Switcher,點擊對應的Button時,禁用該Button并切換Grid:
      屏幕截圖 2025-07-29 180502
      創建Grid藍圖類:
      屏幕截圖 2025-07-29 165056
      暫時添加一個Text用于測試:
      屏幕截圖 2025-07-29 174542
      不同的Category對應不同的數字:
      屏幕截圖 2025-07-29 174551
      在InventoryWidget中創建3個Button,1個Switcher包含3個Grid,并設置3個Grid的Item Category:
      屏幕截圖 2025-07-29 174632
      效果:
      屏幕截圖 2025-07-29 174124
      屏幕截圖 2025-07-29 174128
      屏幕截圖 2025-07-29 174131

      添加Grid Slot

      添加GridSlot Widget類:
      屏幕截圖 2025-07-29 191959
      添加Slot的Index以及 設置 和 獲取Index函數:
      屏幕截圖 2025-07-29 222955
      添加Utils工具函數類,專門存放工具函數:
      屏幕截圖 2025-07-29 202852
      存放計算當前格子的索引值的工具函數:
      image
      在Grid中添加Grid Slot并添加Slot的行數、列數、大小,綁定CanvasPanel用于在上面添加Slot:
      屏幕截圖 2025-07-29 225600
      修改:
      上面的行數和列數寫反了:
      image
      上面的i和j寫反了:
      image
      創建Slot藍圖類:
      屏幕截圖 2025-07-29 205445
      屏幕截圖 2025-07-29 205458
      刪除Inventory中的SwicherBackGround:
      屏幕截圖 2025-07-29 210627
      屏幕截圖 2025-07-29 210633
      在Grid中添加BackGround并添加Canvas用于存儲Slot:
      屏幕截圖 2025-07-29 211152
      在Grid中配置Slot對應的參數:
      屏幕截圖 2025-07-29 222820
      配置Slot:
      屏幕截圖 2025-07-29 222708
      還需要在Inventory中分別對3個Grid配置Grid Class:
      屏幕截圖 2025-07-29 212146
      效果:
      屏幕截圖 2025-07-29 222847

      Add Fast Array

      創建FastArray文件:
      屏幕截圖 2025-07-30 110856
      屏幕截圖 2025-07-30 110923
      創建InventoryItem:
      屏幕截圖 2025-07-30 111906
      添加NetCore Model:
      屏幕截圖 2025-07-30 112712
      設置FastArray:
      屏幕截圖 2025-07-30 150336
      屏幕截圖 2025-07-30 150350
      屏幕截圖 2025-07-30 150420
      添加委托:
      屏幕截圖 2025-07-30 150429
      屏幕截圖 2025-07-30 150545

      Add No Room in Inventory

      聲明一個No Room的委托以及一個TryAddItem的函數,并在里面進行NoRoom Broadcast用于測試::
      屏幕截圖 2025-07-30 184013
      添加消息Widget類:
      屏幕截圖 2025-07-30 172924
      添加Text,并在藍圖中添加Show和Hide Message函數定義,通過SetMessage函數讓Text在LifeTime后消失:
      屏幕截圖 2025-07-30 184415
      在HUD中創建并綁定InfoMessage,創建回調函數OnNoRoom并綁定委托:
      屏幕截圖 2025-07-30 184509
      在PlayerController中F鍵按下后,TryAddItem:
      屏幕截圖 2025-07-30 184850
      在藍圖中創建WBP_InfoMessage Widget:
      屏幕截圖 2025-07-30 181430
      為Text創建Fade Animation:
      屏幕截圖 2025-07-30 181913
      設置Show和Hide Message函數:
      屏幕截圖 2025-07-30 182036
      在HUD中添加WBP_InfoMessage:
      屏幕截圖 2025-07-30 182214
      效果:
      屏幕截圖 2025-07-30 183833

      Check Room for Item:

      創建兩個結構體用于存儲數據:
      屏幕截圖 2025-07-30 205528
      在父類BaseInventory中聲明是否有Room的函數,并返回空的SlotAvailabilityResult:
      屏幕截圖 2025-07-30 205641
      在子類SpatialIventory中定義該函數:
      屏幕截圖 2025-07-30 205753
      在TryAddItem中使用該函數判斷是否有空間:
      屏幕截圖 2025-07-30 205905

      Item Manifest

      創建ItemManifest類,用于存儲Item的所有信息:
      屏幕截圖 2025-07-31 115503
      屏幕截圖 2025-07-31 115523
      添加StructUtils Model:
      屏幕截圖 2025-07-31 124531
      屏幕截圖 2025-07-31 164102
      屏幕截圖 2025-07-31 164130
      屏幕截圖 2025-07-31 164211
      屏幕截圖 2025-07-31 164353
      屏幕截圖 2025-07-31 164455
      在ItemComponent中設置Manifest中的Category:
      屏幕截圖 2025-07-31 162514

      Item Type Tags

      添加Tag類:
      屏幕截圖 2025-07-31 165313
      添加GamePlayTags Model:
      屏幕截圖 2025-07-31 165519
      在.h中聲明,在.cpp中定義Tag:
      屏幕截圖 2025-07-31 172111
      在Manifest中添加ItemType:
      屏幕截圖 2025-07-31 172532
      在ItemComponent中設置具體的Item Type:
      屏幕截圖 2025-07-31 171903

      On Item Added

      添加獲取ItemManifest的函數:
      屏幕截圖 2025-07-31 184244
      添加AddItem回調函數,若MatchesCategory則AddItem:
      屏幕截圖 2025-07-31 184538
      如果是服務器,則直接Broadcast:
      屏幕截圖 2025-07-31 184636
      設置FastArray的Component:
      屏幕截圖 2025-07-31 184648

      Item Fragment

      創建ItemFragment類:
      屏幕截圖 2025-08-01 122304
      屏幕截圖 2025-08-01 122418
      創建FragmentTags:
      屏幕截圖 2025-08-01 153832
      屏幕截圖 2025-08-01 153849
      創建父類結構體Fragment,子類結構體GridFragment繼承父類結構體:
      屏幕截圖 2025-08-01 160808
      在Manifest中創建Fragments變量:
      屏幕截圖 2025-08-01 160823
      定義Fragment Tags:
      屏幕截圖 2025-08-01 160836
      在藍圖中設置Fragments:
      屏幕截圖 2025-08-01 155431
      添加子結構體ImageFragment:
      屏幕截圖 2025-08-01 164213
      屏幕截圖 2025-08-01 164227
      屏幕截圖 2025-08-01 163638

      Has Room For Item

      在Grid中添加HasRoomForItem函數并添加重載函數:
      屏幕截圖 2025-08-01 173328
      在SpatialInventory的HasRoomForItem函數中使用switch分別調用對應Grid的HasRoomForItem函數:
      屏幕截圖 2025-08-01 173429

      Add Item to Indices

      屏幕截圖 2025-08-01 201216
      屏幕截圖 2025-08-01 201240
      屏幕截圖 2025-08-01 201333

      Create Widget to add to the grid

      創建Widget類:
      屏幕截圖 2025-08-02 105150
      綁定Image Icon:
      屏幕截圖 2025-08-02 143122
      添加Widget到AddItem中:
      屏幕截圖 2025-08-02 143033

      Add Slotted Items to Canvas

      創建工具函數,通過Index獲取Position:
      屏幕截圖 2025-08-02 160744
      將Slotted Items添加到Canvas中并設置大小和位置:
      屏幕截圖 2025-08-02 160858
      創建SlottedItem Widget藍圖類:
      屏幕截圖 2025-08-02 153157
      屏幕截圖 2025-08-02 153211
      添加Image_Icon:
      屏幕截圖 2025-08-02 153323
      在Grid中設置Slotted Item Class:
      屏幕截圖 2025-08-02 153338
      在測試之前,需要先刪除原先的Item,因為細節面板不會刷新,修改細節面板需要在對應物品的Instance中修改
      效果:
      屏幕截圖 2025-08-02 160525

      Grid Slot Texture

      在Slot中添加GridSlotState,并設置不同的Brush對應不同的State:
      屏幕截圖 2025-08-03 122042
      創建遍歷二維網格的模板函數:
      屏幕截圖 2025-08-03 122135
      為每個Slot設置Texture:
      屏幕截圖 2025-08-03 122151
      在Slot中配置FSlateBrush:
      屏幕截圖 2025-08-03 111300
      效果:
      屏幕截圖 2025-08-03 120006

      Add Stack Count

      創建一個新的子結構Stackable Fragment用于設置 物品的最大存儲容量 和 物品的數量:
      屏幕截圖 2025-08-03 152025
      添加Tag:
      屏幕截圖 2025-08-03 152041
      在SlottedItem中添加Text用于顯示StackCount:
      屏幕截圖 2025-08-03 152125
      用于測試的數據:
      屏幕截圖 2025-08-03 152155
      在創建SlottedItem時UpdateStackCount:
      屏幕截圖 2025-08-03 152215
      在藍圖中設置:
      屏幕截圖 2025-08-03 153213
      添加Text:
      屏幕截圖 2025-08-03 151844
      效果:
      屏幕截圖 2025-08-03 151857

      Update Grid Slot

      屏幕截圖 2025-08-03 163233
      屏幕截圖 2025-08-03 163247

      Add Item in the inventory

      獲取FragmentOfType:
      屏幕截圖 2025-08-04 205559
      判斷是否可以堆疊:
      屏幕截圖 2025-08-04 205654
      屏幕截圖 2025-08-04 221843
      屏幕截圖 2025-08-04 221938
      屏幕截圖 2025-08-04 221947
      屏幕截圖 2025-08-04 222008
      查找第一個與指定類型匹配的物品:
      屏幕截圖 2025-08-04 205425
      屏幕截圖 2025-08-04 222353

      添加當前物品的堆疊總數

      屏幕截圖 2025-08-05 115415
      屏幕截圖 2025-08-05 115431

      Pick up 后 Destroy

      添加可以Mutable函數,即非const函數:
      屏幕截圖 2025-08-05 124306
      添加設置StackCount函數:
      屏幕截圖 2025-08-05 124339
      PickedUp函數:
      屏幕截圖 2025-08-05 124408
      屏幕截圖 2025-08-05 124438
      在藍圖中將Item的Replicates打開,確保在客戶端可以使用:
      屏幕截圖 2025-08-05 123955

      Add Stacks Count

      添加委托,并在添加可堆疊物品時調用:
      屏幕截圖 2025-08-05 150718
      屏幕截圖 2025-08-05 150820
      更新物品和槽位的堆疊數量:
      屏幕截圖 2025-08-05 150947
      效果:
      屏幕截圖 2025-08-05 143217

      創建Hover Item

      創建Widget類:
      屏幕截圖 2025-08-06 114733
      屏幕截圖 2025-08-06 124504
      創建Widget藍圖類:
      屏幕截圖 2025-08-06 123819
      屏幕截圖 2025-08-06 123841
      配置Hover Item:
      屏幕截圖 2025-08-06 124128
      創建InputCore Model:
      屏幕截圖 2025-08-06 142858
      添加點擊事件委托:
      屏幕截圖 2025-08-06 155808
      屏幕截圖 2025-08-06 155844
      綁定委托:
      屏幕截圖 2025-08-06 155913
      屏幕截圖 2025-08-06 155939
      屏幕截圖 2025-08-06 155953
      屏幕截圖 2025-08-06 145151
      效果:
      屏幕截圖 2025-08-06 160036

      添加Tile Parameters

      添加枚舉類型,用于判斷鼠標處于哪個象限:
      屏幕截圖 2025-08-06 171412
      獲取Widget的位置:
      屏幕截圖 2025-08-06 171505
      在Tick中獲取畫布位置和鼠標位置,并傳遞給函數用來更新Tile parameters:
      屏幕截圖 2025-08-06 171523

      Highlight and UnHighlight Hover Item

      創建工具函數,用于獲取Widget Size和判斷鼠標是否處于Canvas內:
      屏幕截圖 2025-08-07 164758
      創建結構體,用于判斷Hover時處于的格子是否有物品:
      屏幕截圖 2025-08-07 164834
      屏幕截圖 2025-08-07 165550
      屏幕截圖 2025-08-07 165344
      屏幕截圖 2025-08-07 164920
      屏幕截圖 2025-08-07 165201
      屏幕截圖 2025-08-07 165247
      屏幕截圖 2025-08-07 165307
      屏幕截圖 2025-08-07 165318
      屏幕截圖 2025-08-07 165326
      將GridSlot中bAvailable默認設置為true:
      image
      將CanvasPanel用Overlay包裹,不然無法計算:
      屏幕截圖 2025-08-07 145624
      效果:
      屏幕截圖 2025-08-07 150742
      屏幕截圖 2025-08-07 151907

      Swap Item

      添加StackCount = Count用于記錄StackCount:
      屏幕截圖 2025-08-09 135742
      添加委托事件,用于處理鼠標進入,離開,點擊GridSlot事件:
      屏幕截圖 2025-08-09 140248
      屏幕截圖 2025-08-09 145721
      屏幕截圖 2025-08-09 145734
      屏幕截圖 2025-08-09 145805
      屏幕截圖 2025-08-09 145844
      屏幕截圖 2025-08-09 145928
      屏幕截圖 2025-08-09 145942
      屏幕截圖 2025-08-09 150000
      屏幕截圖 2025-08-09 150012
      屏幕截圖 2025-08-09 150038
      屏幕截圖 2025-08-09 150049
      屏幕截圖 2025-08-09 150247
      為3類Grid創建不同的鼠標指針:
      屏幕截圖 2025-08-08 201318
      屏幕截圖 2025-08-08 202048
      為3類Grid分別配置Visible和Hidden Cursor Widget Class:
      屏幕截圖 2025-08-09 151156

      ItemPopUpMenu

      創建ItemPopUp類:
      屏幕截圖 2025-08-10 112340
      創建3種委托:
      屏幕截圖 2025-08-10 185402
      屏幕截圖 2025-08-10 185417
      屏幕截圖 2025-08-10 185439
      屏幕截圖 2025-08-10 185455
      判斷物品是否為Consumable:
      屏幕截圖 2025-08-10 185511
      創建設置CanvasPanel的函數:
      屏幕截圖 2025-08-10 185953
      委托的回調函數:
      屏幕截圖 2025-08-10 190008
      綁定ItemPopUp:
      屏幕截圖 2025-08-10 190433
      點擊時隱藏ItemPopUpMenu:
      屏幕截圖 2025-08-10 190451
      屏幕截圖 2025-08-10 190515
      根據不同Item類型創建不同的ItemPopUpMenu:
      屏幕截圖 2025-08-10 190542
      設置CanvasPanel:
      屏幕截圖 2025-08-10 190625
      隱藏PopUpMenu:
      屏幕截圖 2025-08-10 190640
      屏幕截圖 2025-08-10 190701
      創建ItemPopUp藍圖類:
      屏幕截圖 2025-08-10 123534
      屏幕截圖 2025-08-10 123547
      添加SizeBox,Button,Split:
      屏幕截圖 2025-08-10 125223
      配置Item Pop Up Class:
      屏幕截圖 2025-08-10 131129

      Split,Drop,Consume Item

      創建丟棄區域類:
      屏幕截圖 2025-08-11 181956
      創建委托,當在丟棄區域鼠標按下時觸發:
      屏幕截圖 2025-08-11 210859
      創建丟棄函數:
      屏幕截圖 2025-08-11 203519
      設置ItemPopUp的GridIndex:
      屏幕截圖 2025-08-11 203529
      屏幕截圖 2025-08-11 204433
      設置ItemManifest:
      屏幕截圖 2025-08-11 204504
      在ItemManifest中創建當前物品的Class,并添加生成Actor的函數:
      屏幕截圖 2025-08-11 204849
      在Spatial中創建丟棄區域類,并綁定委托,執行丟棄物品函數:
      屏幕截圖 2025-08-11 210842
      在Fragment中創建Consumable Fragment,并創建2個Consumable Fragment的子類:
      屏幕截圖 2025-08-11 210928
      創建Consumable的Tag:
      屏幕截圖 2025-08-11 210941
      將Component Replicates 設置為True:
      屏幕截圖 2025-08-11 163008
      添加Health Fragment 和 Pickup Actor Class:
      屏幕截圖 2025-08-11 203403

      Item Description

      創建ItemDescription Widget類:
      屏幕截圖 2025-08-12 105255
      設置SizeBox:
      屏幕截圖 2025-08-12 143536
      在BaseWidget中創建父函數:
      屏幕截圖 2025-08-12 143551
      判斷是否存在HoverItem:
      屏幕截圖 2025-08-12 143633
      從InventoryComponent中獲取InventoryBaseWidget:
      屏幕截圖 2025-08-12 144732
      創建工具函數,調用OnItemHovered和OnItemUnHovered函數 并 創建獲取控件位置的函數:
      屏幕截圖 2025-08-12 144713
      在SlottedItem中創建鼠標進入和離開函數,分別調用對應的工具函數:
      屏幕截圖 2025-08-12 144903
      在BaseWidget的子類SpatialWidget中添加繼承父類的函數 并 添加描述界面的Class:
      屏幕截圖 2025-08-12 150915
      延遲一段時間后顯示描述界面:
      屏幕截圖 2025-08-12 150954
      屏幕截圖 2025-08-12 151007
      當物品被點擊并處于Hover狀態時,隱藏描述界面:
      屏幕截圖 2025-08-12 143724
      創建Item Description藍圖類:
      屏幕截圖 2025-08-12 110729
      屏幕截圖 2025-08-12 110744
      屏幕截圖 2025-08-12 111436
      設置Item Description Class:
      屏幕截圖 2025-08-12 125537

      Composite Pattern

      創建UInv_CompositeBase基類,定義了組合模式中的通用接口和方法:
      屏幕截圖 2025-08-12 153712
      創建UInv_Composite組合類,繼承自 UInv_CompositeBase:
      屏幕截圖 2025-08-12 162748
      創建UInv_Leaf葉子節點類,繼承自 UInv_CompositeBase:
      屏幕截圖 2025-08-12 173530
      獲取和設置標簽,Collapse和Expand功能,應用函數(ApplyFunction)用于遞歸操作子節點
      屏幕截圖 2025-08-12 175357
      初始化時收集子節點,遞歸調用子節點的 ApplyFunction 和 Collapse
      屏幕截圖 2025-08-12 175408
      直接執行傳入的函數(ApplyFunction)
      屏幕截圖 2025-08-12 175415
      將ItemDescription的父類改為Composite:
      屏幕截圖 2025-08-12 175450

      Assimilate Inventory Fragments

      玩家懸停一個物品時,系統獲取該物品的 Manifest(包含所有片段),通過 AssimilateInventoryFragments將片段同化到描述控件(DescriptionWidget)
      屏幕截圖 2025-08-12 195121
      屏幕截圖 2025-08-12 195131
      屏幕截圖 2025-08-12 195143
      屏幕截圖 2025-08-12 195204

      Image Fragment

      創建Image的葉子節點并繼承自葉子類:
      屏幕截圖 2025-08-12 203048
      創建Image Icon并配置大小:
      屏幕截圖 2025-08-12 211610
      將ImageFragment的父類改為InventoryItemFragment并重寫父類的同化函數:
      屏幕截圖 2025-08-12 211815
      創建Leaf_Image藍圖類:
      屏幕截圖 2025-08-12 210420
      屏幕截圖 2025-08-12 210444
      在Description Widget中添加Leaf Icon Widget 并 配置Fragment Tag:
      屏幕截圖 2025-08-12 211506
      效果:
      屏幕截圖 2025-08-12 211424

      Text Fragment

      創建Leaf_Text類:
      屏幕截圖 2025-08-13 111816
      創建Text:
      屏幕截圖 2025-08-13 141852
      創建Text Fragment,用于在Manifest中修改對應物品的屬性:
      屏幕截圖 2025-08-13 141824
      創建FragmentTag,用于確保LeafText和Item中的TextFragment屬性一致:
      屏幕截圖 2025-08-13 142044
      創建藍圖類:
      屏幕截圖 2025-08-13 122426
      屏幕截圖 2025-08-13 122439
      屏幕截圖 2025-08-13 122615
      設置Leaf_ItemName的FragmentTag:
      屏幕截圖 2025-08-13 122622
      設置ItemManifest的Text和FragmentTag:
      屏幕截圖 2025-08-13 141341
      效果:
      屏幕截圖 2025-08-13 141422

      Labeled Number Fragment

      創建LabeledValue類:
      屏幕截圖 2025-08-13 144210
      設置Text和Value:
      屏幕截圖 2025-08-13 164304
      在父類中添加Manifest繼承函數:
      屏幕截圖 2025-08-13 164745
      添加LabeledNumberFragment并重寫父類的Manifest函數,用于在開始時隨機初始化Value:
      屏幕截圖 2025-08-13 164805
      在Manifest中調用每個Fragment的Manifest函數:
      屏幕截圖 2025-08-13 165033
      創建PrimaryStatFragment:
      屏幕截圖 2025-08-13 165047
      創建藍圖類:
      屏幕截圖 2025-08-13 155807
      屏幕截圖 2025-08-13 160326
      設置Tag:
      屏幕截圖 2025-08-13 160333
      添加到Description Widget中:
      屏幕截圖 2025-08-13 160551
      添加Item的Fragment并設置Tag:
      屏幕截圖 2025-08-13 160748
      效果:
      屏幕截圖 2025-08-13 161230

      添加Consume Modifiers并確保隨機值Value與使用時相同

      更改Consumable的父類為InventoryItemFragment,添加Consumable的子類ConsumeModifiers但子類繼承自LabelNumberFragment,修改Health和Eat的父類為ConsumeModifiers:
      屏幕截圖 2025-08-13 191451
      添加3種屬性標簽:
      屏幕截圖 2025-08-13 191504
      添加一個新的LabeledValue Widget:
      屏幕截圖 2025-08-13 185704
      屏幕截圖 2025-08-13 185747
      屏幕截圖 2025-08-13 185948
      在Description中添加3個StaticModifier并配置對應的Tag:
      屏幕截圖 2025-08-13 191200
      屏幕截圖 2025-08-13 191206
      屏幕截圖 2025-08-13 191212
      在Item中刪除原先的Health Fragment和Labeled Number Fragment 并 添加Consumable Fragment,添加兩個Consume Modifiers:
      屏幕截圖 2025-08-13 191230
      效果:
      屏幕截圖 2025-08-13 191240

      Add more widget

      添加更多的Fragment Tag:
      屏幕截圖 2025-08-13 204424
      添加更多的Widget:
      屏幕截圖 2025-08-13 204650
      添加到Description Widget中:
      屏幕截圖 2025-08-13 204355
      在Item中配置對應Fragment:
      屏幕截圖 2025-08-13 204901

      Add Equipped Grid Slots

      創建以GridSlot為父類的EquippedGridSlot類:
      屏幕截圖 2025-08-15 103413
      在Grid中添加獲取HoverItem的函數:
      屏幕截圖 2025-08-15 123408
      在BaseInventory中添加獲取HoverItem的虛函數:
      屏幕截圖 2025-08-15 123423
      在Spatial中實現父類添加獲取HoverItem的虛函數 并 創建數組以及點擊的回調函數:
      屏幕截圖 2025-08-15 123749
      遍歷所有Widget來獲取EquippedGridSlot并綁定委托:
      屏幕截圖 2025-08-15 123813
      創建工具函數獲取HoverItem:
      屏幕截圖 2025-08-15 123903
      在EquippedGridSlot中通過HoverItem是否與EquipmentTypeTag一致來判斷進入或離開:
      屏幕截圖 2025-08-15 124127
      創建多個藍圖類:
      屏幕截圖 2025-08-15 115806
      屏幕截圖 2025-08-15 120701
      設置每個的Equipment Type Tag:
      屏幕截圖 2025-08-15 120714
      添加到Spatial Widget中:
      屏幕截圖 2025-08-15 123152
      效果:
      屏幕截圖 2025-08-15 123349

      Equip the Cloak

      創建EquippedSlottedItem Widget類并繼承自SlottedItem類:
      屏幕截圖 2025-08-15 175627
      在GridSlot中創建函數用于Create EquippedSlottedItem Widget:
      屏幕截圖 2025-08-15 204143
      創建Equipped Fragment,與Consume Fragment類似:
      屏幕截圖 2025-08-15 204225
      設置EquippedSlottedItem并添加點擊事件:
      屏幕截圖 2025-08-15 204257
      創建工具函數用于獲取InventoryWidget:
      屏幕截圖 2025-08-15 204333
      在InventoryComponent中創建委托并創建EquipSlotClicked的多播函數:
      屏幕截圖 2025-08-15 204412
      在Spatial Widget中設置EquippedGridSlotClicked的綁定函數,并調用InventoryComponent的多播函數:
      屏幕截圖 2025-08-15 205018
      創建EquippedSlottedItem Widget的藍圖類:
      屏幕截圖 2025-08-15 202532
      屏幕截圖 2025-08-15 202545
      為3個EquippedGridSlot都設置Equipped Slotted Item Class:
      屏幕截圖 2025-08-15 202712
      效果:
      屏幕截圖 2025-08-15 203237

      Equip and UnEquip Cloak

      處理EquippedSlot的點擊事件:
      屏幕截圖 2025-08-16 151718
      屏幕截圖 2025-08-16 151747
      屏幕截圖 2025-08-16 151840
      裝備/卸下事件:
      屏幕截圖 2025-08-16 151851

      Bug:切換Gird或關閉庫存會導致HoverItem丟失

      在Component中創建委托,用于判斷Inventory的開關:
      屏幕截圖 2025-08-16 152047
      創建將HoverItem放回去的函數,并為HasRoomForItem添加強制堆疊數量,從而確保HoverItem放回時的數量正確:
      屏幕截圖 2025-08-16 152413
      綁定函數,若庫存關閉,則調用PutHoverItemBack,若沒有Room則DropItem:
      屏幕截圖 2025-08-16 152514
      配置強制指定的數量:
      屏幕截圖 2025-08-16 152946
      若切換Grid,則調用PutHoverItemBack:
      屏幕截圖 2025-08-16 153124

      Bug:格子有物品卻可以放下并重疊

      添加判斷,格子是否為空:
      屏幕截圖 2025-08-16 153001

      Bug:交換物品時,物品位置不對 并且 添加若被點擊物品數量為最大值,則交換物品而不是只交換StackCount:

      屏幕截圖 2025-08-16 153030

      Bug:拾取物品時,若還有剩余,物品剩余數量卻沒有減少 并且 撿起新物品時,也應該判斷是否會有剩余

      屏幕截圖 2025-08-16 161555
      屏幕截圖 2025-08-16 161735

      Equip Component

      創建Equip Component類:
      屏幕截圖 2025-08-18 105119
      通過InventoryComponent綁定委托,并在回調函數中調用EquipmentFragment的Equip函數:
      屏幕截圖 2025-08-18 123326
      創建EquipmentFragment Tag:
      屏幕截圖 2025-08-18 123337
      在EquipmentFragment中創建Manifest函數:
      屏幕截圖 2025-08-18 123403
      將清除HoverItem的函數移動到最后使用:
      屏幕截圖 2025-08-18 123421
      創建EquipComponent藍圖類:
      屏幕截圖 2025-08-18 113230
      屏幕截圖 2025-08-18 113242
      添加到PlayerController中:
      屏幕截圖 2025-08-18 113333
      在Cloak中添加Equipment Fragment:
      屏幕截圖 2025-08-18 115512
      將Cloak改為Replicates:
      屏幕截圖 2025-08-18 115553
      效果:
      屏幕截圖 2025-08-18 121136

      Spawn Equip Actor

      創建EquipActor類用于Spawn:
      屏幕截圖 2025-08-18 125709
      在EquipActor中添加EquipmentType:
      屏幕截圖 2025-08-18 161918
      在EquipmentFragment中添加要Spawn的EquipActorClass和EquipActor和SocketAttachPoint和EquipmentTag,以及Spawn和Destroy的函數:
      屏幕截圖 2025-08-18 161946
      在EquipComponent中添加Spawn和Remove的函數:
      屏幕截圖 2025-08-18 161622
      初始化Inventory Component:
      屏幕截圖 2025-08-18 161637
      屏幕截圖 2025-08-18 161658
      屏幕截圖 2025-08-18 161714
      添加EquipActor藍圖類:
      屏幕截圖 2025-08-18 151413
      cloak的Spawn Item類:
      屏幕截圖 2025-08-18 151428
      添加SkeletalMesh:
      屏幕截圖 2025-08-18 151548
      設置Equipment Tag為Red Cloak:
      屏幕截圖 2025-08-18 151933
      在Equipment Fragment中添加Equip Actor Class:
      屏幕截圖 2025-08-18 151807

      Proxy Mesh

      創建ProxyMeshActor類:
      屏幕截圖 2025-08-18 165723
      在EquipComponent中為ProxyMesh設置函數:
      屏幕截圖 2025-08-18 183004
      屏幕截圖 2025-08-18 183228
      屏幕截圖 2025-08-18 183233
      屏幕截圖 2025-08-18 183243
      創建ProxyMeshActor藍圖類:
      屏幕截圖 2025-08-18 181720
      屏幕截圖 2025-08-18 181745
      效果:
      屏幕截圖 2025-08-18 182254

      Character Display

      創建CharacterDisplay Widget類:
      屏幕截圖 2025-08-18 183636
      獲取ProxyMeshActor的Mesh:
      屏幕截圖 2025-08-18 223200
      通過獲取的Mesh創建新的Mesh并判斷鼠標拖拽時,角色旋轉:
      屏幕截圖 2025-08-18 223331
      在SpatialWidget中創建CharacterDisplay并在鼠標松開或關閉庫存時設置停止拖拽:
      屏幕截圖 2025-08-18 223407
      取消ProxyMeshActor的復制:
      屏幕截圖 2025-08-19 110445
      創建藍圖類:
      屏幕截圖 2025-08-18 195856
      屏幕截圖 2025-08-18 195919
      創建Render Target:
      屏幕截圖 2025-08-18 200217
      屏幕截圖 2025-08-18 200248
      配置大?。?/strong>
      屏幕截圖 2025-08-18 200319
      創建Material并將Texture改為Render Target:
      屏幕截圖 2025-08-18 200639
      為Material設置背景透明:
      屏幕截圖 2025-08-18 215848
      將CharacterDisplay的Image設置為剛剛的材質:
      屏幕截圖 2025-08-18 200802
      在Spatial Widget中添加CharacterDisplay Widget:
      屏幕截圖 2025-08-18 201245
      在ProxyMeshActor中添加SpringArm和SceneCaptureComponent2D,并將Texture設置為Render Target,并隱藏除了Skeletal Mesh以外的:
      屏幕截圖 2025-08-18 215419
      將ProxyMeshActor拖到世界中即可:
      只有在打包后才會在多人游戲中正確運行 或者 取消Run Under One Process進行測試:
      屏幕截圖 2025-08-19 110646
      效果:
      屏幕截圖 2025-08-18 222608

      Bug:在設置另一個ItemDescription時,沒有提前清除上一個的ItemDescription

      獲取所有的子類:
      屏幕截圖 2025-08-19 142928
      設置Visibility時,將所有子類先銷毀:
      屏幕截圖 2025-08-19 142938
      調換兩個函數位置,先銷毀,后同化:
      屏幕截圖 2025-08-19 143013

      將PlayerController的內容移動到新的Actor Component:Inv_InteractComponent,并將其添加到PlayerController中:

      All, with Sensei's permission, I am posting my changes to the plugin. I have moved all the functionality from the PlayerController into a separate component called Inv_InteractComponent. By separating this functionality from the player controller, this makes the plugin attachable to any existing PC with no changes to the PC, unless you have a functional conflict, like the LineTracing, etc. being done previously.

      Instructions:
      Important: If you have been modifying your own PC for your own project, you will need to remove all the course code from it for this to work! If you are worried about bricking your project because it is currently working for you, then don't do this on that project. Do it on a blank project like what we created for the course at the start. I am not liable for you screwing up your existing project - this is intended to augment Sensei Stephen's course as taught.

      BACKUP YOUR PROJECT FIRST
      1. Add the Inv_InteractComponent files to the InventoryManagement/Components public and private folders
      2. Replace your Inv_PlayerController files from the course with the empty ones I have attached if you want a quick replacement. Otherwise create your own empty Inv_PlayerController class, or remove all of the existing interaction code that we put into it.
      3. Compile and launch editor
      4. Make a blueprint of the Inv_InteractComponent class and fill in its fields in the Inventory category
      5. Attach the component to the player controller blueprint alongside the Inv_InventoryComponent

      Important change:
      6) Modify the close button blueprint to call Get Component By Class from the PlayerController, and select Inv_InteractComponent. Then call ToggleInventory from that. Pic is attached.
      WBP_CloseButton_-change

      點擊查看代碼
      // Fill out your copyright notice in the Description page of Project Settings.
      
      // Fill out your copyright notice in the Description page of Project Settings.
      
      #pragma once
      
      #include "CoreMinimal.h"
      #include "Components/ActorComponent.h"
      #include "Inv_InteractComponent.generated.h"
      
      class UInv_InventoryComponent;
      class UInv_HUDWidget;
      class UInputMappingContext;
      class UInputAction;
      
      DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FShortItemDescription, UInv_ItemComponent*, ItemComponent);
      
      UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent), Blueprintable)
      class INVENTORYSYSTEM_API UInv_InteractComponent : public UActorComponent
      {
      	GENERATED_BODY()
      
      public:
      	UInv_InteractComponent();
      	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
      
      	UFUNCTION(BlueprintCallable, Category = "Inventory")
      	void ToggleInventory();
      
      	FShortItemDescription CreateShortItemDescription;
      	FShortItemDescription DestroyShortItemDescription;
      	
      protected:
      	virtual void BeginPlay() override;
      	virtual void SetupInputComponent();
      
      private:
      	void PrimaryInteract();
      	void CreateHUDWidget();
      	void TraceForItem();
      
      	TWeakObjectPtr<UInv_InventoryComponent> InventoryComponent;
      
      	UPROPERTY(EditDefaultsOnly, Category = "Inventory")
      	TObjectPtr<UInputMappingContext> DefaultIMC;
      
      	UPROPERTY(EditDefaultsOnly, Category = "Inventory")
      	TObjectPtr<UInputAction> PrimaryInteractAction;
      
      	UPROPERTY(EditDefaultsOnly, Category = "Inventory")
      	TObjectPtr<UInputAction> ToggleInventoryAction;
      
      	//assign the class for our HUD Widget in the editor
      	UPROPERTY(EditDefaultsOnly, Category = "Inventory")
      	TSubclassOf<UInv_HUDWidget> HUDWidgetClass;
      
      	UPROPERTY()
      	TObjectPtr<UInv_HUDWidget> HUDWidget;
      
      	UPROPERTY(EditDefaultsOnly, Category = "Inventory")
      	double TraceLength;
      
      	// Cannot expose an ENum directly for changing in the editor with UPROPERTY. It muSt be wrapped in a
      	// TEnumAsByte<> for it to appear as a list.
      	UPROPERTY(EditDefaultsOnly, Category = "Inventory")
      	TEnumAsByte<ECollisionChannel> ItemTraceChannel;
      
      	TWeakObjectPtr<AActor> ThisActor; //actor hit in this frame
      	TWeakObjectPtr<AActor> LastActor; //actor hit last frame
      
      };
      
      點擊查看代碼
      // Fill out your copyright notice in the Description page of Project Settings.
      
      
      #include "InventorySystem/InventoryManagement/Components/Inv_InteractComponent.h"
      
      #include "EnhancedInputComponent.h"
      #include "EnhancedInputSubsystems.h"
      #include "InventorySystem/InventoryManagement/Components/Inv_InventoryComponent.h"
      #include "InventorySystem/Interaction/Inv_Highlightable.h"
      #include "InventorySystem/Items/Components/Inv_ItemComponent.h"
      #include "Kismet/GameplayStatics.h"
      #include "InventorySystem/Widgets/HUD/Inv_HUDWidget.h"
      #include "InventorySystem/Widgets/Utils/Inv_WidgetUtils.h"
      
      
      class UEnhancedInputLocalPlayerSubsystem;
      
      UInv_InteractComponent::UInv_InteractComponent()
      {
      	PrimaryComponentTick.bCanEverTick = true;
      	TraceLength = 500.0f;
      	ItemTraceChannel = ECC_GameTraceChannel1;
      }
      
      void UInv_InteractComponent::BeginPlay()
      {
      	Super::BeginPlay();
      	SetupInputComponent();
      	CreateHUDWidget();
      	InventoryComponent = GetOwner()->FindComponentByClass<UInv_InventoryComponent>();
      }
      
      // *********************************************************************************************************
      //   Actor Components do not have a SetupInputComponent function that can be overriden.
      //   Therefore, this is defined manually and called from BeginPlay.
      //   Get the PlayerController this is attached to and then bind actions to the PC's Enhanced Input Component
      // *********************************************************************************************************
      void UInv_InteractComponent::SetupInputComponent()
      {
      	if (const APlayerController* PC = Cast<APlayerController>(GetOwner()))
      	{
      		if (const ULocalPlayer* LocalPlayer = PC->GetLocalPlayer())
      		{
      			if (UEnhancedInputLocalPlayerSubsystem* EISubSystem = LocalPlayer->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>())
      			{
      				EISubSystem->AddMappingContext(DefaultIMC, 0);
      			}
      		}
      
      		// Retrieve the EnhancedInputComponent from the PC
      		if (UEnhancedInputComponent* EIC = Cast<UEnhancedInputComponent>(PC->InputComponent))
      		{
      			// now bind exactly as we did in SetupInputComponent on the PC
      			EIC->BindAction(PrimaryInteractAction, ETriggerEvent::Started,this, &ThisClass::PrimaryInteract);
      			EIC->BindAction(ToggleInventoryAction, ETriggerEvent::Started,this, &ThisClass::ToggleInventory);
      		}
      	}
      }
      
      void UInv_InteractComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
      {
      	//Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
      	TraceForItem();
      }
      
      
      void UInv_InteractComponent::PrimaryInteract()
      {
      	if (!ThisActor.IsValid()) return;
      
      	UInv_ItemComponent* ItemComp = ThisActor->FindComponentByClass<UInv_ItemComponent>();
      	if (!IsValid(ItemComp) || !InventoryComponent.IsValid()) return;
      
      	InventoryComponent->TryAddItem(ItemComp);
      }
      
      void UInv_InteractComponent::CreateHUDWidget()
      {
      	APlayerController* PC = Cast<APlayerController>(GetOwner());
      	if (!PC->IsLocalController()) return; 
      	
      	HUDWidget = CreateWidget<UInv_HUDWidget>(PC, HUDWidgetClass);
      	if (IsValid(HUDWidget))
      	{
      		HUDWidget->AddToViewport();
      	}
      }
      
      void UInv_InteractComponent::ToggleInventory()
      {
      	if (!InventoryComponent.IsValid()) return;
      	InventoryComponent->ToggleInventoryMenu();
      	if (InventoryComponent->IsMenuOpen())
      	{
      		HUDWidget->SetVisibility(ESlateVisibility::Hidden);
      	}
      	else
      	{
      		// 將鼠標指針恢復到中心點
      		if (APlayerController* PC = Cast<APlayerController>(GetOwner()))
      		{
      			FVector2D ViewportSize;
      			GEngine->GameViewport->GetViewportSize(ViewportSize); // 獲取視口大小
      			const FVector2D ViewportCenter = ViewportSize / 2.f; // 獲取中心點位置
      			PC->SetMouseLocation(ViewportCenter.X, ViewportCenter.Y);
      		}
      
      		HUDWidget->SetVisibility(ESlateVisibility::HitTestInvisible);
      	}
      }
      
      
      void UInv_InteractComponent::TraceForItem()
      {
      	if (!IsValid(GEngine) || !IsValid(GEngine->GameViewport)) return;
      
      	const APlayerController* PC = Cast<APlayerController>(GetOwner());
      	
      	FVector2D ViewportSize;
      	GEngine->GameViewport->GetViewportSize(ViewportSize); // 獲取視口大小
      	const FVector2D ViewportCenter = ViewportSize / 2.f; // 獲取中心點位置
      
      	FVector TraceStart;
      	FVector Forward;
      	bool bSuccessful = UGameplayStatics::DeprojectScreenToWorld(PC, ViewportCenter, TraceStart, Forward); // 轉換為世界位置
      	if (!bSuccessful) return;
      
      	const FVector TraceEnd = TraceStart + Forward * TraceLength;
      
      	FHitResult HitResult;
      	GetWorld()->LineTraceSingleByChannel(HitResult, TraceStart, TraceEnd, ItemTraceChannel); // Line Trace
      
      	LastActor = ThisActor;
      	ThisActor = HitResult.GetActor();
      
      	if (!ThisActor.IsValid())
      	{
      		// Hide Message
      		if (IsValid(HUDWidget)) HUDWidget->HidePickupMessage(); 
      	}
      
      	if (ThisActor == LastActor) return;
      
      	if (ThisActor.IsValid())
      	{
      		// High light
      		UActorComponent* Highlightable = ThisActor->FindComponentByInterface(UInv_Highlightable::StaticClass());
      		if (IsValid(Highlightable))
      		{
      			IInv_Highlightable::Execute_Highlight(Highlightable);
      		}
      
      		// Show Message
      		UInv_ItemComponent* ItemComponent = ThisActor->FindComponentByClass<UInv_ItemComponent>();
      		if (IsValid(ItemComponent))
      		{
      			if (IsValid(HUDWidget)) HUDWidget->ShowPickupMessage(ItemComponent->GetPickupMessage());
      			
      			// Create Short ItemDescription
      			CreateShortItemDescription.Broadcast(ItemComponent);
      		}
      		
      	}
      	if (LastActor.IsValid())
      	{
      		// UnHigh light
      		UActorComponent* Highlightable = LastActor->FindComponentByInterface(UInv_Highlightable::StaticClass());
      		if (IsValid(Highlightable))
      		{
      			IInv_Highlightable::Execute_UnHighlight(Highlightable);
      		}
      
      		UInv_ItemComponent* ItemComponent = LastActor->FindComponentByClass<UInv_ItemComponent>();
      		// Destroy Short ItemDescription
      		if (ItemComponent)
      		{
      			DestroyShortItemDescription.Broadcast(ItemComponent);
      		}
      	}
      }
      
      點擊查看代碼
      // Fill out your copyright notice in the Description page of Project Settings.
      
      #pragma once
      
      #include "CoreMinimal.h"
      #include "GameFramework/PlayerController.h"
      #include "Inv_PlayerController.generated.h"
      
      /**
       * 
       */
      UCLASS()
      class INVENTORYSYSTEM_API AInv_PlayerController : public APlayerController
      {
      	GENERATED_BODY()
      
      public:
      	AInv_PlayerController();
      	virtual void Tick(float DeltaSeconds) override;
      
      protected:
      	virtual void BeginPlay() override;
      
      private:
      
      };
      
      點擊查看代碼
      // Fill out your copyright notice in the Description page of Project Settings.
      
      
      #include "InventorySystem/Player/Inv_PlayerController.h"
      
      AInv_PlayerController::AInv_PlayerController()
      {
      	PrimaryActorTick.bCanEverTick = true;
      }
      
      void AInv_PlayerController::Tick(float DeltaSeconds)
      {
      	Super::Tick(DeltaSeconds);
      }
      
      void AInv_PlayerController::BeginPlay()
      {
      	Super::BeginPlay();
      }
      
      
      Instructions
      ========================================
      ** Important: If you have been modifying your own PC for your own project, you will need to remove all the course code from it for this to work! If you are worried about bricking your project because it is currently working for you, don't do this on that project. Do it on a blank project like what we created for the course at the start. I am not liable for you screwing up your exiting project - this is intended to augment Sensei Stephen's course *as is*.
      
      1) Add the Inv_InteractComponent files to the InventoryManagement/Components public and private folders
      2) Replace your Inv_PlayerController files in the course with the empty ones I have attached if you want a quick replacement. Otherwise create your own empty PlayerController class.  
      3) Compile and launch editor
      4) Make a blueprint of the Inv_InteractComponent class and fill in its fields in the Inventory category
      5) Attach the component to the player controller blueprint alongside the Inv_InventoryComponent
      
      ****** Important change:
      6) Modify the close button blueprint to call "Get Component By Class" from the PlayerController, and select Inv_InteractComponent. Then call ToggleInventory from that.
      
      
      Once these changes are made, the plugin can be added to an project.  Just make sure to add both components to the PC and you should be good.
      
      posted @ 2025-07-28 12:52  pone1  閱讀(21)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 日产精品久久久久久久| 97人妻蜜臀中文字幕| 奇米777四色成人影视| 中文字幕99国产精品| 中文字幕国产日韩精品| 国产麻传媒精品国产av| 精品人妻码一区二区三区| 亚洲一区二区三区自拍天堂| 亚洲成a人片在线视频| 欧美不卡无线在线一二三区观| 国产欧美精品一区aⅴ影院| 精品国产午夜肉伦伦影院| 阳春市| 中文字幕无码免费久久9一区9| 97人妻人人揉人人躁人人| 国产毛片精品av一区二区| 色吊丝中文字幕在线观看| 久久精品夜夜夜夜夜久久| 开心激情站一区二区三区| 国产精品一码二码三码四码| 国产精品久久久久久久9999| 久久精品国产99国产精品严洲| 国精品午夜福利不卡视频| 黄色免费在线网址| 美女一区二区三区在线观看视频| 中文字幕国产精品一二区| 成在人线av无码免费高潮水老板| 国产人妇三级视频在线观看| 国产精品丝袜亚洲熟女| а∨天堂一区中文字幕 | 国产偷国产偷亚洲高清午夜| 夜夜高潮次次欢爽av女| 日韩深夜免费在线观看| 天天干天天日| 免费无码AV一区二区波多野结衣| 亚洲精品久久麻豆蜜桃| 2022最新国产在线不卡a| 亚洲一区二区精品极品| 人妻少妇精品系列一区二区| 亚洲一区成人av在线| 亚洲男人第一无码av网|