Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about entity-component-system

Read more about entity-component-system

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - entity-component-system

Multiple mutable queries with Legion ECS

I am using the Legion ECS and trying to use multiple mutable queries and running into some borrow checker constraints. I basically want to update the state of components by comparing with all of the o...
test-img

Toby Hede

rust

borrow-checker

entity-component-system

Votes: 0

Answers: 1

Latest Answer

The issue is that your components vector is a vector containing references to Component, which borrows from world and means you can't mutably borrow it later when you go to edit the component. You can...
test-img

Colonel Thirty Two

How to get all derived classes from a base class in C++?

I'm implementing a game engine in C++ which uses an ECS (Entity-Component-System). Each GameObject can have multiple Components (stored in GameObject's std::vector<Component*> _components). I ha...
test-img

FeuFeve

c++

class

templates

types

entity-component-system

Votes: 0

Answers: 1

Latest Answer

Assuming these classes are all polymorphic/dynamic (which they need to be to use typeid like this), you can just use dynamic_cast instead: template <typename T> T* GetComponent() { for (Comp...
test-img

Chris Dodd

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved