public override void Start() { hoverEntity = OutlinePrefab.InstantiateSingle(); hoverEntity.Get <OutlineEntity>().Material = HoverMaterial; selectEntity = OutlinePrefab.InstantiateSingle(); selectEntity.Get <OutlineEntity>().Material = SelectMaterial; entitySelected = new EventReceiver <Entity>(CameraExtensionsDemo.EntitySelected); entityHover = new EventReceiver <Entity>(CameraExtensionsDemo.EntityHover); }
public override void Start() { if (OutlineGraphicsCompositor != null) { originalGraphicsCompositor = SceneSystem.GraphicsCompositor; SceneSystem.GraphicsCompositor = OutlineGraphicsCompositor; hoverEntity = OutlinePrefab.InstantiateSingle(); hoverEntity.Get <OutlineEntity>().Material = HoverMaterial; selectEntity = OutlinePrefab.InstantiateSingle(); selectEntity.Get <OutlineEntity>().Material = SelectMaterial; } entitySelected = new EventReceiver <Entity>(CameraExtensionsDemo.EntitySelected); entityHover = new EventReceiver <Entity>(CameraExtensionsDemo.EntityHover); }