Posts

Showing posts with the label components

Are Unity scripts the same as systems in an ECS?

Are Unity scripts the same as systems in an ECS? I am working on making a very simple 2D game engine, and I am in the stages of redoing my entities to work somewhat like Unitys system. I have been doing research on how ECS works, and I am beginning to understand it better. As I understand, a component only holds data and literally cannot do anything but hold that data. On the other hand, systems are used to act on that data. My question is if the scripts that are attached to a GameObjcet in Unity are technically systems and not components as they are called in the editor? I am coding in Java, so if anyone has any examples of an ECS system implemented in Java or C#, that would be great as most of the examples I have seen were in C++ which is a bit more difficult for me to understand. Thanks! 1 Answer 1 Unity doesn't strictly work via an ECS, despite using the term "Component." A Unity...

How to add cards in grid with ant design using react js

Image
How to add cards in grid with ant design using react js What is ant design? A design system with values of Nature and Determinacy for better user experience of enterprise applications Read More >> https://ant.design/ A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes. if you need to add card in grid system try this Here I'm using 3 Grid in row (you can change on your requirement). CODE: import React from 'react'; import { Card, Icon, Avatar } from 'antd'; const { Meta } = Card; import { Row, Col } from 'antd'; class Surveys extends React.Component{ render() { return ( <Row gutter={16}> <Col className="gutter-row" span={8}> <Card cover={<img alt="example" src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png" />} actions={[<Icon type="settin...