duplicate

</> ursina.duplicate

Functions

duplicate()

duplicate(entity=None, copy_children=True) use a for loop instead of duplicate() if you can.



Examples


from ursina import * from ursina import Ursina, Button, scene, EditorCamera app = Ursina() new_parent = Entity(scale=1) from ursina.shaders import matcap_shader, triplanar_shader e = Button(parent=scene, scale=2, text='test', texture='shore', texture_scale=Vec2(2), color=color.gray) e.c = Entity(parent=e, model='icosphere', scale=.5, y=.5, shader=matcap_shader, texture='matcap_4') e.c2 = Entity(parent=e.c, model='cube', scale=.5, y=.5, x=1, color=color.green, shader=triplanar_shader, texture='grass') e2 = duplicate(e, x=2.25, parent=new_parent) EditorCamera() app.run()