Is there hava MemberwiseClone method with entity clone?


#1

I see the Entity.clone() is a deep clone,is it have a MemberwiseClone method?


#2

Entity does not have a member-wise clone method. What would be the use case?

An entity is mainly a container of entity components. An entity component can belong to one entity only and each entity has a unique Id. The only properties remaining for a member-wise clone would be the entity name and its group.


#5

If there is a scene hava many same entity just different width position.
Use deep clone will take up a lot of memory.
Reference types is better ,is it?
Xenko hava solution in this scene?


#6

you should use an InstancingShader (Tutorial here) and just one entity to handle that.

For example, if you’re making a minecraft-like, juste create an entity “World” and make it draw and handle all the cubes.