U++
笑神552
这个作者很懒,什么都没留下…
展开
-
U++9OnConstruction
virtual void OnConstruction(const FTransform& Transform) override;这个后,构造函数先原创 2022-02-19 16:57:44 · 10841 阅读 · 0 评论 -
U++8带参数的多播代理
其他都和之前一样,不过绑定的方法为,在蓝图中获得触发方的对象指针,使用Bind event to。。。想要在detail里指定触发方,就必须在触发方UClass()里加上BlueprintType并且在定义触发方指针的时候宏定义要加上BlueprintReadWrite...原创 2022-02-19 16:57:02 · 67 阅读 · 0 评论 -
U++7属性变化事件
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;void AMyActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent){ const FName ab=PropertyChangedEvent.Property->GetFName(); if...原创 2022-02-19 16:56:31 · 485 阅读 · 0 评论 -
U++6Interface的使用
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category=Trigger Reaction)bool ReactToTrigger();BlueprintCallable引用实现接口的对象的C++或蓝图可以调用使用 BlueprintCallable 说明符的函数。BlueprintImplementableEvent使用 BlueprintImplementableEvent 的函数不能在C++中被腹杆,但可以任何实现或原创 2022-02-19 16:56:01 · 480 阅读 · 0 评论 -
U++5FMulticastDelegateSignature的多重代理
其他都一样DECLARE_MULTICAST_DELEGATE(FMulticastDelegateSignature)FMulticastDelegateSignature myMulticastDelegate;实现方:AGameModeBase* modebase = UGameplayStatics::GetGameMode(GetWorld()); ATestGameModeBase* mymode = Cast<ATestGameModeBase>(modebase...原创 2022-02-19 16:55:29 · 125 阅读 · 0 评论 -
U++4带参数的动态代理
一切和不带参标准代理一样除了绑定的方法必须使已经绑定好在代理上的参数,同样类型gamemode里DECLARE_DELEGATE_OneParam(FParamDelegateSignature, FLinearColor)public: FParamDelegateSignature myOneParamDelegate;实现方里:AGameModeBase* modebase = UGameplayStatics::GetGameMode(GetWorld()); ...原创 2022-02-19 16:55:00 · 207 阅读 · 0 评论 -
U++3使用函数指针访问方法
void(AListener:: * PL)()=&AListener::Enablelight; TArray<AActor*>alist; UGameplayStatics::GetAllActorsOfClass(GetWorld(), AActor::StaticClass(), alist); for (int i = 0; i < alist.Num(); i++) { AListener* pll = Cast<A...原创 2022-02-18 22:36:45 · 98 阅读 · 0 评论 -
U++2计时器
在timer里UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Properties") FTimerHandle Timer;UFUNCTION(BlueprintCallable, Category = "FUNCTIONS") void Timer_OK();UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Timer") ...原创 2022-02-18 22:36:16 · 148 阅读 · 0 评论 -
U++1.代理
动态代理FcriptDelegate使用方法1 FScriptDelegate start;23 start.BindUFunction(this,"onOverlap");456 myCollision->OnComponentBeginOverlap.Add(start);789 void AMyActor::onOverlap(){1011 UE_LOG(LogTemp,Warning,TEXT("GOOD"));1213 }...原创 2022-02-18 22:35:19 · 139 阅读 · 0 评论