Comments (6)
试试前面加上UsingUStruct(FVector);
from puerts.
试试前面加上
UsingUStruct(FVector);
添加了,代码示例如下:
#include "CoreMinimal.h"
#include "Binding.hpp"
#include "UEDataBinding.hpp"
UsingUStruct(FVector);
UsingTSharedPtr(FVector);
struct AutoRegisterForTest
{
AutoRegisterForTest()
{
RegisterTSharedPtr(FVector);
}
};
AutoRegisterForTest __AutoRegisterForTest__;
依然报错:
正如前所述:同样的代码放在 https://github.com/chexiongsheng/puerts_unreal_demo.git 这个项目则不会报错
1> [1/7] Module.PuertsTest.cpp
1>E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(816): error C3861: “GetArg”: 找不到标识符
1> E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(898): note: 查看对正在编译的函数 模板 实例化“bool puerts::internal::FuncCallHelper<API,std::pair<Ret,std::tuple<TSharedPtr<FVector,ESPMode::NotThreadSafe>>>,false,false,true,false>::callExtension<Ins,bool(__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),0,>(Func &,puerts::v8_impl::API::CallbackInfoType,std::integer_sequence<size_t,0>)”的引用
1> with
1> [
1> API=puerts::v8_impl::API,
1> Ret=bool,
1> Ins=FirstDecayType,
1> Func=bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>)
1> ]
1> E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(897): note: 查看对正在编译的函数 模板 实例化“bool puerts::internal::FuncCallHelper<API,std::pair<Ret,std::tuple<TSharedPtr<FVector,ESPMode::NotThreadSafe>>>,false,false,true,false>::callExtension<Ins,bool(__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),0,>(Func &,puerts::v8_impl::API::CallbackInfoType,std::integer_sequence<size_t,0>)”的引用
1> with
1> [
1> API=puerts::v8_impl::API,
1> Ret=bool,
1> Ins=FirstDecayType,
1> Func=bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>)
1> ]
1> E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(970): note: 查看对正在编译的函数 模板 实例化“bool puerts::internal::FuncCallHelper<API,std::pair<Ret,std::tuple<TSharedPtr<FVector,ESPMode::NotThreadSafe>>>,false,false,true,false>::callExtension<FirstDecayType,bool(__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),>(Func &&,puerts::v8_impl::API::CallbackInfoType)”的引用
1> with
1> [
1> API=puerts::v8_impl::API,
1> Ret=bool,
1> Func=bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>)
1> ]
1> E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(970): note: 查看对正在编译的函数 模板 实例化“bool puerts::internal::FuncCallHelper<API,std::pair<Ret,std::tuple<TSharedPtr<FVector,ESPMode::NotThreadSafe>>>,false,false,true,false>::callExtension<FirstDecayType,bool(__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),>(Func &&,puerts::v8_impl::API::CallbackInfoType)”的引用
1> with
1> [
1> API=puerts::v8_impl::API,
1> Ret=bool,
1> Func=bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>)
1> ]
1> E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(976): note: 查看对正在编译的函数 模板 实例化“void puerts::FuncCallWrapper<puerts::v8_impl::API,bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),bool TSharedPtrExtension<FVector>::Equals(const TSharedPtr<FVector,ESPMode::NotThreadSafe>,const TSharedPtr<FVector,ESPMode::NotThreadSafe>),false,true,false>::ExtensionCallHelper<TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>>::call<>(puerts::v8_impl::API::CallbackInfoType)”的引用
1> E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(976): note: 查看对正在编译的函数 模板 实例化“void puerts::FuncCallWrapper<puerts::v8_impl::API,bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),bool TSharedPtrExtension<FVector>::Equals(const TSharedPtr<FVector,ESPMode::NotThreadSafe>,const TSharedPtr<FVector,ESPMode::NotThreadSafe>),false,true,false>::ExtensionCallHelper<TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>>::call<>(puerts::v8_impl::API::CallbackInfoType)”的引用
1> E:\UE\5.2\UnrealPuerts\Plugins\PuertsTest\Source\PuertsTest\Private\SlateBinding.hpp(12): note: 查看对正在编译的函数 模板 实例化“void puerts::FuncCallWrapper<puerts::v8_impl::API,bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),bool TSharedPtrExtension<FVector>::Equals(const TSharedPtr<FVector,ESPMode::NotThreadSafe>,const TSharedPtr<FVector,ESPMode::NotThreadSafe>),false,true,false>::callExtensionWithDefaultValues<>(puerts::v8_impl::API::CallbackInfoType)”的引用
1> E:\UE\5.2\UnrealPuerts\Plugins\PuertsTest\Source\PuertsTest\Private\SlateBinding.hpp(12): note: 查看对正在编译的函数 模板 实例化“void puerts::FuncCallWrapper<puerts::v8_impl::API,bool (__cdecl *)(TSharedPtr<FVector,ESPMode::NotThreadSafe>,TSharedPtr<FVector,ESPMode::NotThreadSafe>),bool TSharedPtrExtension<FVector>::Equals(const TSharedPtr<FVector,ESPMode::NotThreadSafe>,const TSharedPtr<FVector,ESPMode::NotThreadSafe>),false,true,false>::callExtensionWithDefaultValues<>(puerts::v8_impl::API::CallbackInfoType)”的引用
1>E:\UE\5.2\UnrealPuerts\Plugins\Puerts\Source\JsEnv\Public\StaticCall.hpp(819): error C3861: “GetArgsLen”: 找不到标识符
from puerts.
是不是版本问题?puerts_unreal_demo.git的puerts同步到master。找不到GetArgsLen我记得是某个版本的问题,你试试更新到master
from puerts.
是不是版本问题?puerts_unreal_demo.git的puerts同步到master。找不到GetArgsLen我记得是某个版本的问题,你试试更新到master
我可能没说清楚,不是在puerts_unreal_demo.git这个库出的问题,而是Unreal_v1.0.6p1这个版本的插件出了问题,上面的报错都是在Unreal_v1.0.6p1发现的。
另外
demo项目已经更新到master最新提交,但是我发现demo项目的插件并不是Unreal_v1.0.6p1这个版本,在demo项目是OK的,并不会报上面的错误
建议
你可以直接在Unreal_v1.0.6p1插件里添加如下代码测试
#include "CoreMinimal.h"
#include "Binding.hpp"
#include "UEDataBinding.hpp"
UsingUStruct(FVector);
UsingTSharedPtr(FVector);
struct AutoRegisterForTest
{
AutoRegisterForTest()
{
RegisterTSharedPtr(FVector);
}
};
AutoRegisterForTest __AutoRegisterForTest__;
from puerts.
我说的某个版本,就是v1.0.6p1版本
from puerts.
我说的就是这个意思,
from puerts.
Related Issues (20)
- UE4.27 HTML5支持 HOT 10
- Top-level await支持 HOT 6
- [UE] do not support override GameInstance.ReceiveInit 不支持的原因是什么 HOT 1
- [Unity] Bug: 使用NativeAOT编译后,js获取空的c#字符串时会直接崩进程 HOT 20
- [UE] suggestion blueprint.load测试出来的问题 HOT 3
- [UE] nodejs后端只支持node16吗,一些library(如openai-node)不支持node16 HOT 1
- [Unity]重写quickjs backend的模块实现 HOT 3
- linux下libnode.so默认链接libstdc++.so,导致libpuerts.so加载找不到符号 HOT 1
- [Unity]兼容1.0的jsEnv.ExecuteModule<JSObject>("UIEvent.mjs", "")写法
- [Unity]mac下ut偶现崩溃 HOT 6
- [Unity]文件长度为0的module加载时报找不到模块
- [Unity]考虑将Plugin API简化
- [Unity] Bug: 使用backend v8异步加载并实例化wasm会一直挂起 HOT 2
- [UE] Bug: 基于模板的静态绑定,编译报错 C4668 HOT 3
- [Unity] Bug: upm 包的运行时库配置有误 HOT 3
- [Unity] Bug: Crash when trying to access transform or gameObject properties through a JS proxy HOT 4
- [Unity] Bug: Crash on LoadType HOT 3
- [Unity] Bug: WebGL 平台构建出错 HOT 2
- [Unity] 有没有出类似最佳实践的计划
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puerts.