local actor={}
function actor:ReceiveBeginPlay()
self.bCanEverTick = true
--self.Super:ReceiveBeginPlay()
R1 = FVector(100,100,100)
F1 = self.K2_SetActorLocation(R1)
print(F1)
end
function actor:Tick(reason)
--self.Super:Tick(reason)
--print("2")
R = FRotator(0,0,0.4)
F = self.K2_AddActorLocalRotation(R,false,0,ETeleportType::None)
print(F)
end
function actor:ReceiveTick(dt)
end
return actor
模仿官方Demo瞎写没效果
slua如何入门?
该提问来源于开源项目:Tencent/sluaunreal
在c++类中申明的方法必须要有UFunction() 宏申明才可以在slua 中调用到 ,因为slua是基于ue4反射系统来实现的,而反射需要用Function宏来申明
slua 的self 就是对应C++类的封装
刚才试了下是可以的
如下: