# Public, protected or private with AllowPrivateAccess - Best practices

**URL:** <https://forums.unrealengine.com/t/public-protected-or-private-with-allowprivateaccess-best-practices/578689>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, Code, question\
**Created:** [June 10, 2022, 1:22pm UTC](https://forums.unrealengine.com/t/public-protected-or-private-with-allowprivateaccess-best-practices/578689 "2022-06-10T13:22:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DevKaiUnreal](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/devkaiunreal/32/935713_2.png) [@DevKaiUnreal](https://forums.unrealengine.com/u/DevKaiUnreal)\
**Post date:** [June 14, 2022, 12:21pm UTC](https://forums.unrealengine.com/t/public-protected-or-private-with-allowprivateaccess-best-practices/578689/3 "2022-06-14T12:21:43Z")

</div>

> Seems a bit strange to me to routinely have stuff that’s inaccessible in C++ be accessible via BP?

Exactly. Actually there is a third option **BlueprintGetter** as discussed in a related thread [https://forums.unrealengine.com/t/why-are-blueprintgetter-not-visible/579329](https://forums.unrealengine.com/t/why-are-blueprintgetter-not-visible/579329).

What I usually see in tutorals is the **AllowPrivateAccess** option. However, to me this seems more like a workaround. Shouldn’t be made more heavy use of **BlueprintGetter** and **BlueprintSetter**? What is the best coding practice?

---

_[View the full topic](https://forums.unrealengine.com/t/public-protected-or-private-with-allowprivateaccess-best-practices/578689)._
