diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..e2eca16 --- /dev/null +++ b/.vscode/launch.json @@ -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": [ + "/**" + ], + //"preLaunchTask": "tsc: build - tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/Config/DefaultPuerts.ini b/Config/DefaultPuerts.ini index 591ac1f..899c4a8 100644 --- a/Config/DefaultPuerts.ini +++ b/Config/DefaultPuerts.ini @@ -3,4 +3,6 @@ [/Script/Puerts.PuertsSetting] AutoModeEnable=True DebugEnable=True +DebugPort=8080 +WaitDebugger=True diff --git a/Source/MingSimulator/MingGameInstance.cpp b/Source/MingSimulator/MingGameInstance.cpp index 034f524..42f5879 100644 --- a/Source/MingSimulator/MingGameInstance.cpp +++ b/Source/MingSimulator/MingGameInstance.cpp @@ -7,6 +7,12 @@ void UMingGameInstance::Init() { Super::Init(); + +} + +void UMingGameInstance::OnStart() +{ + //Super::OnStart(); M_JsEnvManager = MakeShared(FMCJsEnvManager()); M_JsEnvManager->Init(this); } diff --git a/TypeScript/entry.ts b/TypeScript/entry.ts index 3eec0b1..08f4a4d 100644 --- a/TypeScript/entry.ts +++ b/TypeScript/entry.ts @@ -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----------------------') \ No newline at end of file diff --git a/package.json b/package.json index 567c68f..52fba59 100644 --- a/package.json +++ b/package.json @@ -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" } }