-
#986 `let DataTable = UE.DataTable.Load("DataTable'/Game/StarterContent/DT_Test.DT_Test'") let Test2 = Test1 as UE.TableRowBase; console.log( UE.DataTableFunctionLibrary.GetDataTableRowFromName(DataTable, "2", $ref(Test2)) console.log( 请教一下有没有其他方法能够成功在Ts中查到DataTable数据? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
你认真看issue了吗?这issue就是反馈你这写法崩溃了啊。然后你照抄崩溃写法? |
Beta Was this translation helpful? Give feedback.
不好意思没注意,这样改后确实可以
let TestStruct1 = UE.UserDefinedStruct.Load("UserDefinedStruct'/Game/Blueprints/Type/Struct/Weapon/GunInfo.GunInfo'"); let Test1 = UE.NewStruct(TestStruct1); UE.DataTableFunctionLibrary.Generic_GetDataTableRowFromName(this.GunDataTable, "1001", Test1); const result = Test1 as UE.Game.Blueprints.Type.Struct.Weapon.GunInfo.GunInfo;