Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.8 KB

Entity.SetSameAs_T_(Entity).md

File metadata and controls

36 lines (23 loc) · 1.8 KB

Entity.SetSameAs(Entity) Method

Sets the value of the component of type T on the current Entity to the same instance of an other Entity.
This method is not thread safe.

public void SetSameAs<T>(in DefaultEcs.Entity reference);

Type parameters

T

The type of the component.

Parameters

reference Entity

The other Entity used as reference.

Exceptions

System.InvalidOperationException
Entity was not created from a World.

System.InvalidOperationException
Reference Entity comes from a different World.

System.InvalidOperationException
Reference Entity does not have a component of type T.