// This function is only used within constructors to create new instances of our components. Outside of the constructor we use NewObject<T>(); CameraComp = CreateDefaultSubobject<UCameraComponent>("CameraComp"); // We can now safely call functions on the component CameraComp->SetupAttachment(SpringArmComp);
// 通过 get 获取元素,返回值为 Option<T> match v.get(2) { Some(third) => println!("The third element is {}", third), None => println!("There is no third element."), }