Multiple Bolt Entity or an array of State-s in a single Bolt Entity on prefab ?


I use a heavily component base system. Each of the components corresponds only for one thing. Let's say I have Health, Energy and Damage component. A GameObject with Damage coponent can do damage to any GameObject which have Health component independently of existence of any other components. Because of this system, I have a high variation in the components of the prefabs. For example i can have a prefab with only Health component, an other only with Damage and a third with Damage and Energy also, etc...

My problem is:
- If I put multiple Bolt Entity-s to the same prefab, then the second entity shows the "Pefab id not set, run the Bolt..." - error, which stays after running "Compile Assembly" button, and in runtime ( while the first entity runs fine ) this entity doesn't got Attached.
- I could create a state/prefab but then I could not inherience my component from EntityBehavour<???> because the state i use depends on the prefab... :(
- Or... I could create a huge state with all the component datas which I may need.. but this seem way too waste of resources...

It would be really good if I could add multiple states for a Bolt Entity or multiple BoltEntites with different states. Is there a way or any workarounds?

Best Answer


  • Thank you! I created a State and an EntityBehaviour for each prefab. It is working but it takes a lot of extra work. It would be elegant if in a future version BoltEntities could use multiple states I think...
Sign In or Register to comment.