Entity Component System (ECS) library for Elixir, offering a suite of features including: flexible queries with multiple filters, dynamic bidirectional relationships, versatile tagging capabilities, system event subscriptions, or asynchronous system execution.
For people brand new to the project who maybe missed that line at the start a more informative error message would be a nice pointer.
For context, the fetch command is from the tutorial (swap Hero for Player)
def fetch do
Ecspanse.Query.select({Ecspanse.Entity}, with: [Components.Owner])
|> Ecspanse.Query.one()
|> case do
{%Ecspanse.Entity{} = entity} -> {:ok, entity}
_ -> {:error, :not_found}
end
end
Obviously if the
use Ecspanse
module isn't started as part of the supervision tree you get something like this:For people brand new to the project who maybe missed that line at the start a more informative error message would be a nice pointer.
For context, the fetch command is from the tutorial (swap Hero for Player)