title: How to add OnClicked event for StaticMeshComponent in ure4.7?
body: <p>Hej, I've been trying to click on StaticMeshComponent during Run-time, but not able to click on particular StaticMeshComponent. I've tried the below logic to click and set the material inside OnClick() Function, but not able succeed. Is AddDynamic approach correct ??<br>
  In .cpp</p>
  
  <pre><code>    StaticMeshComponent = CreateDefaultSubobject&lt;UStaticMeshComponent&gt;(TEXT("StaticMeshComponentCOMP"));
      ConstructorHelpers::FObjectFinder&lt;UStaticMesh&gt; StaticMesh_obj(TEXT("/Game/StarterContent/Meshs/Chairs_Chair1"));
      StaticMeshComponent-&gt;SetStaticMesh(StaticMesh_obj.Object);
      StaticMeshComponent-&gt;OnClicked.AddDynamic(this, &amp;AMyActor::OnClick);
      StaticMeshComponent-&gt;AttachTo(RootComponent);
  
  // OnClick Function
  
  
   void AMyActor::OnClick(UPrimitiveComponent* pComponent)
       {
  ConstructorHelpers::FObjectFinder&lt;UMaterial&gt; MeshMaterial(TEXT("/Game/GTFreeMaterials/Materials/Metal_BrushedSteel"));
  
          // Set properties for Staic mesh component
          StaticMeshComponentArray[i]-&gt;SetMaterial(0, MeshMaterial.Object);
           FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(TEXT("Clicked")));
       }
  </code></pre>
  
  <p>In .h</p>
  
  <pre><code> void OnClick(UPrimitiveComponent* pComponent);
  </code></pre>
  
  <p>Could you guys please help me in this issues Or guide me any another efficient logic to solve my problem.</p>
  
  <p>P.S: Game Mode : Mouse Click mode</p>