# Where should on add new systems like a procedural generation system or other single instance shared systems

**URL:** <https://forums.unrealengine.com/t/where-should-on-add-new-systems-like-a-procedural-generation-system-or-other-single-instance-shared-systems/393364>\
**Category:** C++\
**Tags:** unreal-engine, global, question, CPP\
**Created:** [May 11, 2017, 6:38pm UTC](https://forums.unrealengine.com/t/where-should-on-add-new-systems-like-a-procedural-generation-system-or-other-single-instance-shared-systems/393364 "2017-05-11T18:38:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheSpaceMan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSpaceMan](https://forums.unrealengine.com/u/TheSpaceMan)\
**Post date:** [May 11, 2017, 6:38pm UTC](https://forums.unrealengine.com/t/where-should-on-add-new-systems-like-a-procedural-generation-system-or-other-single-instance-shared-systems/393364/1 "2017-05-11T18:38:32Z")

</div>

Lets say I have my own system for creating or generating meshs or loading them from an fbx. Essentially the system will return an instanses of a UMeshComponent. This system would then be called from different places based on need.  
GenerateTowerMesh(settings) or GenerateStairwayMesh(settings), so first of all no two instances should be created so no memory will be wasted.

But where in the engine should something like that go.

Should it be implemented as a plugin or some kind of singleton, should the GWorld proxy class be imitated, is there a different place to add it properly?

---

<div class="post-metadata">

**Author:** ![42EspoiR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@42EspoiR](https://forums.unrealengine.com/u/42EspoiR)\
**Post date:** [May 11, 2017, 6:49pm UTC](https://forums.unrealengine.com/t/where-should-on-add-new-systems-like-a-procedural-generation-system-or-other-single-instance-shared-systems/393364/2 "2017-05-11T18:49:53Z")

</div>

In Unreal Engine’s code a system like yours could be a Struct in a Module. Look for FMeshUtilities code in MeshUtilities.cpp

---

<div class="post-metadata">

**Author:** ![TheSpaceMan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSpaceMan](https://forums.unrealengine.com/u/TheSpaceMan)\
**Post date:** [May 11, 2017, 7:00pm UTC](https://forums.unrealengine.com/t/where-should-on-add-new-systems-like-a-procedural-generation-system-or-other-single-instance-shared-systems/393364/3 "2017-05-11T19:00:39Z")

</div>

So a plugin then is what you are recommending?

---

<div class="post-metadata">

**Author:** ![42EspoiR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@42EspoiR](https://forums.unrealengine.com/u/42EspoiR)\
**Post date:** [May 11, 2017, 7:29pm UTC](https://forums.unrealengine.com/t/where-should-on-add-new-systems-like-a-procedural-generation-system-or-other-single-instance-shared-systems/393364/4 "2017-05-11T19:29:27Z")

</div>

If you want to reuse it on an other project, yes. Else a struct should be enough.
