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)



  • 相关阅读:
    gulp之gulp-md5模块
    PCA调试--https证书问题
    linux开机启动tomcat
    sqlserver查看过滤存储过程内容
    oracle case when
    springboot1 缓存静态文件
    mysql修改联合主键
    git命令行获取某分支代码
    IDEA查看项目对应的git地址
    IDEA 中tomcat日志位置
  • 原文地址:https://www.cnblogs.com/nafio/p/9137056.html
Copyright © 2011-2022 走看看