public void InstantiateView(ViewId viewId) { var world = Worlds.current; var viewsModule = world.GetModule <ME.ECS.Views.ViewsModule>(); viewsModule.InstantiateView(viewId, in this); }
public static void ReplaceView(this Entity entity, ViewId viewId) { if (entity.Has <ViewComponent>() == true) { ref var view = ref entity.Get <ViewComponent>(); if (view.viewInfo.prefabSourceId != viewId) { view.viewInfo = new ViewInfo(entity, viewId, Worlds.currentWorld.GetStateTick()); } }
public void InstantiateView <TEntity>(ViewId prefab, Entity entity) where TEntity : struct, IEntity { var viewsModule = this.GetModule <ViewsModule <TState, TEntity> >(); viewsModule.InstantiateView(prefab, entity); }
public void InstantiateViewShared(ViewId prefab) { this.InstantiateView <SharedEntity>(prefab, this.sharedEntity); }
public void InstantiateView(ViewId prefab, Entity entity) { var viewsModule = this.GetModule <ViewsModule>(); viewsModule.InstantiateView(prefab, entity); }
public static void InstantiateView(this Entity entity, ViewId viewId) { Worlds.currentWorld.InstantiateView(viewId, entity); }