# BlueprintAuthorityOnly C++ Equivalent

**URL:** <https://forums.unrealengine.com/t/blueprintauthorityonly-c-equivalent/316141>\
**Category:** C++\
**Tags:** authority, unreal-engine, UE4, question, CPP\
**Created:** [April 23, 2015, 7:41pm UTC](https://forums.unrealengine.com/t/blueprintauthorityonly-c-equivalent/316141 "2015-04-23T19:41:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_33e74471](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33e74471](https://forums.unrealengine.com/u/anonymous_user_33e74471)\
**Post date:** [April 23, 2015, 7:41pm UTC](https://forums.unrealengine.com/t/blueprintauthorityonly-c-equivalent/316141/1 "2015-04-23T19:41:48Z")

</div>

Hi all,  
I’ve noticed I run into a situation a lot of the time where I have C++ functions that I’d like to only ever run on authority, and I end up manually verifying that the code is running on authority. It happens often enough that I’m wondering if there’s a C++ equivalent to BlueprintAuthorityOnly that I can use for C++ functions, because all the checks make my code a little less readable, and I feel like there’s probably some amount of optimization that could be done when the compiler knows for certain that some functions will run exclusively on authority.

Just curious if anybody else has any ideas.

---

<div class="post-metadata">

**Author:** ![MightyFapper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MightyFapper](https://forums.unrealengine.com/u/MightyFapper)\
**Post date:** [September 19, 2019, 12:17pm UTC](https://forums.unrealengine.com/t/blueprintauthorityonly-c-equivalent/316141/2 "2019-09-19T12:17:40Z")

</div>

Good question, did you find anything?

---

<div class="post-metadata">

**Author:** ![Catastrophe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Catastrophe](https://forums.unrealengine.com/u/Catastrophe)\
**Post date:** [July 29, 2021, 10:40pm UTC](https://forums.unrealengine.com/t/blueprintauthorityonly-c-equivalent/316141/3 "2021-07-29T22:40:04Z")

</div>

In case anybody else comes across this post, I was able to find a link to function specifiers for Unreal C++ that include BlueprintAuthorityOnly as well as other functions

> **[Function Specifiers](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/GameplayArchitecture/Functions/Specifiers/)**
>
> Keywords used when declaring UFunctions to specify how the function behaves with various aspects of the Engine and Editor.
