react界面跑通,调试不成功

This commit is contained in:
2024-12-16 13:03:08 +08:00
parent 532e65e6fb
commit c839575748
5 changed files with 34 additions and 3 deletions
+20
View File
@@ -0,0 +1,20 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 8080,
"sourceMaps": true,
"remoteRoot": "${workspaceFolder}/Content/Javascript",
"skipFiles": [
"<node_internals>/**"
],
//"preLaunchTask": "tsc: build - tsconfig.json"
}
]
}
+2
View File
@@ -3,4 +3,6 @@
[/Script/Puerts.PuertsSetting]
AutoModeEnable=True
DebugEnable=True
DebugPort=8080
WaitDebugger=True
@@ -7,6 +7,12 @@
void UMingGameInstance::Init()
{
Super::Init();
}
void UMingGameInstance::OnStart()
{
//Super::OnStart();
M_JsEnvManager = MakeShared<FMCJsEnvManager>(FMCJsEnvManager());
M_JsEnvManager->Init(this);
}
+2
View File
@@ -4,7 +4,9 @@ import {ReactUMG} from 'react-umg';
import * as UI from './ui';
console.log('--------------------------0----------------------')
debugger
//用React来写UI
let world = (argv.getByName("GameInstance") as UE.GameInstance).GetWorld();
ReactUMG.init(world);
UI.Load();
console.log('--------------------------1----------------------')
+4 -3
View File
@@ -12,8 +12,9 @@
},
"author": "MiceCola",
"license": "ISC",
"dependencies":{
"@types/react":"^15.6.6",
"@types/react-reconciler":"^0.18.0"
"dependencies": {
"@types/react": "^15.6.6",
"@types/react-reconciler": "^0.18.0",
"typescript": "^5.7.2"
}
}