# 'UpdateCollisionProfile' : is not a member of 'USkeletalMeshComponent'

**URL:** <https://forums.unrealengine.com/t/updatecollisionprofile-is-not-a-member-of-uskeletalmeshcomponent/340096>\
**Category:** Character & Animation\
**Tags:** unreal-engine, Packaging, skeletalmesh, question\
**Created:** [November 30, 2015, 10:37am UTC](https://forums.unrealengine.com/t/updatecollisionprofile-is-not-a-member-of-uskeletalmeshcomponent/340096 "2015-11-30T10:37:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_42a36632](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_42a36632](https://forums.unrealengine.com/u/anonymous_user_42a36632)\
**Post date:** [November 30, 2015, 10:37am UTC](https://forums.unrealengine.com/t/updatecollisionprofile-is-not-a-member-of-uskeletalmeshcomponent/340096/1 "2015-11-30T10:37:04Z")

</div>

Hello,

I can play my Game in PIE, but when launching or packaging I get this error:

```
LogPlayLevel: UnrealBuildTool: C:\Users\Me\Desktop\Project\Source\Project\MyClass.cpp(558) : error C2039: 'UpdateCollisionProfile' : is not a member of 'USkeletalMeshComponent'
LogPlayLevel: UnrealBuildTool: C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\Components/SkeletalMeshComponent.h(280) : see declaration of 'USkeletalMeshComponent'

```

This error is caused by a call in one of my C+±Class-Functions:

```
	myMesh->UpdateCollisionProfile();

```

where myMesh is a “USkeletalMeshComponent”.

The outputlog says, i should check if “UpdateCollisionProfile” is declared in " C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\Components/SkeletalMeshComponent.h(280)".  
It seems to be declared in line 819:

```
	virtual void UpdateCollisionProfile() override;

```

but the error still occours.  
Does anyone know a solution, or has a hint for this problem?

Thank you for any feedback,

---

<div class="post-metadata">

**Author:** ![Co](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Co](https://forums.unrealengine.com/u/Co)\
**Post date:** [November 30, 2015, 12:42pm UTC](https://forums.unrealengine.com/t/updatecollisionprofile-is-not-a-member-of-uskeletalmeshcomponent/340096/2 "2015-11-30T12:42:17Z")

</div>

Hi, UpdateCollisionProfile is defined within a **#if WITH\_EDITOR** preprocessor so it can only be used while compiling an Editor version of the engine.

You may change your code with something like this

```
#if WITH_EDITOR
    myMesh->UpdateCollisionProfile();
#endif // WITH_EDITOR
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_42a36632](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_42a36632](https://forums.unrealengine.com/u/anonymous_user_42a36632)\
**Post date:** [December 2, 2015, 2:40pm UTC](https://forums.unrealengine.com/t/updatecollisionprofile-is-not-a-member-of-uskeletalmeshcomponent/340096/3 "2015-12-02T14:40:39Z")

</div>

Thank you, i guess this is the issue.  
I just removed the line, it seemed not to be necessary for my function.
