Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

ObjectBase

Syadeu edited this page Oct 21, 2021 · 10 revisions

Namespace: Syadeu.Presentation
File: ObjectBase.cs

[RequireDerived]
public abstract class ObjectBase : ICloneable, IDisposable

EntitySystem 의 모든 객체들이 참조하는 가장 기본 abstract class 입니다.

Inheritance: System.Object -> ObjectBase
Derived: EntityDataBase, EntityBase, AttributeBase, DataObjectBase, ActionBase
Implements: ICloneable, IDisposable

Overview

  • Json serialize 가 가능한 객체를 작성할 수 있습니다.

Remarks

class 맴버, ReferenceType 선언을 그리 추천하고 싶지 않지만, 필요에 의해 선언이 내부에 되었다면, 해당 값을 복사하여 인스턴스를 만들기 위해 Copy() 메소드를 override 하여 해당 값을 복사하여야합니다.

현재는 이 오브젝트를 통해 사용자가 확장 할 수는 있지만, 데이터 저장 및 로드에 대한 지원이 없습니다. 상위 객체를 상속받아 사용하세요.

Description

EntitySystem 의 핵심 중 하나는 json serializing 을 통해 UnityEngine 외부에서도 다양한 데이터를 수정 및 편집을 할 수 있는 것 입니다. ObjectBase 를 상속받음로서 각 Entity 객체들이 고유 해시값 (Hash) 을 가지도록 하며, EntitySystem 을 통해 인스턴스 객체를 생성할 때에도 인스턴스 해쉬값을 각각 가지도록 합니다.

ObjectBase 는 이후 다양한 데이터로 확장 가능성을 넓히기 위해 json serialize, 인스턴스 객체를 생성하기 위한 정보로만 구성되었습니다. 추가적인 확장은 전부 상속을 통해 이루어집니다. EntityDataBase, EntityBase, AttributeBase, DataObjectBase, ActionBase 를 참조하세요.

Examples


Properties

Name Description
Name 이 객체의 이름입니다.
Hash 이 객체의 오리지널 해시입니다.
Disposed 이 객체의 메모리가 GC 에서 수집될 예정인지 반환합니다.

Protected Methods

Name Description
Copy() EntitySystem 에서 이 객체 인스턴스를 생성하기 위해 호출하는 메소드입니다. ValueType 이 아닌 필드, 혹은 프로퍼티가 있다면 반드시 이 메소드를 override 하여 참조하는 오리지널 객체의 메모리를 사용하지 않도록 하여야 합니다.
OnDispose() 이 인스턴스 객체가 메모리에서 제거될 때 실행됩니다.

Methods

Name Description
Clone()
Dispose()
- Interfaces
- Enums
- Attributes
- Abstract Classes
- Classes
- Structs
- Exceptions

- Syadeu.Presentation
- Syadeu.Collections
- Syadeu.Collections.Converters
- Syadeu.Collections.Proxy
- Syadeu.Presentation.Proxy
- Syadeu.Presentation.Internal
- Syadeu.Presentation.Entities
- Syadeu.Presentation.Attributes
- Syadeu.Presentation.Components
- Syadeu.Presentation.Actions
- Syadeu.Presentation.Render
  • CameraData
  • CameraFrustum
  • IntersectionType
  • RenderSystem
  • WorldCanvasSystem
- Syadeu.Presentation.Data
  • DataContainerSystem
  • DataObjectBase
  • EntityAnimationClipEventData
- Syadeu.Presentation.Events

Clone this wiki locally