Skip to content

Latest commit

 

History

History
601 lines (581 loc) · 148 KB

DefaultEcs.md

File metadata and controls

601 lines (581 loc) · 148 KB

DefaultEcs Assembly

This is the full API documentation of DefaultEcs.

Namespaces

DefaultEcs Namespace

The DefaultEcs namespace contains types to put in place the Entity Component System pattern.

DefaultEcs.Command Namespace

The DefaultEcs.Command namespace contains types used in the recording and deferred execution of modifications on entities.

  • EntityCommandRecorder Class Represents a buffer of structural modifications to apply on Entity to record as postoned commands.
  • EntityRecord Struct Represents an Entity on which to create commands to record in a EntityCommandRecorder.
    • CopyTo(World) Method Creates a copy of current EntityRecord with all of its components in the given World.
    • CopyTo(World, ComponentCloner) Method Creates a copy of current EntityRecord with all of its components in the given World using the given ComponentCloner.
    • Disable() Method Disables the corresponding Entity so it does not appear in EntitySet.
      This command takes 5 bytes.
    • Disable<T>() Method Disables the corresponding Entity component of type T so it does not appear in EntitySet.
      This command takes 9 bytes.
    • Dispose() Method Clean the corresponding Entity of all its components.
      The current EntityRecord should not be used again after calling this method.
      This command takes 5 bytes.
    • Enable() Method Enables the corresponding Entity so it can appear in EntitySet.
      This command takes 5 bytes.
    • Enable<T>() Method Enables the corresponding Entity component of type T so it can appear in EntitySet.
      Does nothing if corresponding Entity does not have a component of type T.
      This command takes 9 bytes.
    • NotifyChanged<T>() Method Notifies the value of the component of type T has changed on the corresponding Entity.
      This command takes 9 bytes.
    • Remove<T>() Method Removes the component of type T on the corresponding Entity.
      This command takes 9 bytes.
    • Set<T>() Method Sets the value of the component of type T to its default value on the corresponding Entity.
      For a blittable component, this command takes 9 bytes + the size of the component.
      For non blittable component, this command takes 13 bytes and may cause some allocation because of boxing on struct component type.
    • Set<T>(T) Method Sets the value of the component of type T on the corresponding Entity.
      For a blittable component, this command takes 9 bytes + the size of the component.
      For non blittable component, this command takes 13 bytes and may cause some allocation because of boxing on struct component type.
    • SetSameAs<T>(EntityRecord) Method Sets the value of the component of type T on the corresponding Entity to the same instance of an other EntityRecord.
      This command takes 13 bytes.
    • SetSameAsWorld<T>() Method Sets the value of the component of type T on the corresponding Entity to the same instance of its World.
      This command takes 9 bytes.
  • WorldRecord Struct Represents a World on which to create commands to record in a EntityCommandRecorder.
    • CreateEntity() Method Records the creation of an Entity on a World and returns an EntityRecord to record action on it.
      This command takes 9 bytes.
    • Remove<T>() Method Removes the component of type T on the corresponding World.
      This command takes 7 bytes.
    • Set<T>() Method Sets the value of the component of type T to its default value on the corresponding World.
      For a blittable component, this command takes 7 bytes + the size of the component.
      For non blittable component, this command takes 11 bytes and may cause some allocation because of boxing on struct component type.
    • Set<T>(T) Method Sets the value of the component of type T on the corresponding World.
      For a blittable component, this command takes 7 bytes + the size of the component.
      For non blittable component, this command takes 11 bytes and may cause some allocation because of boxing on struct component type.

DefaultEcs.Resource Namespace

The DefaultEcs.Resource namespace contains types used in the loading of unmanaged resources needed as components.

DefaultEcs.Serialization Namespace

The DefaultEcs.Serialization namespace contains types used to save and load DefaultEcs objects.

DefaultEcs.System Namespace

The DefaultEcs.System namespace contains types to define workflows of modification on entities and components.

DefaultEcs.Threading Namespace

The DefaultEcs.Threading namespace contains types used for multithreading operations.