Giter VIP home page Giter VIP logo

Comments (6)

chexiongsheng avatar chexiongsheng commented on May 23, 2024

试试前面加上UsingUStruct(FVector);

from puerts.

9000miles avatar 9000miles commented on May 23, 2024

试试前面加上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.

chexiongsheng avatar chexiongsheng commented on May 23, 2024

是不是版本问题?puerts_unreal_demo.git的puerts同步到master。找不到GetArgsLen我记得是某个版本的问题,你试试更新到master

from puerts.

9000miles avatar 9000miles commented on May 23, 2024

是不是版本问题?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.

chexiongsheng avatar chexiongsheng commented on May 23, 2024

我说的某个版本,就是v1.0.6p1版本

from puerts.

chexiongsheng avatar chexiongsheng commented on May 23, 2024

我说的就是这个意思,

from puerts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.