# How to get collision channel by name?

**URL:** <https://forums.unrealengine.com/t/how-to-get-collision-channel-by-name/2126360>\
**Category:** C++\
**Tags:** c-c, c-class-wizard, c-and-bluepri, c-custommeshcomponen, c-and-blueprint, c-error, c-class, c-custom-shape, c-programming, c-cone-shape, unreal-engine, question, CPP\
**Created:** [November 16, 2024, 12:28am UTC](https://forums.unrealengine.com/t/how-to-get-collision-channel-by-name/2126360 "2024-11-16T00:28:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andresantacruz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andresantacruz](https://forums.unrealengine.com/u/andresantacruz)\
**Post date:** [November 16, 2024, 12:28am UTC](https://forums.unrealengine.com/t/how-to-get-collision-channel-by-name/2126360/1 "2024-11-16T00:28:31Z")

</div>

I want to be able to create a new collision channel via Project Settings and get its `ECollisionChannel` value at runtime using the name I configured in the Project Settings for it.

I found that the configuration for each user-added collision channel is saved in the Config/DefaultEngine.ini file, in a configuration named “DefaultChannelResponses” there.

I need that because I’m developing an `UActorComponent` in a plugin library, which I don’t know upfront which exact value of `ECollisionChannel` will be associated with a given channel name.

I also found that object is loaded in a class called `UCollisionProfile` class. It’s a singleton class and it loads the “DefaultChannelResponses” configuration in a variable of the same name, but it’s private and I didn’t find any way to get it.

Is this the right way of handling that?
