{"id":2549,"date":"2026-04-06T20:09:14","date_gmt":"2026-04-06T11:09:14","guid":{"rendered":"https:\/\/yukun-unreal.com\/?p=2549"},"modified":"2026-04-06T20:09:16","modified_gmt":"2026-04-06T11:09:16","slug":"%e3%80%90ue%e3%80%91%e3%82%a2%e3%82%af%e3%82%bf%e3%82%92%e5%9b%9e%e8%bb%a2%e3%81%95%e3%81%9b%e3%82%ad%e3%83%a3%e3%83%a9%e3%82%af%e3%82%bf%e3%83%bc%e3%81%a8%e9%87%8d%e3%81%aa%e3%81%a3%e3%81%9f%e3%82%89","status":"publish","type":"post","link":"https:\/\/yukun-unreal.com\/?p=2549","title":{"rendered":"\u3010UE\u3011\u30a2\u30af\u30bf\u3092\u56de\u8ee2\u3055\u305b\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u3068\u91cd\u306a\u3063\u305f\u3089\u6d88\u6ec5\uff01\u3010C++\u3011"},"content":{"rendered":"\n<p>\u4ee5\u524d\u306b\u30a2\u30af\u30bf\u3092\u4e0a\u4e0b\u306b\u6d6e\u904a\u3055\u305b\u305f\u308a\u3001\u5186\u904b\u52d5\u3055\u305b\u305f\u308a\u3057\u305f\u306e\u3067\u4eca\u56de\u306f\u305d\u308c\u306e\u4e00\u3064\u4e0a\u306e\u30b9\u30c6\u30c3\u30d7\uff1f\u3068\u8a00\u3063\u3066\u3044\u3044\u306e\u304b\u306f\u5206\u304b\u3089\u306a\u3044\u3067\u3059\u304c\u3001\u30a2\u30af\u30bf\u3092\u4e0a\u4e0b\u904b\u52d5\u3055\u305b\u3064\u3064\u3055\u3089\u306b\u56de\u8ee2\u3055\u305b\u3066\u3001\u30d7\u30ec\u30a4\u30e4\u30fc\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u304c\u30a2\u30af\u30bf\u306b\u91cd\u306a\u3063\u305f\u6642\u306b\u306f\u30a2\u30af\u30bf\u3092\u30b2\u30fc\u30e0\u5185\u304b\u3089\u524a\u9664\u3059\u308b\uff01\u3068\u3044\u3046\u51e6\u7406\u3092\u7d44\u3093\u3067\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/\u3010X\u7528\u3011.mov\"><\/video><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u307e\u305a\u306f\u65b0\u898f\u3067C++\u306e\u30a2\u30af\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002VisualStudio\u304c\u7acb\u3061\u4e0a\u304c\u3063\u305f\u3089\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203b\u753b\u50cf\u306b\u306f\u5f8c\u534a\u306e\u30b3\u30fc\u30c9\u304c\u898b\u3048\u96a0\u308c\u3059\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u6c17\u306b\u305b\u305a\u8d64\u67a0\u90e8\u5206\u304b\u3089\u968f\u6642\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u4e0a\u4e0b\u904b\u52d5\u90e8\u5206\u304b\u3089\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5b58\u5728\u3059\u308bpublic\u306e\u4e2d\u306b\u307e\u305a\u306f\u5909\u6570\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"584\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-30-1024x584.png\" alt=\"\" class=\"wp-image-2551\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-30-1024x584.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-30-300x171.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-30-768x438.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-30.png 1145w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"margin:20px 0;\">\n\n  <!-- \u898b\u51fa\u3057 -->\n  <div style=\"\n    font-weight:bold;\n    margin-bottom:8px;\n  \">\n    \u3053\u306e\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u307e\u3059\uff01\n  <\/div>\n\n  <!-- \u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af -->\n  <div style=\"\n    position: relative;\n    background:#0d0d0d;\n    border-top:3px solid #ff2b2b;\n    border-bottom:3px solid #ff2b2b;\n    padding:16px;\n    font-family: Consolas, monospace;\n    box-shadow:0 0 12px rgba(255,43,43,0.25);\n    overflow:hidden;\n  \">\n\n    <!-- \u53f3\u5074\u306b\u3060\u3051\u4f38\u3070\u3059\u30ec\u30a4\u30e4\u30fc -->\n    <div style=\"\n      position:absolute;\n      top:0;\n      left:0;\n      width:100vw;\n      height:100%;\n      background:#0d0d0d;\n      z-index:-1;\n    \"><\/div>\n\n    <!-- \u30bf\u30a4\u30c8\u30eb -->\n    <div style=\"\n      color:#ff2b2b;\n      font-size:13px;\n      margin-bottom:6px;\n    \">\n      C++ Example\n    <\/div>\n\n    <!-- \u30b3\u30fc\u30c9 -->\n    <pre style=\"margin:0;\">\n<code style=\"\n  color:#e6e6e6;\n  font-size:14px;\n  line-height:1.6;\n\">\npublic:\t\n\t\/\/ Called every frame\n\tvirtual void Tick(float DeltaTime) override;\n\n\tFVector StartLocation;\n\n\tUPROPERTY(EditAnywhere, Category = \"Move\")\n\tfloat MoveSpeed = 5.f;\n\n\tUPROPERTY(EditAnywhere, Category = \"Move\")\n\tfloat Amplitude = 25.f;\n\n\tUPROPERTY(EditAnywhere, Category = \"Move\")\n\tfloat RotationSpeed = 100.f;\n<\/code>\n    <\/pre>\n\n  <\/div>\n\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5909\u6570\u306e\u4f5c\u6210\u304c\u3067\u304d\u305f\u3089\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u79fb\u52d5\u3057\u3066\u30a2\u30af\u30bf\u304c\u30b2\u30fc\u30e0\u958b\u59cb\u6642\u306b\u30b9\u30dd\u30fc\u30f3\u3057\u305f\u5834\u6240\u3092\u899a\u3048\u3066\u304a\u3051\u308b\u3088\u3046\u5909\u6570\u306b\u30b9\u30dd\u30fc\u30f3\u6642\u306e\u5834\u6240\u3092\u683c\u7d0d\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>StartLocation \uff1d GetActorLocation\uff08\uff09\uff1b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"561\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-31-1024x561.png\" alt=\"\" class=\"wp-image-2552\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-31-1024x561.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-31-300x164.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-31-768x421.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-31.png 1249w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u7d9a\u3044\u3066\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u5185\u306eTick\u306e\u90e8\u5206\u306b\u4e0a\u4e0b\u904b\u52d5\u3068\u56de\u8ee2\u904b\u52d5\u304c\u3067\u304d\u308b\u3088\u3046\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"452\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32-1024x452.png\" alt=\"\" class=\"wp-image-2553\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32-1024x452.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32-300x132.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32-768x339.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32-1536x678.png 1536w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32-1320x582.png 1320w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-32.png 1564w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u30b3\u30fc\u30c9\u3092\u307e\u3068\u3081\u3066\u7533\u3057\u8a33\u306a\u3044\u3067\u3059\u304c\u3001Tick\u5185\u306b\u4e0b\u8a18\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n\n\n\n<div style=\"margin:20px 0;\">\n\n  <!-- \u898b\u51fa\u3057 -->\n  <div style=\"\n    font-weight:bold;\n    margin-bottom:8px;\n  \">\n    \u3053\u306e\u30b3\u30fc\u30c9\u306f\u3053\u3061\u3089\uff01\n  <\/div>\n\n  <!-- \u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af -->\n  <div style=\"\n    position: relative;\n    background:#0d0d0d;\n    border-top:3px solid #ff2b2b;\n    border-bottom:3px solid #ff2b2b;\n    padding:16px;\n    font-family: Consolas, monospace;\n    box-shadow:0 0 12px rgba(255,43,43,0.25);\n    overflow:hidden;\n  \">\n\n    <!-- \u53f3\u5074\u306b\u3060\u3051\u4f38\u3070\u3059\u30ec\u30a4\u30e4\u30fc -->\n    <div style=\"\n      position:absolute;\n      top:0;\n      left:0;\n      width:100vw;\n      height:100%;\n      background:#0d0d0d;\n      z-index:-1;\n    \"><\/div>\n\n    <!-- \u30bf\u30a4\u30c8\u30eb -->\n    <div style=\"\n      color:#ff2b2b;\n      font-size:13px;\n      margin-bottom:6px;\n    \">\n      C++ Example\n    <\/div>\n\n    <!-- \u30b3\u30fc\u30c9 -->\n    <pre style=\"margin:0;\">\n<code style=\"\n  color:#e6e6e6;\n  font-size:14px;\n  line-height:1.6;\n\">\nvoid AItemActor::Tick(float DeltaTime)\n{\n\tSuper::Tick(DeltaTime);\n\n\t\n\tfloat Time = GetWorld()->GetTimeSeconds();\n\n\tfloat Offset = FMath::Sin(Time * MoveSpeed) * Amplitude;\n\n\tFVector NewLocation = StartLocation;\n\tNewLocation.Z += Offset;\n\n\tSetActorLocation(NewLocation);\n\n\n\t\n\tFRotator Rotation = GetActorRotation();\n\tRotation.Yaw += RotationSpeed * DeltaTime; \n\n\tSetActorRotation(Rotation);\n\n\uff5d\n<\/code>\n    <\/pre>\n\n  <\/div>\n\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u3067\u30a2\u30af\u30bf\u306e\u904b\u52d5\u95a2\u4fc2\u306b\u3064\u3044\u3066\u306f\u51e6\u7406\u306e\u8a18\u8ff0\u304c\u3067\u304d\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30eb\u30fc\u30c8\u3084\u898b\u305f\u76ee\u306a\u3069\u306e\u8a2d\u5b9a\u3092\u73fe\u72b6\u6301\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8ffd\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u306b\u623b\u3063\u3066\u3001#include\u3068UCLASS\u306e\u9593\u3067\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>class UBoxComponent;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"547\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-33-1024x547.png\" alt=\"\" class=\"wp-image-2554\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-33-1024x547.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-33-300x160.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-33-768x410.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-33.png 1301w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u6b21\u306b\u5c11\u3057\u4e0b\u5074\u306b\u79fb\u52d5\u3057\u3066\u3001\u5404\u7a2e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092BP\u3067\u6271\u3048\u308b\u3088\u3046\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002\u4eca\u56deprotected\u3068\u3057\u3066\u307e\u3059\u304cpublic\u3067\u3082\u554f\u984c\u306a\u3044\u306f\u305a\u3067\u3059\u3002\u305f\u3076\u3093\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-34-1024x514.png\" alt=\"\" class=\"wp-image-2555\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-34-1024x514.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-34-300x151.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-34-768x386.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-34-1320x663.png 1320w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-34.png 1340w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u79fb\u52d5\u3057\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8ffd\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3042\u305f\u308a\u5224\u5b9a\u7528\u306eBoxComponent\u306f\u521d\u671f\u5024\u3060\u3051\u3067\u306f\u3001\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u524d\u6bb5\u3067BoxComponent\u306b\u3064\u3044\u3066\u306f\u30af\u30e9\u30b9\u3067\u8a18\u8ff0\u3057\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<p>#include &#8220;Components\/BoxComponent.h&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-35-1024x548.png\" alt=\"\" class=\"wp-image-2556\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-35-1024x548.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-35-300x161.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-35-768x411.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-35.png 1300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u7d9a\u3044\u3066\u8ffd\u52a0\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u7a2e\u985e\u3084\u968e\u5c64\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001\u30e1\u30c3\u30b7\u30e5\u3068\u3042\u305f\u308a\u5224\u5b9a\u304c\u3042\u308c\u3070\u3044\u3044\u304b\u306a\u3068\u601d\u3063\u305f\u306e\u3067\u5fc5\u8981\u6700\u4f4e\u9650\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-36-1024x548.png\" alt=\"\" class=\"wp-image-2557\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-36-1024x548.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-36-300x161.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-36-768x411.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-36.png 1300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"margin:20px 0;\">\n\n  <!-- \u898b\u51fa\u3057 -->\n  <div style=\"\n    font-weight:bold;\n    margin-bottom:8px;\n  \">\n    \u3053\u306e\u30b3\u30fc\u30c9\u3092\u30d6\u30ed\u30c3\u30af\u5185\u306b\u8ffd\u52a0\u3057\u3066\u307e\u3059\uff01\n  <\/div>\n\n  <!-- \u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af -->\n  <div style=\"\n    position: relative;\n    background:#0d0d0d;\n    border-top:3px solid #ff2b2b;\n    border-bottom:3px solid #ff2b2b;\n    padding:16px;\n    font-family: Consolas, monospace;\n    box-shadow:0 0 12px rgba(255,43,43,0.25);\n    overflow:hidden;\n  \">\n\n    <!-- \u53f3\u5074\u306b\u3060\u3051\u4f38\u3070\u3059\u30ec\u30a4\u30e4\u30fc -->\n    <div style=\"\n      position:absolute;\n      top:0;\n      left:0;\n      width:100vw;\n      height:100%;\n      background:#0d0d0d;\n      z-index:-1;\n    \"><\/div>\n\n    <!-- \u30bf\u30a4\u30c8\u30eb -->\n    <div style=\"\n      color:#ff2b2b;\n      font-size:13px;\n      margin-bottom:6px;\n    \">\n      C++ Example\n    <\/div>\n\n    <!-- \u30b3\u30fc\u30c9 -->\n    <pre style=\"margin:0;\">\n<code style=\"\n  color:#e6e6e6;\n  font-size:14px;\n  line-height:1.6;\n\">\nRoot = CreateDefaultSubobject<USceneComponent>(TEXT(\"Root\"));\nRootComponent = Root;\n\nBoxCollision = CreateDefaultSubobject<UBoxComponent>(TEXT(\"Collision\"));\nBoxCollision->SetupAttachment(Root);\n\n\nMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT(\"MeshComponent\"));\nMesh->SetupAttachment(BoxCollision);\n\t\n<\/code>\n    <\/pre>\n\n  <\/div>\n\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u304a\u3063\u3051\u30fc\uff01<\/p>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u4f5c\u6210\u304c\u3067\u304d\u305f\u3089\u3042\u3068\u5c11\u3057\u3067\u5b8c\u6210\u3060\uff01\uff01\uff01<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u306b\u623b\u308a\u95a2\u6570\u51e6\u7406\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-37-1024x572.png\" alt=\"\" class=\"wp-image-2560\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-37-1024x572.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-37-300x167.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-37-768x429.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-37.png 1161w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"margin:20px 0;\">\n\n  <!-- \u898b\u51fa\u3057 -->\n  <div style=\"\n    font-weight:bold;\n    margin-bottom:8px;\n  \">\n    \u3053\u306e\u30b3\u30fc\u30c9\u3092\u30d6\u30ed\u30c3\u30af\u5185\u306b\u8ffd\u52a0\u3057\u3066\u307e\u3059\uff01\n  <\/div>\n\n  <!-- \u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af -->\n  <div style=\"\n    position: relative;\n    background:#0d0d0d;\n    border-top:3px solid #ff2b2b;\n    border-bottom:3px solid #ff2b2b;\n    padding:16px;\n    font-family: Consolas, monospace;\n    box-shadow:0 0 12px rgba(255,43,43,0.25);\n    overflow:hidden;\n  \">\n\n    <!-- \u53f3\u5074\u306b\u3060\u3051\u4f38\u3070\u3059\u30ec\u30a4\u30e4\u30fc -->\n    <div style=\"\n      position:absolute;\n      top:0;\n      left:0;\n      width:100vw;\n      height:100%;\n      background:#0d0d0d;\n      z-index:-1;\n    \"><\/div>\n\n    <!-- \u30bf\u30a4\u30c8\u30eb -->\n    <div style=\"\n      color:#ff2b2b;\n      font-size:13px;\n      margin-bottom:6px;\n    \">\n      C++ Example\n    <\/div>\n\n    <!-- \u30b3\u30fc\u30c9 -->\n    <pre style=\"margin:0;\">\n<code style=\"\n  color:#e6e6e6;\n  font-size:14px;\n  line-height:1.6;\n\">\nUFUNCTION()\nvoid OnOverlapBegin(\n\tUPrimitiveComponent* OverlappedComponent,\n\tAActor* OhterActor,\n\tUPrimitiveComponent* OtherComp,\n\tint32 OtherBodyIndex,\n\tbool bFromSweep,\n\tconst FHitResult& SweepResult\n);\n<\/code>\n    <\/pre>\n\n  <\/div>\n\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u305d\u3046\u3057\u305f\u3089\u3001\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u79fb\u52d5\u3057\u3066\u540c\u3058\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u305f\u5f8c\u306b\u51e6\u7406\u5185\u5bb9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3042\u3068\u5c11\u3057\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-39-1024x566.png\" alt=\"\" class=\"wp-image-2562\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-39-1024x566.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-39-300x166.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-39-768x424.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-39.png 1198w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>BoxCollision-\uff1eOnComponentBeginOverlap.AddDynamic(this, &amp;AItemActor::OnOverlapBegin);<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"475\" src=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-38-1024x475.png\" alt=\"\" class=\"wp-image-2561\" srcset=\"https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-38-1024x475.png 1024w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-38-300x139.png 300w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-38-768x356.png 768w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-38-1320x613.png 1320w, https:\/\/yukun-unreal.com\/wp-content\/uploads\/2026\/04\/image-38.png 1340w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"margin:20px 0;\">\n\n  <!-- \u898b\u51fa\u3057 -->\n  <div style=\"\n    font-weight:bold;\n    margin-bottom:8px;\n  \">\n    \u3053\u306e\u30b3\u30fc\u30c9\u3092\u30d6\u30ed\u30c3\u30af\u5185\u306b\u8ffd\u52a0\u3057\u3066\u307e\u3059\uff01\n  <\/div>\n\n  <!-- \u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af -->\n  <div style=\"\n    position: relative;\n    background:#0d0d0d;\n    border-top:3px solid #ff2b2b;\n    border-bottom:3px solid #ff2b2b;\n    padding:16px;\n    font-family: Consolas, monospace;\n    box-shadow:0 0 12px rgba(255,43,43,0.25);\n    overflow:hidden;\n  \">\n\n    <!-- \u53f3\u5074\u306b\u3060\u3051\u4f38\u3070\u3059\u30ec\u30a4\u30e4\u30fc -->\n    <div style=\"\n      position:absolute;\n      top:0;\n      left:0;\n      width:100vw;\n      height:100%;\n      background:#0d0d0d;\n      z-index:-1;\n    \"><\/div>\n\n    <!-- \u30bf\u30a4\u30c8\u30eb -->\n    <div style=\"\n      color:#ff2b2b;\n      font-size:13px;\n      margin-bottom:6px;\n    \">\n      C++ Example\n    <\/div>\n\n    <!-- \u30b3\u30fc\u30c9 -->\n    <pre style=\"margin:0;\">\n<code style=\"\n  color:#e6e6e6;\n  font-size:14px;\n  line-height:1.6;\n\">\nvoid AItemActor::OnOverlapBegin(\n\tUPrimitiveComponent* OverlappedComponent,\n\tAActor* OtherActor,\n\tUPrimitiveComponent* OtherComp,\n\tint32 OtherBodyIndex,\n\tbool bFromSweep,\n\tconst FHitResult& SweepResult\n)\n\n{\n\tAMyProject2Character* Player = Cast<AMyProject2Character>(OtherActor);\n\n\tif (Player)\n\t{\n\t\tDestroy();\n\t}\n}\n<\/code>\n    <\/pre>\n\n  <\/div>\n\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u4f5c\u6210\u3067\u304d\u305f\u3089\u3042\u3068\u306fC++\u30a2\u30af\u30bf\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066BP\u3092\u4f5c\u6210\u3002Component\u3092\u8a2d\u5b9a\u3057\u3066\u30b2\u30fc\u30e0\u5185\u306b\u914d\u7f6e\u3057\u3066\u7d42\u308f\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u672c\u65e5\u3082\u304a\u75b2\u308c\u3055\u307e\u3067\u3057\u305f\uff01<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u25c6YouTube\u30c1\u30e3\u30f3\u30cd\u30eb\u3082\u3084\u3063\u3066\u307e\u3059<\/strong><\/p>\n\n\n\n<p id=\"block-c9b40551-6534-4d63-a34d-ac235983ea6a\"><a href=\"https:\/\/www.youtube.com\/@yu-kun\">\u3086\u3046tuber\u30fb\u3086\u3046\u304f\u3093 &#8211; YouTube<\/a><\/p>\n\n\n\n<p id=\"block-4a493c32-b169-4040-9bb6-33b69c9b62a7\"><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-unrealengine wp-block-embed-unrealengine\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"72c0Js9TQE\"><a href=\"https:\/\/yukun-unreal.com\/?p=2380\">\u3010UnrealEngine\u3011.h\u3068.cpp\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u3010C++\u3011<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010UnrealEngine\u3011.h\u3068.cpp\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u3010C++\u3011&#8221; &#8212; UnrealEngine\u3067\u30b2\u30fc\u30e0\u5236\u4f5c\" src=\"https:\/\/yukun-unreal.com\/?p=2380&#038;embed=true#?secret=qSFa0wpuUQ#?secret=72c0Js9TQE\" data-secret=\"72c0Js9TQE\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-unrealengine wp-block-embed-unrealengine\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"UPTIIeR24v\"><a href=\"https:\/\/yukun-unreal.com\/?p=2416\">\u3010UnrealEngine\u3011C++\u306e\u5909\u6570\u3092\u7406\u89e3\u3057\u3088\u3046\uff01<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010UnrealEngine\u3011C++\u306e\u5909\u6570\u3092\u7406\u89e3\u3057\u3088\u3046\uff01&#8221; &#8212; UnrealEngine\u3067\u30b2\u30fc\u30e0\u5236\u4f5c\" src=\"https:\/\/yukun-unreal.com\/?p=2416&#038;embed=true#?secret=b5tBOWF63N#?secret=UPTIIeR24v\" data-secret=\"UPTIIeR24v\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-unrealengine wp-block-embed-unrealengine\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"slz0LISECN\"><a href=\"https:\/\/yukun-unreal.com\/?p=2503\">\u3010UnrealEngine\u3011\u30d7\u30ec\u30a4\u30e4\u30fc\u306e\u8a73\u7d30\u30bf\u30d6\u306bIA\u3092\u8ffd\u52a0\u3059\u308b\u3010C++\u3011<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010UnrealEngine\u3011\u30d7\u30ec\u30a4\u30e4\u30fc\u306e\u8a73\u7d30\u30bf\u30d6\u306bIA\u3092\u8ffd\u52a0\u3059\u308b\u3010C++\u3011&#8221; &#8212; UnrealEngine\u3067\u30b2\u30fc\u30e0\u5236\u4f5c\" src=\"https:\/\/yukun-unreal.com\/?p=2503&#038;embed=true#?secret=jHhrGI9OeP#?secret=slz0LISECN\" data-secret=\"slz0LISECN\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u524d\u306b\u30a2\u30af\u30bf\u3092\u4e0a\u4e0b\u306b\u6d6e\u904a\u3055\u305b\u305f\u308a\u3001\u5186\u904b\u52d5\u3055\u305b\u305f\u308a\u3057\u305f\u306e\u3067\u4eca\u56de\u306f\u305d\u308c\u306e\u4e00<\/p>\n<p><a href=\"https:\/\/yukun-unreal.com\/?p=2549\" class=\"awp-btn awp-btn-secondary\">Continue Reading<span class=\"screen-reader-text\">\u3010UE\u3011\u30a2\u30af\u30bf\u3092\u56de\u8ee2\u3055\u305b\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u3068\u91cd\u306a\u3063\u305f\u3089\u6d88\u6ec5\uff01\u3010C++\u3011<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[628,28],"tags":[629,669,82,667,670,16,17,11,5,27,668,25,9,612,15,671,271],"class_list":["post-2549","post","type-post","status-publish","format-standard","hentry","category-c","category-tutorial","tag-c","tag-cast","tag-component","tag-destroy","tag-function","tag-tutorial","tag-ue","tag-ue5","tag-unrealengine","tag-27","tag-668","tag-25","tag-9","tag-612","tag-15","tag-671","tag-271"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=\/wp\/v2\/posts\/2549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2549"}],"version-history":[{"count":4,"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=\/wp\/v2\/posts\/2549\/revisions"}],"predecessor-version":[{"id":2564,"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=\/wp\/v2\/posts\/2549\/revisions\/2564"}],"wp:attachment":[{"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yukun-unreal.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}