zoukankan      html  css  js  c++  java
  • [UE4]Component相关常用API

    http://www.dawnarc.com/2017/02/ue4component%E7%9B%B8%E5%85%B3%E5%B8%B8%E7%94%A8api/

    Actor.h

    //获取第一个与指定类型相同的Component
    UActorComponent* AActor::FindComponentByClass(const TSubclassOf<UActorComponent> ComponentClass) const
    
    //获取当前actor的所有component
    template<class T, class AllocatorType>
        void GetComponents(TArray<T*, AllocatorType>& OutComponents, bool bIncludeFromChildActors = false) const
    
    //与FindComponentByClass作用相同,暴露给蓝图使用的C++函数
    UActorComponent* AActor::GetComponentByClass(TSubclassOf<UActorComponent> ComponentClass) const
    
    //获取指定类型的所有Component
    TArray<UActorComponent*> AActor::GetComponentsByClass(TSubclassOf<UActorComponent> ComponentClass) const

    PrimitiveComponent.h

    //获取当前component中材质的个数
    int32 UPrimitiveComponent::GetNumMaterials() const
    
    //创建一个材质对象,并替换到Parent对象上的指定index的材质
    UMaterialInstanceDynamic* UPrimitiveComponent::CreateAndSetMaterialInstanceDynamicFromMaterial(int32 ElementIndex, class UMaterialInterface* Parent)



  • 相关阅读:
    C# 动态加载卸载 DLL
    C# 判断文件编码
    win10 uwp 如何拖动一个TextBlock的文字到另一个TextBlock
    C# TextBlock 上标
    PHP curl_getinfo函数
    PHP curl_file_create函数
    PHP curl_errno函数
    PHP curl_error函数
    PHP curl_escape函数
    PostgreSQL Schema
  • 原文地址:https://www.cnblogs.com/nafio/p/9137056.html
Copyright © 2011-2022 走看看