Unreal 给Actor添加Component

来源:互联网 发布:网络大电影制作成本 编辑:程序博客网 时间:2024/05/26 22:55
    ProxSphere = CreateDefaultSubobject<USphereComponent>(TEXT("ProxSphere"), false);    Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"), false);        // make the root object the Mesh    RootComponent = Mesh;    ProxSphere->AttachToComponent( Mesh, FAttachmentTransformRules::KeepRelativeTransform );
老方法里面是AttachTo就可以,但现在会提出警告
0 0
原创粉丝点击